Permalink
Browse files

fixed CheckedPassword widget

  • Loading branch information...
1 parent bdd1fa1 commit 4060514e72c5428bcc7a19e5481f58a85176e68e @blaflamme blaflamme committed Apr 6, 2012
@@ -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>
@@ -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>
+
@@ -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>

0 comments on commit 4060514

Please sign in to comment.