-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-test.jade
59 lines (45 loc) · 1.55 KB
/
form-test.jade
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
body
.row
.col-sm-4
+loginButtons
.col-sm-6
+changePasswordForm
.col-sm-2
template(name="changePasswordForm")
+formBlock(schema=schema action=action)
+passwordField(field="currentPassword")
+passwordField(field="newPassword")
+passwordField(field="confirmPassword")
template(name="formBlock")
form
+UI.contentBlock data=data context=context
p
button.btn.btn-default(type="submit" disabled='{{#if isNull invalidCount success}}disabled{{/if}}') Submit
span
if loading
| Loading...
if invalid
| Can't submit! There are {{invalidCount}} invalid fields!
if failed
| There was a problem submitting the form!
if success
| Success! Form submitted (to nowhere)
template(name="inputField")
.form-groupdiv(class="{{#unless and submitted success}}{{#unless valid}}has-success{{/unless}}{{/unless}}")
+bootstrapLabel
input.form-control.reactive-element(type="text", name="{{field}}", value="{{value}}")
+bootstrapErrorMsg
template(name="passwordField")
.form-groupdiv(class="{{#unless success}}{{#if valid}}has-success{{/if}}{{/unless}}")
label.control-label
{{schema.label}}
span
input.form-control.reactive-element(type="password", name="{{field}}", placeholder="{{schema.instructions}}", value="{{value}}")
unless success
if valid
span.glyphicon.glyphicon-ok(aria-hidden="true")
p.help-block
if ../valid
| {{instructions}}
else
| {{errorMessage}}