You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
2.0 KiB
46 lines
2.0 KiB
<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; |
|
required required|'required' if field.required else None; |
|
was_validated True if field.get_root().error else False; |
|
is_invalid is_invalid|field.error and not field.widget.hidden and not field.typ.__class__.__name__=='Mapping'; |
|
is_valid was_validated and not is_invalid; |
|
"> |
|
${field.start_mapping()} |
|
<div> |
|
<input type="password" |
|
name="${name}" |
|
value="${field.widget.redisplay and cstruct or ''}" |
|
tal:attributes="class string: form-control ${css_class or ''} ${'is-invalid' if is_invalid else ''} ${'is-valid' if is_valid else ''}; |
|
style style; |
|
required required;" |
|
id="${oid}" |
|
i18n:attributes="placeholder" |
|
placeholder="Password"/> |
|
</div> |
|
<div class="mt-2"> |
|
<input type="password" |
|
name="${name}-confirm" |
|
value="${field.widget.redisplay and confirm or ''}" |
|
tal:attributes="class string: form-control ${css_class or ''} ${'is-invalid' if is_invalid else ''} ${'is-valid' if is_valid else ''}; |
|
style style; |
|
required required;" |
|
id="${oid}-confirm" |
|
i18n:attributes="placeholder" |
|
placeholder="Confirm Password"/> |
|
|
|
<!--! error message must directly follow input field for bootstrap 4 --> |
|
<div class="invalid-feedback" |
|
tal:define="errstr 'error-%s' % field.oid" |
|
tal:repeat="msg field.error.messages()" |
|
i18n:translate="" |
|
tal:attributes="id repeat.msg.index==0 and errstr or |
|
('%s-%s' % (errstr, repeat.msg.index))" |
|
tal:condition="is_invalid"> |
|
${msg} |
|
</div> |
|
</div> |
|
${field.end_mapping()} |
|
</div>
|
|
|