Introduced the automatic form fields binding.

This commit is contained in:
Franck Allimant
2014-06-26 10:41:26 +02:00
parent 114a55c1e8
commit ce3ed19b67
9 changed files with 238 additions and 212 deletions

View File

@@ -16,59 +16,26 @@
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{$closeUrl}">
{/form_field}
{admin_form_field form=$form name="success_url"}
{* Display error message if exist *}
{include file='includes/notifications.html' message=$form_error_message}
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :{if $required} <span class="required">*</span>{/if}
</label>
{admin_form_field_label form=$form name='url'}
<div class="input-group">
<span class="input-group-addon">{$url_language|default:{config key="url_site"}}</span>
<input type="text" id="{$label_attr.for}" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" {if $required} aria-required="true" required{/if} class="form-control" placeholder="{intl l='Use the keyword phrase in your URL.'}">
<span class="input-group-addon">{$url_language|default:{config key="url_site"}}/</span>
<input type="text" id="{$label_attr.for}" name="{$name}" value="{$value}" title="{$label}" {if $required} aria-required="true" required{/if} class="form-control" placeholder="{$label_attr.placeholder}">
</div>
</div>
{/form_field}
{form_field form=$form field='meta_title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :{if $required} <span class="required">*</span>{/if}
<span class="label-help-block">{intl l='The HTML TITLE element is the most important element on your web page.'}</span>
</label>
<div class="control-input">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}"{if $required} aria-required="true" required{/if} title="{$label}" placeholder="{intl l='Make sure that your title is clear, and contains many of the keywords within the page itself.'}">
</div>
</div>
{/form_field}
{form_field form=$form field='meta_description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :{if $required} <span class="required">*</span>{/if}
<span class="label-help-block">{intl l='Keep the most important part of your description in the first 150-160 characters.'}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="6"{if $required} aria-required="true" required{/if} placeholder="{intl l='Make sure it uses keywords found within the page itself.'}" class="form-control">{$value}</textarea>
</div>
{/form_field}
{form_field form=$form field='meta_keywords'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :{if $required} <span class="required">*</span>{/if}
<span class="label-help-block">{intl l='You don\'t need to use commas or other punctuations.'}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="3"{if $required} aria-required="true" required{/if} placeholder="{intl l='Don\'t repeat keywords over and over in a row. Rather, put in keyword phrases.'}" class="form-control">{$value}</textarea>
</div>
{/form_field}
{admin_form_field form=$form name="meta_title"}
{admin_form_field form=$form name="meta_description"}
{admin_form_field form=$form name="meta_keywords"}
{include
file = "includes/inner-form-toolbar.html"