Skip to content

Commit

Permalink
fixed CheckedPassword widget
Browse files Browse the repository at this point in the history
  • Loading branch information
blaflamme committed Apr 6, 2012
1 parent bdd1fa1 commit 4060514
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
25 changes: 15 additions & 10 deletions karl/ux2/forms/templates/formish/field/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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>

Original file line number Diff line number Diff line change
@@ -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.