base_pbb_formulir.pt
2.08 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<div i18n:domain="deform"
tal:omit-tag=""
tal:define="oid oid|field.oid;
name name|field.name;
css_class css_class|field.widget.css_class;
style style|field.widget.style;">
${field.start_mapping()}
<div class="row">
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">
<input type="text" name="year" value="${year}"
class="span2 form-control ${css_class or ''}"
tal:attributes="style style;
year_attributes|field.widget.year_attributes|{};"
maxlength="4" minlength="4" placeholder="Tahun"
id="${oid}"/>
</span>
<span class="input-group-addon">
<input type="text" name="bundle" value="${bundle}"
class="span2 form-control ${css_class or ''}"
tal:attributes="style style;
bundle_attributes|field.widget.bundle_attributes|{};"
maxlength="4" minlength="4" placeholder="Bundle"
id="${oid}-bundle"/>
</span>
<span class="input-group-addon">
<input type="text" name="seq" value="${seq}"
class="span2 form-control ${css_class or ''}"
tal:attributes="style style;
seq_attributes|field.widget.seq_attributes|{};"
maxlength="3" minlength="3" placeholder="Urut"
id="${oid}-seq"/>
</span>
</div>
</div>
</div>
<script>
deform.addCallback(
'${oid}',
function (oid) {
$("#" + oid).mask("9999",
{placeholder:"_"});
});
deform.addCallback(
'${oid}_bundle',
function (oid_bundle) {
$("#" + oid_bundle).mask("9999",
{placeholder:"_"});
});
deform.addCallback(
'${oid}_seq',
function (oid_seq) {
$("#" + oid_seq).mask("999",
{placeholder:"_"});
});
</script>
${field.end_mapping()}
</div>