Inital commit
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
<li>{intl l='Editing attribute "%name"' name={$TITLE}}</li>
|
||||
</ul>
|
||||
|
||||
{hook name="attribute-edit.top" attribute_id=$attribute_id}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
@@ -34,7 +36,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-container">
|
||||
{form name="thelia.admin.attribute.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/attributes/save'}" {form_enctype form=$form} class="clearfix">
|
||||
<form method="POST" action="{url path='/admin/configuration/attributes/save'}" {form_enctype} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/configuration/attributes'}"}
|
||||
|
||||
@@ -42,37 +44,37 @@
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Attribute information'}</p>
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
{form_field field='id'}
|
||||
<input type="hidden" name="{$name}" value="{$attribute_id}" />
|
||||
{/form_field}
|
||||
|
||||
{* Be sure to get the attribute ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="attribute_id" value="{$attribute_id}" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{form_field field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/attributes'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
{form_field field='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}
|
||||
|
||||
{include file="includes/standard-description-form-fields.html" form=$form}
|
||||
{include file="includes/standard-description-form-fields.html"}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<p class="title title-without-tabs">
|
||||
<p class="title title-without-tabs clearfix">
|
||||
|
||||
{intl l='Attribute values'}
|
||||
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<span class="pull-right">
|
||||
<a data-toggle="modal" href="#creation_dialog" title="Add a new attribute value" class="btn btn-default btn-primary">
|
||||
<a data-toggle="modal" href="#creation_dialog" title="Add a new attribute value" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</span>
|
||||
@@ -120,7 +122,7 @@
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='attributes_value_table_header'}
|
||||
{hook name="attributes-value.table-header" location="attributes_value_table_header" attribute_id=$attribute_id}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
@@ -148,16 +150,14 @@
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='attributes_value_table_row'}
|
||||
{hook name="attributes-value.table-row" location="attributes_value_table_row" attribute_id=$attribute_id}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -184,6 +184,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
{hook name="attribute-edit.bottom" attribute_id=$attribute_id}
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="attribute_edit"}
|
||||
@@ -206,21 +208,21 @@
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
|
||||
{capture "creation_dialog"}
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields}
|
||||
|
||||
{* Be sure to get the attribute ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="attribute_id" value="{$attribute_id}" />
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{form_field field='success_url'}
|
||||
{* on success, redirect to this page *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='attribute_id'}
|
||||
{form_field field='attribute_id'}
|
||||
<input type="hidden" name="{$name}" value="{$attribute_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
{form_field field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
@@ -232,14 +234,14 @@
|
||||
|
||||
<div class="help-block">{intl l="Enter here the value in the current edit language (%title)" title={$TITLE}}</div>
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
{form_field field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='attribute_value_create_form'}
|
||||
{hook name="attribute-value.create-form" location="attribute_value_create_form" }
|
||||
|
||||
{/capture}
|
||||
|
||||
@@ -253,7 +255,7 @@
|
||||
dialog_ok_label = {intl l="Create this value"}
|
||||
|
||||
form_action = {url path='/admin/configuration/attributes-av/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_enctype = {form_enctype}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
@@ -264,7 +266,7 @@
|
||||
<input type="hidden" name="attribute_id" value="{$attribute_id}" />
|
||||
<input type="hidden" name="attributeav_id" id="value_delete_id" value="" />
|
||||
|
||||
{module_include location='attribute_id_delete_form'}
|
||||
{hook name="attribute.id-delete-form" location="attribute_id_delete_form" attribute_id=$attribute_id}
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
@@ -274,7 +276,7 @@
|
||||
dialog_title = {intl l="Delete attribute value"}
|
||||
dialog_message = {intl l="Do you really want to delete this attribute value ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/attributes-av/delete'}
|
||||
form_action = {token_url path='/admin/configuration/attributes-av/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
|
||||
@@ -326,5 +328,6 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-last-call"}
|
||||
{module_include location='attribute-edit-js'}
|
||||
{hook name="attribute.edit-js" location="attribute-edit-js" attribute_id=$attribute_id}
|
||||
{hook name="wysiwyg.js" location="wysiwyg-attribute-edit-js" }
|
||||
{/block}
|
||||
Reference in New Issue
Block a user