147 lines
9.9 KiB
HTML
147 lines
9.9 KiB
HTML
{extends file="admin-layout.tpl"}
|
|
|
|
{block name="page-title"}{intl l='Edit a country'}{/block}
|
|
|
|
{block name="check-permissions"}admin.configuration.countries.edit{/block}
|
|
|
|
{block name="main-content"}
|
|
<div class="countries edit-country">
|
|
|
|
<div id="wrapper" class="container">
|
|
|
|
{loop name="country_edit" type="country" id="$country_id" backend_context="1" lang="$edit_language_id"}
|
|
|
|
<ul class="breadcrumb">
|
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
|
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
|
<li><a href="{url path='/admin/configuration/countries'}">{intl l="Countries"}</a></li>
|
|
<li>{intl l='Editing country "%name"' name="{$TITLE}"}</li>
|
|
</ul>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12 general-block-decorator">
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 title title-without-tabs">
|
|
{intl l="Edit country $TITLE"}
|
|
</div>
|
|
|
|
<div class="form-container">
|
|
<div class="col-md-12">
|
|
|
|
{form name="thelia.admin.country.modification"}
|
|
<form method="POST" action="{url path='/admin/configuration/countries/save'}" {form_enctype form=$form} class="clearfix">
|
|
|
|
<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}" />
|
|
|
|
{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}
|
|
|
|
{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">{intl l="{$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">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$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">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$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">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
|
|
</div>
|
|
{/form_field}
|
|
</div>
|
|
|
|
<div class="col-md-12 title title-without-tabs">
|
|
{intl l="Translations"}
|
|
</div>
|
|
|
|
{loop type="lang" name="lang"}
|
|
<div class="col-md-3">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">
|
|
<img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}"> {$TITLE}
|
|
</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
{form_field form=$form field='title'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{intl l="{$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">{intl l="{$label}"} : </label>
|
|
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l=""}" placeholder="{intl l='Country short description'}"></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">{intl l="{$label}"} : </label>
|
|
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country description'}"></textarea>
|
|
</div>
|
|
{/form_field}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/loop}
|
|
|
|
<div class="col-md-12 text-right">
|
|
<button type="submit" class="btn btn-default btn-primary" title="{intl l='Add a new country'}">
|
|
{intl l="Save"}
|
|
<span class="glyphicon glyphicon-ok"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{/form}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/loop}
|
|
|
|
{elseloop rel="country_edit"}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="alert alert-error">
|
|
{intl l="Sorry, country ID=$country_id was not found."}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/elseloop}
|
|
|
|
</div>
|
|
</div>
|
|
{/block} |