Add action buttons at the bottom of the product General tab

This commit is contained in:
touffies
2013-11-28 12:06:19 +01:00
parent ba48bc985e
commit 9d88552492

View File

@@ -11,54 +11,45 @@
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
}
{* Be sure to get the product ID, even if the form could not be validated *}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="general" />
{* Be sure to get the product ID, even if the form could not be validated*}
<input type="hidden" name="product_id" value="{$product_id}">
<input type="hidden" name="current_tab" value="general">
{form_hidden_fields form=$form}
{form_field form=$form field='id'}
<input type="hidden" name="{$name}" value="{$value}" />
<input type="hidden" name="{$name}" value="{$value}">
{/form_field}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" />
<input type="hidden" name="{$name}" value="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}">
{/form_field}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
<input type="hidden" name="{$name}" value="{$edit_language_locale}">
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
<div class="form-group">
<label class="control-label">
{intl l='Product reference'} :
</label>
<div class="well well-sm">{$REF}</div>
{form_field form=$form field='ref'}
<input type="hidden" name="{$name}" value="{$value}" />
{/form_field}
</div>
{include file="includes/standard-description-form-fields.html"}
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewritten URL'}" class="form-control">
</div>
{/form_field}
<div class="row">
<div class="col-md-6">
<div class="col-md-8">
{form_field form=$form field='ref'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :
</label>
<div class="control-input">
{* If ref's 'value is not empty the field is disable and the value is sent with an hidden field *}
<input type="text" id="{$label_attr.for}" {if $value}name="{$name}_disabled" disabled{else}name="{$name}"{/if} class="form-control" value="{$value}"{if $required} aria-required="true" required{/if}>
{if $value}<input type="hidden" name="{$name}" value="{$value}">{/if}
</div>
</div>
{/form_field}
{include file="includes/standard-description-form-fields.html"}
</div>
<div class="col-md-4">
{form_field form=$form field='default_category'}
<div class="form-group {if $error}has-error{/if}">
@@ -79,9 +70,6 @@
</div>
{/form_field}
</div>
<div class="col-md-6">
{form_field form=$form field='visible'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
@@ -96,16 +84,16 @@
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="control-group">
<label>&nbsp;</label>
<div class="controls">
<p>{intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
</div>
</div>
</div>
</div>
{include
file = "includes/inner-form-toolbar.html"
hide_submit_buttons = false
hide_flags = true
page_url = "{url path='/admin/products/update' product_id=$ID}"
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
}
<small>{intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</small>
</form>
{/form}