// update preferences tab

This commit is contained in:
Sarah Lorenzini
2013-08-01 16:26:02 +02:00
parent 5defc39def
commit 680497f1e3
9 changed files with 129 additions and 156 deletions
@@ -68,12 +68,9 @@
{/block}
{block name="leadin"}
<div class="warn draft" style="{if $active}display:none{/if}">
<p>
<span style="float: left">
{l s='Your CMS page will be saved as a draft'}
</span>
<br class="clear" />
<div style="{if $active}display:none{/if}">
<p class="alert alert-block">
{l s='Your CMS page will be saved as a draft'}
</p>
</div>
{/block}
@@ -55,38 +55,42 @@
{if $key == 'rightCols'}
{foreach $field as $input}
{if $input.type == 'file'}
<label style="text-align: left; width: inherit;width:250px;text-align:right">{$input.label} </label>
<div class="margin-form">
<input type="file" name="{$input.name}" />
<p class="clear">{$input.desc}</p>
{if isset($fields_value.image) && $fields_value.image}
<div id="image" style="width:370px;">
{$fields_value.image}
<p align="center">{l s='File size'} {$fields_value.size}kb</p>
<a href="{$current}&id_store={$form_id}&token={$token}&deleteImage=1">
<img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'}
</a>
</div>
{/if}
<div class="row">
<label class="control-label col-lg-3">{$input.label} </label>
<div class="col-lg-6">
<input type="file" name="{$input.name}" />
<p>{$input.desc}</p>
{if isset($fields_value.image) && $fields_value.image}
<div id="image">
{$fields_value.image}
<p>{l s='File size'} {$fields_value.size}kb</p>
<a href="{$current}&id_store={$form_id}&token={$token}&deleteImage=1" class="btn btn-primary">
<i class="icon-remove"></i>
{l s='Delete'}
</a>
</div>
{/if}
</div>
</div>
{/if}
<table cellpadding="2" cellspacing="2" style="padding: 10px; margin: 15px 0 20px 260px; border: 1px solid #BBB;">
<tr>
<th colspan="2">{l s='Hours:'}</th>
</tr>
<tr>
<td>&nbsp;</td>
<td style="font-size: 0.85em;">{l s='e.g. 10:00AM - 9:30PM'}</td>
</tr>
{foreach $fields_value.days as $k => $value}
<tr style="color: #7F7F7F; font-size: 0.85em;">
<td>{$value}</td>
<td><input type="text" size="25" name="hours_{$k}" value="{if isset($fields_value.hours[$k-1])}{$fields_value.hours[$k-1]|escape:'htmlall'}{/if}" /><br /></td>
</tr>
{/foreach}
</table>
<div class="clear"></div>
<div class="row">
<table class="table">
<thead>
<tr>
<th>{l s='Hours:'}</th>
<th>{l s='e.g. 10:00AM - 9:30PM'}</th>
</tr>
</thead>
<tbody>
{foreach $fields_value.days as $k => $value}
<tr style="color: #7F7F7F; font-size: 0.85em;">
<td>{$value}</td>
<td><input type="text" size="25" name="hours_{$k}" value="{if isset($fields_value.hours[$k-1])}{$fields_value.hours[$k-1]|escape:'htmlall'}{/if}" /><br /></td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/foreach}
{/if}
{/block}
@@ -33,6 +33,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
$this->is_cms = true;
$this->table = 'cms_category';
$this->className = 'CMSCategory';
@@ -221,7 +222,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('CMS Category'),
'image' => '../img/admin/tab-categories.gif'
'icon' => 'icon-folder-close'
),
'input' => array(
array(
@@ -230,15 +231,13 @@ class AdminCmsCategoriesControllerCore extends AdminController
'name' => 'name',
'required' => true,
'lang' => true,
'class' => 'copy2friendlyUrl',
'hint' => $this->l('Invalid characters:').' <>;=#{}'
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Displayed:'),
'name' => 'active',
'required' => false,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
@@ -269,28 +268,28 @@ class AdminCmsCategoriesControllerCore extends AdminController
'lang' => true,
'rows' => 5,
'cols' => 40,
'hint' => $this->l('Invalid characters:').' <>;=#{}'
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'text',
'label' => $this->l('Meta title:'),
'name' => 'meta_title',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}'
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'text',
'label' => $this->l('Meta description:'),
'name' => 'meta_description',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}'
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'text',
'label' => $this->l('Meta keywords:'),
'name' => 'meta_keywords',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}'
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'text',
@@ -303,7 +302,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'button'
'class' => 'btn btn-primary'
)
);
$this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
+10 -12
View File
@@ -34,6 +34,7 @@ class AdminCmsControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
$this->table = 'cms';
$this->className = 'CMS';
$this->lang = true;
@@ -94,7 +95,7 @@ class AdminCmsControllerCore extends AdminController
'tinymce' => true,
'legend' => array(
'title' => $this->l('CMS Page'),
'image' => '../img/admin/tab-categories.gif'
'icon' => 'icon-folder-close'
),
'input' => array(
// custom template
@@ -113,26 +114,24 @@ class AdminCmsControllerCore extends AdminController
'id' => 'name', // for copy2friendlyUrl compatibility
'lang' => true,
'required' => true,
'class' => 'copy2friendlyUrl',
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'size' => 50
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'text',
'label' => $this->l('Meta description'),
'name' => 'meta_description',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'size' => 70
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
'type' => 'tags',
'label' => $this->l('Meta keywords'),
'name' => 'meta_keywords',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'size' => 70,
'desc' => $this->l('To add "tags" click in the field, write something, and then press "Enter."')
'hint' => array(
$this->l('Invalid characters:').' &lt;&gt;;=#{}',
$this->l('To add "tags" click in the field, write something, and then press "Enter."')
)
),
array(
'type' => 'text',
@@ -153,11 +152,10 @@ class AdminCmsControllerCore extends AdminController
'hint' => $this->l('Invalid characters:').' <>;=#{}'
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Displayed:'),
'name' => 'active',
'required' => false,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
@@ -175,7 +173,7 @@ class AdminCmsControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'button'
'class' => 'btn btn-primary'
)
);
@@ -30,6 +30,7 @@ class AdminGeolocationControllerCore extends AdminController
{
parent::__construct();
$this->bootstrap = true;
$this->fields_options = array(
'geolocationConfiguration' => array(
'title' => $this->l('Geolocation by IP address'),
@@ -37,7 +38,7 @@ class AdminGeolocationControllerCore extends AdminController
'fields' => array(
'PS_GEOLOCATION_ENABLED' => array(
'title' => $this->l('Geolocation by IP address'),
'desc' => $this->l('This option allows you, among other things, to restrict access to your shop for certain countries. See below.'),
'hint' => $this->l('This option allows you, among other things, to restrict access to your shop for certain countries. See below.'),
'validation' => 'isUnsignedId',
'cast' => 'intval',
'type' => 'bool'
+24 -28
View File
@@ -74,7 +74,7 @@ class AdminImagesControllerCore extends AdminController
),
'PS_JPEG_QUALITY' => array(
'title' => $this->l('JPEG quality'),
'desc' => $this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file).'),
'hint' => $this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file).'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
@@ -82,7 +82,7 @@ class AdminImagesControllerCore extends AdminController
),
'PS_PNG_QUALITY' => array(
'title' => $this->l('PNG quality'),
'desc' => $this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file).'),
'hint' => $this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file).'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
@@ -119,7 +119,7 @@ class AdminImagesControllerCore extends AdminController
),
'PS_PRODUCT_PICTURE_MAX_SIZE' => array(
'title' => $this->l('Maximum size of product pictures'),
'desc' => $this->l('The maximum size of pictures uploadable by customers (in Bytes).'),
'hint' => $this->l('The maximum size of pictures uploadable by customers (in Bytes).'),
'validation' => 'isUnsignedInt',
'required' => true,
'cast' => 'intval',
@@ -129,7 +129,7 @@ class AdminImagesControllerCore extends AdminController
),
'PS_PRODUCT_PICTURE_WIDTH' => array(
'title' => $this->l('Product picture width'),
'desc' => $this->l('The maximum width of pictures uploadable by customers.'),
'hint' => $this->l('The maximum width of pictures uploadable by customers.'),
'validation' => 'isUnsignedInt',
'required' => true,
'cast' => 'intval',
@@ -139,7 +139,7 @@ class AdminImagesControllerCore extends AdminController
),
'PS_PRODUCT_PICTURE_HEIGHT' => array(
'title' => $this->l('Product picture height'),
'desc' => $this->l('The maximum height of pictures uploadable by customers.'),
'hint' => $this->l('The maximum height of pictures uploadable by customers.'),
'validation' => 'isUnsignedInt',
'required' => true,
'cast' => 'intval',
@@ -155,7 +155,7 @@ class AdminImagesControllerCore extends AdminController
if ($this->display_move)
$this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array(
'title' => $this->l('Use the legacy image filesystem'),
'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
'hint' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -166,7 +166,7 @@ class AdminImagesControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('images'),
'image' => '../img/admin/picture.gif'
'icon' => 'icon-picture'
),
'input' => array(
array(
@@ -174,7 +174,7 @@ class AdminImagesControllerCore extends AdminController
'label' => $this->l('Type name'),
'name' => 'name',
'required' => true,
'desc' => $this->l('Letters and hyphens only (e.g. small, medium, large, extra-large)')
'hint' => $this->l('Letters and hyphens only (e.g. small, medium, large, extra-large)')
),
array(
'type' => 'text',
@@ -182,7 +182,7 @@ class AdminImagesControllerCore extends AdminController
'name' => 'width',
'required' => true,
'maxlength' => 5,
'desc' => $this->l('Maximum image width in pixels')
'hint' => $this->l('Maximum image width in pixels')
),
array(
'type' => 'text',
@@ -190,16 +190,15 @@ class AdminImagesControllerCore extends AdminController
'name' => 'height',
'required' => true,
'maxlength' => 5,
'desc' => $this->l('Maximum image height in pixels')
'hint' => $this->l('Maximum image height in pixels')
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Products'),
'name' => 'products',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('This type will be used for Product images'),
'hint' => $this->l('This type will be used for Product images'),
'values' => array(
array(
'id' => 'products_on',
@@ -214,13 +213,13 @@ class AdminImagesControllerCore extends AdminController
)
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Categories'),
'name' => 'categories',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('This type will be applied to Category images.'),
'hint' => $this->l('This type will be applied to Category images.'),
'values' => array(
array(
'id' => 'categories_on',
@@ -235,13 +234,12 @@ class AdminImagesControllerCore extends AdminController
)
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Manufacturers'),
'name' => 'manufacturers',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('This type will be applied to Manufacturer images.'),
'hint' => $this->l('This type will be applied to Manufacturer images.'),
'values' => array(
array(
'id' => 'manufacturers_on',
@@ -256,13 +254,12 @@ class AdminImagesControllerCore extends AdminController
)
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Suppliers'),
'name' => 'suppliers',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('This type will be used for Supplier images.'),
'hint' => $this->l('This type will be used for Supplier images.'),
'values' => array(
array(
'id' => 'suppliers_on',
@@ -277,13 +274,13 @@ class AdminImagesControllerCore extends AdminController
)
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Scenes'),
'name' => 'scenes',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('This type will be used for Scene images.'),
'hint' => $this->l('This type will be used for Scene images.'),
'values' => array(
array(
'id' => 'scenes_on',
@@ -298,13 +295,12 @@ class AdminImagesControllerCore extends AdminController
)
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Stores'),
'name' => 'stores',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('This type will be used for Store images.'),
'hint' => $this->l('This type will be used for Store images.'),
'values' => array(
array(
'id' => 'stores_on',
@@ -320,8 +316,8 @@ class AdminImagesControllerCore extends AdminController
),
),
'submit' => array(
'title' => $this->l('Save '),
'class' => 'button'
'title' => $this->l('Save'),
'class' => 'btn btn-primary'
)
);
@@ -28,6 +28,7 @@ class AdminMaintenanceControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->className = 'Configuration';
$this->table = 'configuration';
@@ -40,21 +41,20 @@ class AdminMaintenanceControllerCore extends AdminController
'fields' => array(
'PS_SHOP_ENABLE' => array(
'title' => $this->l('Enable Shop'),
'desc' => $this->l('Activate or deactivate your shop (It is a good idea to deactivate your shop while you perform maintenance. Please note that the webservice will not be disabled).'),
'hint' => $this->l('Activate or deactivate your shop (It is a good idea to deactivate your shop while you perform maintenance. Please note that the webservice will not be disabled).'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
'PS_MAINTENANCE_IP' => array(
'title' => $this->l('Maintenance IP'),
'desc' => $this->l('IP addresses allowed to access the Front Office even if the shop is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'),
'hint' => $this->l('IP addresses allowed to access the Front Office even if the shop is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'),
'validation' => 'isGenericName',
'type' => 'maintenance_ip',
'size' => 30,
'default' => ''
),
),
'submit' => array('title' => $this->l('Save'), 'class' => 'button'),
'submit' => array('title' => $this->l('Save'), 'class' => 'btn btn-default'),
),
);
}
+20 -26
View File
@@ -30,6 +30,7 @@ class AdminSearchConfControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
$this->table = 'alias';
$this->className = 'Alias';
$this->lang = false;
@@ -64,13 +65,13 @@ class AdminSearchConfControllerCore extends AdminController
'icon' => 'search',
'info' =>
$this->l('The "indexed" products have been analyzed by PrestaShop and will appear in the results of a Front Office search.').'<br />
'.$this->l('Indexed products').' <b>'.(int)$indexed.' / '.(int)$total.'</b>.
'.$this->l('Indexed products').' <strong>'.(int)$indexed.' / '.(int)$total.'</strong>.
</p>
<p>'.$this->l('Building the product index may take a few minutes.')
.$this->l('If your server stops before the process ends, you can resume the indexation by clicking "Add missing products."').'</p>
-&gt; <a href="searchcron.php?token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1" class="bold">'.
$this->l('Add missing products to the index.').'</a><br />
-&gt; <a href="searchcron.php?full=1&token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1" class="bold">'.
-&gt; <a href="searchcron.php?full=1&token='.substr(_COOKIE_KEY_, 34, 8).'&redirect=1">'.
$this->l('Re-build the entire index.').'</a><br /><br />
'.$this->l('You can set a cron job that will rebuild your index using the following URL:').' <a href="'.$cron_url.'">'.$cron_url.'</a>',
'fields' => array(
@@ -92,28 +93,32 @@ class AdminSearchConfControllerCore extends AdminController
'validation' => 'isBool',
'type' => 'bool',
'cast' => 'intval',
'desc' => $this->l('Enable ajax search for your visitors.').'<br />'.
$this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')),
'hint' => array(
$this->l('Enable ajax search for your visitors.'),
$this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')
)
),
'PS_INSTANT_SEARCH' => array(
'title' => $this->l('Instant search'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
'desc' => $this->l('Enable instant search for your visitors?').'<br />'.
$this->l('With instant search, the results will appear immediately as the user writes a query.')),
'hint' => array(
$this->l('Enable instant search for your visitors?'),
$this->l('With instant search, the results will appear immediately as the user writes a query.')
)
),
'PS_SEARCH_MINWORDLEN' => array(
'title' => $this->l('Minimum word length (in characters)'),
'desc' => $this->l('Only words this size or larger will be indexed.'),
'size' => 4,
'hint' => $this->l('Only words this size or larger will be indexed.'),
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_BLACKLIST' => array(
'title' => $this->l('Blacklisted words'),
'size' => 35,
'validation' => 'isGenericName',
'desc' => $this->l('Please enter the index words separated by a "|".'),
'hint' => $this->l('Please enter the index words separated by a "|".'),
'type' => 'textLang'
)
),
@@ -129,63 +134,54 @@ class AdminSearchConfControllerCore extends AdminController
'fields' => array(
'PS_SEARCH_WEIGHT_PNAME' => array(
'title' => $this->l('Product name weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_REF' => array(
'title' => $this->l('Reference weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_SHORTDESC' => array(
'title' => $this->l('Short description weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_DESC' => array(
'title' => $this->l('Description weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_CNAME' => array(
'title' => $this->l('Category weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_MNAME' => array(
'title' => $this->l('Manufacturer weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_TAG' => array(
'title' => $this->l('Tags weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_ATTRIBUTE' => array(
'title' => $this->l('Attributes weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
),
'PS_SEARCH_WEIGHT_FEATURE' => array(
'title' => $this->l('Features weight'),
'size' => 4,
'validation' => 'isUnsignedInt',
'type' => 'text',
'cast' => 'intval'
@@ -230,32 +226,30 @@ class AdminSearchConfControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Aliases'),
'image' => '../img/admin/search.gif'
'icon' => 'icon-search'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Alias:'),
'name' => 'alias',
'size' => 40,
'required' => true,
'desc' => array(
'hint' => array(
$this->l('Enter each alias separated by a comma (e.g. \'prestshop,preztashop,prestasohp\')'),
$this->l('Forbidden characters: <>;=#{}')
$this->l('Forbidden characters: &lt;&gt;;=#{}')
)
),
array(
'type' => 'text',
'label' => $this->l('Result:'),
'name' => 'search',
'size' => 15,
'required' => true,
'desc' => $this->l('Search this word instead.')
'hint' => $this->l('Search this word instead.')
)
),
'submit' => array(
'title' => $this->l('Save'),
'class' => 'button'
'class' => 'btn btn-default'
)
);
+23 -39
View File
@@ -28,6 +28,7 @@ class AdminStoresControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->table = 'store';
$this->className = 'Store';
$this->lang = false;
@@ -68,32 +69,32 @@ class AdminStoresControllerCore extends AdminController
'fields' => array(
'PS_STORES_DISPLAY_FOOTER' => array(
'title' => $this->l('Display in the footer'),
'desc' => $this->l('Display a link to the store locator in the footer'),
'hint' => $this->l('Display a link to the store locator in the footer'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_DISPLAY_SITEMAP' => array(
'title' => $this->l('Display in the sitemap page'),
'desc' => $this->l('Display a link to the store locator in the sitemap page'),
'hint' => $this->l('Display a link to the store locator in the sitemap page'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_SIMPLIFIED' => array(
'title' => $this->l('Show a simplified store locator'),
'desc' => $this->l('No map, no search, only a store directory'),
'hint' => $this->l('No map, no search, only a store directory'),
'cast' => 'intval',
'type' => 'bool'
),
'PS_STORES_CENTER_LAT' => array(
'title' => $this->l('Latitude by default'),
'desc' => $this->l('Used for the position by default of the map'),
'hint' => $this->l('Used for the position by default of the map'),
'cast' => 'floatval',
'type' => 'text',
'size' => '10'
),
'PS_STORES_CENTER_LONG' => array(
'title' => $this->l('Longitude by default'),
'desc' => $this->l('Used for the position by default of the map'),
'hint' => $this->l('Used for the position by default of the map'),
'cast' => 'floatval',
'type' => 'text',
'size' => '10'
@@ -153,43 +154,40 @@ class AdminStoresControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Stores'),
'image' => '../img/admin/home.gif'
'icon' => 'icon-home'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Name'),
'name' => 'name',
'size' => 33,
'required' => false,
'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'),
'desc' => $this->l('Store name (e.g. City Center Mall Store)')
'hint' => array(
$this->l('Allowed characters: letters, spaces and %s'), '().-',
$this->l('Store name (e.g. City Center Mall Store)')
)
),
array(
'type' => 'text',
'label' => $this->l('Address'),
'name' => 'address1',
'size' => 33,
'required' => true
),
array(
'type' => 'text',
'label' => $this->l('Address (2)'),
'name' => 'address2',
'size' => 33
'name' => 'address2'
),
array(
'type' => 'text',
'label' => $this->l('Postal Code/Zip Code'),
'name' => 'postcode',
'size' => 6,
'required' => true
),
array(
'type' => 'text',
'label' => $this->l('City'),
'name' => 'city',
'size' => 33,
'required' => true
),
array(
@@ -220,27 +218,23 @@ class AdminStoresControllerCore extends AdminController
'label' => $this->l('Latitude / Longitude'),
'name' => 'latitude',
'required' => true,
'size' => 11,
'maxlength' => 12,
'desc' => $this->l('Store coordinates (e.g. 45.265469/-47.226478)')
'hint' => $this->l('Store coordinates (e.g. 45.265469/-47.226478)')
),
array(
'type' => 'text',
'label' => $this->l('Phone'),
'name' => 'phone',
'size' => 33
'name' => 'phone'
),
array(
'type' => 'text',
'label' => $this->l('Fax'),
'name' => 'fax',
'size' => 33
'name' => 'fax'
),
array(
'type' => 'text',
'label' => $this->l('Email address'),
'name' => 'email',
'size' => 33
'name' => 'email'
),
array(
'type' => 'textarea',
@@ -250,11 +244,10 @@ class AdminStoresControllerCore extends AdminController
'rows' => 4
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Status'),
'name' => 'active',
'required' => false,
'class' => 't',
'is_bool' => true,
'values' => array(
array(
@@ -268,7 +261,7 @@ class AdminStoresControllerCore extends AdminController
'label' => $this->l('Disabled')
)
),
'desc' => $this->l('Whether or not to display this store')
'hint' => $this->l('Whether or not to display this store')
)
),
'rightCols' => array (
@@ -276,12 +269,12 @@ class AdminStoresControllerCore extends AdminController
'type' => 'file',
'label' => $this->l('Picture'),
'name' => 'image',
'desc' => $this->l('Storefront picture')
'hint' => $this->l('Storefront picture')
)
),
'submit' => array(
'title' => $this->l(' Save '),
'class' => 'button'
'class' => 'btn btn-default'
)
);
@@ -413,24 +406,21 @@ class AdminStoresControllerCore extends AdminController
$formFields = array(
'PS_SHOP_NAME' => array(
'title' => $this->l('Shop name'),
'desc' => $this->l('Displayed in emails and page titles'),
'hint' => $this->l('Displayed in emails and page titles'),
'validation' => 'isGenericName',
'required' => true,
'size' => 30,
'type' => 'text'
),
'PS_SHOP_EMAIL' => array('title' => $this->l('Shop email'),
'desc' => $this->l('Displayed in emails sent to customers'),
'hint' => $this->l('Displayed in emails sent to customers'),
'validation' => 'isEmail',
'required' => true,
'size' => 30,
'type' => 'text'
),
'PS_SHOP_DETAILS' => array(
'title' => $this->l('Registration'),
'desc' => $this->l('Shop registration information (e.g. SIRET or RCS)'),
'hint' => $this->l('Shop registration information (e.g. SIRET or RCS)'),
'validation' => 'isGenericName',
'size' => 30,
'type' => 'textarea',
'cols' => 30,
'rows' => 5
@@ -438,25 +428,21 @@ class AdminStoresControllerCore extends AdminController
'PS_SHOP_ADDR1' => array(
'title' => $this->l('Shop address line 1'),
'validation' => 'isAddress',
'size' => 30,
'type' => 'text'
),
'PS_SHOP_ADDR2' => array(
'title' => $this->l('Shop address line 2'),
'validation' => 'isAddress',
'size' => 30,
'type' => 'text'
),
'PS_SHOP_CODE' => array(
'title' => $this->l('Postal Code/Zip code'),
'validation' => 'isGenericName',
'size' => 6,
'type' => 'text'
),
'PS_SHOP_CITY' => array(
'title' => $this->l('City'),
'validation' => 'isGenericName',
'size' => 30,
'type' => 'text'
),
'PS_SHOP_COUNTRY_ID' => array(
@@ -479,13 +465,11 @@ class AdminStoresControllerCore extends AdminController
'PS_SHOP_PHONE' => array(
'title' => $this->l('Phone'),
'validation' => 'isGenericName',
'size' => 30,
'type' => 'text'
),
'PS_SHOP_FAX' => array(
'title' => $this->l('Fax'),
'validation' => 'isGenericName',
'size' => 30,
'type' => 'text'
),
);