Inital commit
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="country_edit" type="country" id="$country_id" backend_context="1" lang="$edit_language_id"}
|
||||
{loop name="country_edit" type="country" id="$country_id" backend_context="1" lang="$edit_language_id" visible="*"}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
@@ -23,6 +23,8 @@
|
||||
<li>{intl l='Editing country "%name"' name="{$TITLE}"}</li>
|
||||
</ul>
|
||||
|
||||
{hook name="country-edit.top" country_id=$country_id}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
@@ -35,83 +37,93 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.country.modification"}
|
||||
<form method="POST" action="{url path="/admin/configuration/country/save/{$ID}"}" {form_enctype form=$form} class="clearfix">
|
||||
<form method="POST" action="{url path="/admin/configuration/country/save/%id" id=$ID}" {form_enctype} class="clearfix">
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
|
||||
page_url = {url path="/admin/configuration/country/update/$ID"}
|
||||
page_url = {url path="/admin/configuration/country/update/%id" id=$ID}
|
||||
close_url = {url path="/admin/configuration/countries"}
|
||||
}
|
||||
|
||||
{* Be sure to get the country ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="country_id" value="{$country_id}" />
|
||||
|
||||
{form_hidden_fields exclude="locale"}
|
||||
|
||||
{render_form_field field='success_url' value={url path="/admin/configuration/countries"}}
|
||||
{render_form_field field='locale' value={$edit_language_locale}}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{* Be sure to get the country ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="country_id" value="{$country_id}" />
|
||||
<div class="col-md-6">
|
||||
{render_form_field field="visible"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/configuration/countries"}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form 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}
|
||||
|
||||
{form_field form=$form field='area'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isocode'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='ISO Code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha2'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Alpha code 2'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha3'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Alpha code 3'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<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}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Country title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='chapo'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Country short description'}">{$value}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Country description'}">{$value}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
{include file="includes/standard-description-form-fields.html"}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{render_form_field field="isocode"}
|
||||
{render_form_field field="isoalpha2"}
|
||||
{render_form_field field="isoalpha3"}
|
||||
|
||||
{render_form_field field="has_states"}
|
||||
{render_form_field field="need_zip_code"}
|
||||
{render_form_field field="zip_code_format"}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{intl l="Shipping zones for this country"}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{ifloop rel="country-areas"}
|
||||
<ul class="list-unstyled">
|
||||
{loop name="country-areas" type="area" country=$country_id backend_context="1"}
|
||||
<li><a href="">{$NAME}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
{elseloop rel="country-areas"}
|
||||
<div class="alert alert-warning">{intl l="This country is not included in any shipping zone"}</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
{ifloop rel="states"}
|
||||
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.state" access="UPDATE"}
|
||||
{$canEditState=true}
|
||||
{/loop}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{intl l="States/provinces assigned to this country"}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
<tbody>
|
||||
{loop name="states" type="state" country=$country_id visible="*" backend_context="1"}
|
||||
<tr>
|
||||
<td>{$ID}. {$TITLE}</td>
|
||||
{if $canEditState}
|
||||
<td class="text-center">
|
||||
<a title="{intl l='Change this state'}" href="{url path="/admin/configuration/state/update/%id" id=$ID}">{intl l="Edit"}</a>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/ifloop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -120,6 +132,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
{hook name="country-edit.bottom" country_id=$country_id}
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="country_edit"}
|
||||
@@ -137,5 +151,6 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-last-call"}
|
||||
{module_include location='country-edit-js'}
|
||||
{hook name="country.edit-js" location="country-edit-js" country_id=$country_id }
|
||||
{hook name="wysiwyg.js" location="wysiwyg-country-edit-js" }
|
||||
{/block}
|
||||
Reference in New Issue
Block a user