Review html for the forms

- Remove icon error from html (Added with css)
- Add maxlenght
- Remove class has-success
- Translate placeholder
- Confirm dialog to delete an address
This commit is contained in:
touffies
2013-11-05 15:49:55 +01:00
parent 0431010a65
commit aa030f20ea
12 changed files with 222 additions and 273 deletions

View File

@@ -41,12 +41,14 @@
<div class="panel-body">
{form_field form=$form field="password_old"}
<div class="form-group group-password_old {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-password_old{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value}" {if $required} aria-required="true" required{/if}{if $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" value="{$value}" {if $required} aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
{if $error}
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
{/if}
</div>
@@ -54,25 +56,24 @@
{/form_field}
{form_field form=$form field="password"}
<div class="form-group group-password {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-password{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="password_confirm"}
<div class="form-group group-password_confirm {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-password_confirm{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{assign var="error_focus" value="true"}
<span class="help-block">{$message}</span>
{/if}
</div>
</div><!--/.form-group-->