Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed CheckedPassword widget

  • Loading branch information...
commit 4060514e72c5428bcc7a19e5481f58a85176e68e 1 parent bdd1fa1
@blaflamme blaflamme authored
View
25 karl/ux2/forms/templates/formish/field/main.html
@@ -2,14 +2,19 @@
tal:define="show_label field.widget.show_label|True;
show_description field.widget.show_description|True">
<!-- field/main.html -->
- <label tal:condition="show_label and field.widget.type != 'Hidden' and
- '.' not in field.name"
- for="${field.cssname}"
- tal:attributes="class field.required and 'required' and 'control-label' or
- 'control-label'">${field.title}</label>
- <div class="controls" tal:omit-tag="not show_label">
- <span tal:content="structure:field.widget()" tal:omit-tag></span>
- <span tal:condition="field.error" class="help-inline">${unicode(field.error)}</span>
- <p class="fieldHelp help-block" tal:condition="str(field.description) != '' and show_description">${field.description}</p>
- </div>
+ <div tal:condition="field.widget.type in ('CheckedPassword',)" tal:omit-tag>
+ <span tal:content="structure:field.widget()" tal:omit-tag></span>
+ </div>
+ <div tal:condition="field.widget.type not in ('CheckedPassword',)" tal:omit-tag>
+ <label tal:condition="show_label and field.widget.type != 'Hidden' and
+ '.' not in field.name"
+ for="${field.cssname}"
+ tal:attributes="class field.required and 'required' and 'control-label' or
+ 'control-label'">${field.title}</label>
+ <div class="controls" tal:omit-tag="not show_label">
+ <span tal:content="structure:field.widget()" tal:omit-tag></span>
+ <span tal:condition="field.error" class="help-inline">${unicode(field.error)}</span>
+ <p class="fieldHelp help-block" tal:condition="str(field.description) != '' and show_description">${field.description}</p>
+ </div>
+ </div>
</div>
View
7 karl/ux2/forms/templates/formish/widgets/KarlCheckedPassword/readonly.html
@@ -0,0 +1,7 @@
+<div id="${field.cssname}">${field.defaults}</div>
+
+<label for="${field.cssname}" tal:attributes="class field.required and 'required' and 'control-label'">Password</label>
+<div class="controls">
+ <div id="${field.cssname}">${field.defaults}</div>
+</div>
+
View
10 karl/ux2/forms/templates/formish/widgets/KarlCheckedPassword/widget.html
@@ -0,0 +1,10 @@
+<label for="${field.cssname}" tal:attributes="class field.required and 'required' and 'control-label'">Password</label>
+<div class="controls">
+ <input id="${field.cssname}" type="password" name="${field.name}.password" value="${field.value['password'][0]}" />
+ <span tal:condition="field.error" class="help-inline">${unicode(field.error)}</span>
+</div>
+<label for="${field.cssname}-confirm" tal:attributes="class field.required and 'required' and 'control-label'">Confirm</label>
+<div class="controls">
+ <input id="${field.cssname}-confirm" type="password" name="${field.name}.confirm" value="${field.value['confirm'][0]}" />
+ <span tal:condition="field.error" class="help-inline">${unicode(field.error)}</span>
+</div>
Please sign in to comment.
Something went wrong with that request. Please try again.