add.html
2.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Logo_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-logo_id" data-rule="required" data-field="logo" data-source="logo/index"
class="form-control selectpage" name="row[logo_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Class_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-class_id" data-rule="required" data-field="class"
data-source="classa/index" class="form-control selectpage" name="row[class_id]" type="text" value=""
onchange="set_next_input(this);"
>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Class_con_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-class_con_id" data-rule="required" data-field="class_con" data-source="class_con/index"
class="form-control selectpage" name="row[class_con_id]" type="text" value="">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"></script>
<script>
function set_next_input(obj) {
var value_id = $('#c-class_id').val();
console.log(value_id);
//改变下面这个框的数据源
$("#c-class_con_id_text").data("selectPageObject").option.data = 'class_con/index?pid='+value_id;
}
</script>