// update preferences tab

This commit is contained in:
Sarah Lorenzini
2013-08-01 16:40:48 +02:00
parent 5defc39def
commit 680497f1e3
9 changed files with 129 additions and 156 deletions
@@ -68,12 +68,9 @@
{/block} {/block}
{block name="leadin"} {block name="leadin"}
<div class="warn draft" style="{if $active}display:none{/if}"> <div style="{if $active}display:none{/if}">
<p> <p class="alert alert-block">
<span style="float: left"> {l s='Your CMS page will be saved as a draft'}
{l s='Your CMS page will be saved as a draft'}
</span>
<br class="clear" />
</p> </p>
</div> </div>
{/block} {/block}
@@ -55,38 +55,42 @@
{if $key == 'rightCols'} {if $key == 'rightCols'}
{foreach $field as $input} {foreach $field as $input}
{if $input.type == 'file'} {if $input.type == 'file'}
<label style="text-align: left; width: inherit;width:250px;text-align:right">{$input.label} </label> <div class="row">
<div class="margin-form"> <label class="control-label col-lg-3">{$input.label} </label>
<input type="file" name="{$input.name}" /> <div class="col-lg-6">
<p class="clear">{$input.desc}</p> <input type="file" name="{$input.name}" />
{if isset($fields_value.image) && $fields_value.image} <p>{$input.desc}</p>
<div id="image" style="width:370px;"> {if isset($fields_value.image) && $fields_value.image}
{$fields_value.image} <div id="image">
<p align="center">{l s='File size'} {$fields_value.size}kb</p> {$fields_value.image}
<a href="{$current}&id_store={$form_id}&token={$token}&deleteImage=1"> <p>{l s='File size'} {$fields_value.size}kb</p>
<img src="../img/admin/delete.gif" alt="{l s='Delete'}" /> {l s='Delete'} <a href="{$current}&id_store={$form_id}&token={$token}&deleteImage=1" class="btn btn-primary">
</a> <i class="icon-remove"></i>
</div> {l s='Delete'}
{/if} </a>
</div>
{/if}
</div>
</div> </div>
{/if} {/if}
<table cellpadding="2" cellspacing="2" style="padding: 10px; margin: 15px 0 20px 260px; border: 1px solid #BBB;"> <div class="row">
<tr> <table class="table">
<th colspan="2">{l s='Hours:'}</th> <thead>
</tr> <tr>
<tr> <th>{l s='Hours:'}</th>
<td>&nbsp;</td> <th>{l s='e.g. 10:00AM - 9:30PM'}</th>
<td style="font-size: 0.85em;">{l s='e.g. 10:00AM - 9:30PM'}</td> </tr>
</tr> </thead>
<tbody>
{foreach $fields_value.days as $k => $value} {foreach $fields_value.days as $k => $value}
<tr style="color: #7F7F7F; font-size: 0.85em;"> <tr style="color: #7F7F7F; font-size: 0.85em;">
<td>{$value}</td> <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> <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> </tr>
{/foreach} {/foreach}
</table> </tbody>
<div class="clear"></div> </table>
</div>
{/foreach} {/foreach}
{/if} {/if}
{/block} {/block}
@@ -33,6 +33,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->is_cms = true; $this->is_cms = true;
$this->table = 'cms_category'; $this->table = 'cms_category';
$this->className = 'CMSCategory'; $this->className = 'CMSCategory';
@@ -221,7 +222,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('CMS Category'), 'title' => $this->l('CMS Category'),
'image' => '../img/admin/tab-categories.gif' 'icon' => 'icon-folder-close'
), ),
'input' => array( 'input' => array(
array( array(
@@ -230,15 +231,13 @@ class AdminCmsCategoriesControllerCore extends AdminController
'name' => 'name', 'name' => 'name',
'required' => true, 'required' => true,
'lang' => true, 'lang' => true,
'class' => 'copy2friendlyUrl', 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
'hint' => $this->l('Invalid characters:').' <>;=#{}'
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Displayed:'), 'label' => $this->l('Displayed:'),
'name' => 'active', 'name' => 'active',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -269,28 +268,28 @@ class AdminCmsCategoriesControllerCore extends AdminController
'lang' => true, 'lang' => true,
'rows' => 5, 'rows' => 5,
'cols' => 40, 'cols' => 40,
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Meta title:'), 'label' => $this->l('Meta title:'),
'name' => 'meta_title', 'name' => 'meta_title',
'lang' => true, 'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Meta description:'), 'label' => $this->l('Meta description:'),
'name' => 'meta_description', 'name' => 'meta_description',
'lang' => true, 'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Meta keywords:'), 'label' => $this->l('Meta keywords:'),
'name' => 'meta_keywords', 'name' => 'meta_keywords',
'lang' => true, 'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
), ),
array( array(
'type' => 'text', 'type' => 'text',
@@ -303,7 +302,7 @@ class AdminCmsCategoriesControllerCore extends AdminController
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save'), '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'); $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() public function __construct()
{ {
$this->bootstrap = true;
$this->table = 'cms'; $this->table = 'cms';
$this->className = 'CMS'; $this->className = 'CMS';
$this->lang = true; $this->lang = true;
@@ -94,7 +95,7 @@ class AdminCmsControllerCore extends AdminController
'tinymce' => true, 'tinymce' => true,
'legend' => array( 'legend' => array(
'title' => $this->l('CMS Page'), 'title' => $this->l('CMS Page'),
'image' => '../img/admin/tab-categories.gif' 'icon' => 'icon-folder-close'
), ),
'input' => array( 'input' => array(
// custom template // custom template
@@ -113,26 +114,24 @@ class AdminCmsControllerCore extends AdminController
'id' => 'name', // for copy2friendlyUrl compatibility 'id' => 'name', // for copy2friendlyUrl compatibility
'lang' => true, 'lang' => true,
'required' => true, 'required' => true,
'class' => 'copy2friendlyUrl', 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'size' => 50
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Meta description'), 'label' => $this->l('Meta description'),
'name' => 'meta_description', 'name' => 'meta_description',
'lang' => true, 'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}', 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
'size' => 70
), ),
array( array(
'type' => 'tags', 'type' => 'tags',
'label' => $this->l('Meta keywords'), 'label' => $this->l('Meta keywords'),
'name' => 'meta_keywords', 'name' => 'meta_keywords',
'lang' => true, 'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}', 'hint' => array(
'size' => 70, $this->l('Invalid characters:').' &lt;&gt;;=#{}',
'desc' => $this->l('To add "tags" click in the field, write something, and then press "Enter."') $this->l('To add "tags" click in the field, write something, and then press "Enter."')
)
), ),
array( array(
'type' => 'text', 'type' => 'text',
@@ -153,11 +152,10 @@ class AdminCmsControllerCore extends AdminController
'hint' => $this->l('Invalid characters:').' <>;=#{}' 'hint' => $this->l('Invalid characters:').' <>;=#{}'
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Displayed:'), 'label' => $this->l('Displayed:'),
'name' => 'active', 'name' => 'active',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -175,7 +173,7 @@ class AdminCmsControllerCore extends AdminController
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save'), 'title' => $this->l('Save'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
@@ -30,6 +30,7 @@ class AdminGeolocationControllerCore extends AdminController
{ {
parent::__construct(); parent::__construct();
$this->bootstrap = true;
$this->fields_options = array( $this->fields_options = array(
'geolocationConfiguration' => array( 'geolocationConfiguration' => array(
'title' => $this->l('Geolocation by IP address'), 'title' => $this->l('Geolocation by IP address'),
@@ -37,7 +38,7 @@ class AdminGeolocationControllerCore extends AdminController
'fields' => array( 'fields' => array(
'PS_GEOLOCATION_ENABLED' => array( 'PS_GEOLOCATION_ENABLED' => array(
'title' => $this->l('Geolocation by IP address'), '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', 'validation' => 'isUnsignedId',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'bool' 'type' => 'bool'
+24 -28
View File
@@ -74,7 +74,7 @@ class AdminImagesControllerCore extends AdminController
), ),
'PS_JPEG_QUALITY' => array( 'PS_JPEG_QUALITY' => array(
'title' => $this->l('JPEG quality'), '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', 'validation' => 'isUnsignedId',
'required' => true, 'required' => true,
'cast' => 'intval', 'cast' => 'intval',
@@ -82,7 +82,7 @@ class AdminImagesControllerCore extends AdminController
), ),
'PS_PNG_QUALITY' => array( 'PS_PNG_QUALITY' => array(
'title' => $this->l('PNG quality'), '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', 'validation' => 'isUnsignedId',
'required' => true, 'required' => true,
'cast' => 'intval', 'cast' => 'intval',
@@ -119,7 +119,7 @@ class AdminImagesControllerCore extends AdminController
), ),
'PS_PRODUCT_PICTURE_MAX_SIZE' => array( 'PS_PRODUCT_PICTURE_MAX_SIZE' => array(
'title' => $this->l('Maximum size of product pictures'), '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', 'validation' => 'isUnsignedInt',
'required' => true, 'required' => true,
'cast' => 'intval', 'cast' => 'intval',
@@ -129,7 +129,7 @@ class AdminImagesControllerCore extends AdminController
), ),
'PS_PRODUCT_PICTURE_WIDTH' => array( 'PS_PRODUCT_PICTURE_WIDTH' => array(
'title' => $this->l('Product picture width'), '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', 'validation' => 'isUnsignedInt',
'required' => true, 'required' => true,
'cast' => 'intval', 'cast' => 'intval',
@@ -139,7 +139,7 @@ class AdminImagesControllerCore extends AdminController
), ),
'PS_PRODUCT_PICTURE_HEIGHT' => array( 'PS_PRODUCT_PICTURE_HEIGHT' => array(
'title' => $this->l('Product picture height'), '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', 'validation' => 'isUnsignedInt',
'required' => true, 'required' => true,
'cast' => 'intval', 'cast' => 'intval',
@@ -155,7 +155,7 @@ class AdminImagesControllerCore extends AdminController
if ($this->display_move) if ($this->display_move)
$this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array( $this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array(
'title' => $this->l('Use the legacy image filesystem'), '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', 'validation' => 'isBool',
'cast' => 'intval', 'cast' => 'intval',
'required' => false, 'required' => false,
@@ -166,7 +166,7 @@ class AdminImagesControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('images'), 'title' => $this->l('images'),
'image' => '../img/admin/picture.gif' 'icon' => 'icon-picture'
), ),
'input' => array( 'input' => array(
array( array(
@@ -174,7 +174,7 @@ class AdminImagesControllerCore extends AdminController
'label' => $this->l('Type name'), 'label' => $this->l('Type name'),
'name' => 'name', 'name' => 'name',
'required' => true, '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( array(
'type' => 'text', 'type' => 'text',
@@ -182,7 +182,7 @@ class AdminImagesControllerCore extends AdminController
'name' => 'width', 'name' => 'width',
'required' => true, 'required' => true,
'maxlength' => 5, 'maxlength' => 5,
'desc' => $this->l('Maximum image width in pixels') 'hint' => $this->l('Maximum image width in pixels')
), ),
array( array(
'type' => 'text', 'type' => 'text',
@@ -190,16 +190,15 @@ class AdminImagesControllerCore extends AdminController
'name' => 'height', 'name' => 'height',
'required' => true, 'required' => true,
'maxlength' => 5, 'maxlength' => 5,
'desc' => $this->l('Maximum image height in pixels') 'hint' => $this->l('Maximum image height in pixels')
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Products'), 'label' => $this->l('Products'),
'name' => 'products', 'name' => 'products',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, '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( 'values' => array(
array( array(
'id' => 'products_on', 'id' => 'products_on',
@@ -214,13 +213,13 @@ class AdminImagesControllerCore extends AdminController
) )
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Categories'), 'label' => $this->l('Categories'),
'name' => 'categories', 'name' => 'categories',
'required' => false, 'required' => false,
'class' => 't', 'class' => 't',
'is_bool' => true, '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( 'values' => array(
array( array(
'id' => 'categories_on', 'id' => 'categories_on',
@@ -235,13 +234,12 @@ class AdminImagesControllerCore extends AdminController
) )
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Manufacturers'), 'label' => $this->l('Manufacturers'),
'name' => 'manufacturers', 'name' => 'manufacturers',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, '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( 'values' => array(
array( array(
'id' => 'manufacturers_on', 'id' => 'manufacturers_on',
@@ -256,13 +254,12 @@ class AdminImagesControllerCore extends AdminController
) )
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Suppliers'), 'label' => $this->l('Suppliers'),
'name' => 'suppliers', 'name' => 'suppliers',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, '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( 'values' => array(
array( array(
'id' => 'suppliers_on', 'id' => 'suppliers_on',
@@ -277,13 +274,13 @@ class AdminImagesControllerCore extends AdminController
) )
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Scenes'), 'label' => $this->l('Scenes'),
'name' => 'scenes', 'name' => 'scenes',
'required' => false, 'required' => false,
'class' => 't', 'class' => 't',
'is_bool' => true, '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( 'values' => array(
array( array(
'id' => 'scenes_on', 'id' => 'scenes_on',
@@ -298,13 +295,12 @@ class AdminImagesControllerCore extends AdminController
) )
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Stores'), 'label' => $this->l('Stores'),
'name' => 'stores', 'name' => 'stores',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, '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( 'values' => array(
array( array(
'id' => 'stores_on', 'id' => 'stores_on',
@@ -320,8 +316,8 @@ class AdminImagesControllerCore extends AdminController
), ),
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save '), 'title' => $this->l('Save'),
'class' => 'button' 'class' => 'btn btn-primary'
) )
); );
@@ -28,6 +28,7 @@ class AdminMaintenanceControllerCore extends AdminController
{ {
public function __construct() public function __construct()
{ {
$this->bootstrap = true;
$this->className = 'Configuration'; $this->className = 'Configuration';
$this->table = 'configuration'; $this->table = 'configuration';
@@ -40,21 +41,20 @@ class AdminMaintenanceControllerCore extends AdminController
'fields' => array( 'fields' => array(
'PS_SHOP_ENABLE' => array( 'PS_SHOP_ENABLE' => array(
'title' => $this->l('Enable Shop'), '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', 'validation' => 'isBool',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'bool' 'type' => 'bool'
), ),
'PS_MAINTENANCE_IP' => array( 'PS_MAINTENANCE_IP' => array(
'title' => $this->l('Maintenance IP'), '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', 'validation' => 'isGenericName',
'type' => 'maintenance_ip', 'type' => 'maintenance_ip',
'size' => 30,
'default' => '' '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() public function __construct()
{ {
$this->bootstrap = true;
$this->table = 'alias'; $this->table = 'alias';
$this->className = 'Alias'; $this->className = 'Alias';
$this->lang = false; $this->lang = false;
@@ -64,13 +65,13 @@ class AdminSearchConfControllerCore extends AdminController
'icon' => 'search', 'icon' => 'search',
'info' => '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('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>
<p>'.$this->l('Building the product index may take a few minutes.') <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> .$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">'. -&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 /> $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('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>', '.$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( 'fields' => array(
@@ -92,28 +93,32 @@ class AdminSearchConfControllerCore extends AdminController
'validation' => 'isBool', 'validation' => 'isBool',
'type' => 'bool', 'type' => 'bool',
'cast' => 'intval', 'cast' => 'intval',
'desc' => $this->l('Enable ajax search for your visitors.').'<br />'. 'hint' => array(
$this->l('With ajax search, the first 10 products matching the user query will appear in real time below the input field.')), $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( 'PS_INSTANT_SEARCH' => array(
'title' => $this->l('Instant search'), 'title' => $this->l('Instant search'),
'validation' => 'isBool', 'validation' => 'isBool',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'bool', 'type' => 'bool',
'desc' => $this->l('Enable instant search for your visitors?').'<br />'. 'hint' => array(
$this->l('With instant search, the results will appear immediately as the user writes a query.')), $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( 'PS_SEARCH_MINWORDLEN' => array(
'title' => $this->l('Minimum word length (in characters)'), 'title' => $this->l('Minimum word length (in characters)'),
'desc' => $this->l('Only words this size or larger will be indexed.'), 'hint' => $this->l('Only words this size or larger will be indexed.'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_BLACKLIST' => array( 'PS_SEARCH_BLACKLIST' => array(
'title' => $this->l('Blacklisted words'), 'title' => $this->l('Blacklisted words'),
'size' => 35,
'validation' => 'isGenericName', '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' 'type' => 'textLang'
) )
), ),
@@ -129,63 +134,54 @@ class AdminSearchConfControllerCore extends AdminController
'fields' => array( 'fields' => array(
'PS_SEARCH_WEIGHT_PNAME' => array( 'PS_SEARCH_WEIGHT_PNAME' => array(
'title' => $this->l('Product name weight'), 'title' => $this->l('Product name weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_REF' => array( 'PS_SEARCH_WEIGHT_REF' => array(
'title' => $this->l('Reference weight'), 'title' => $this->l('Reference weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_SHORTDESC' => array( 'PS_SEARCH_WEIGHT_SHORTDESC' => array(
'title' => $this->l('Short description weight'), 'title' => $this->l('Short description weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_DESC' => array( 'PS_SEARCH_WEIGHT_DESC' => array(
'title' => $this->l('Description weight'), 'title' => $this->l('Description weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_CNAME' => array( 'PS_SEARCH_WEIGHT_CNAME' => array(
'title' => $this->l('Category weight'), 'title' => $this->l('Category weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_MNAME' => array( 'PS_SEARCH_WEIGHT_MNAME' => array(
'title' => $this->l('Manufacturer weight'), 'title' => $this->l('Manufacturer weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_TAG' => array( 'PS_SEARCH_WEIGHT_TAG' => array(
'title' => $this->l('Tags weight'), 'title' => $this->l('Tags weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_ATTRIBUTE' => array( 'PS_SEARCH_WEIGHT_ATTRIBUTE' => array(
'title' => $this->l('Attributes weight'), 'title' => $this->l('Attributes weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
), ),
'PS_SEARCH_WEIGHT_FEATURE' => array( 'PS_SEARCH_WEIGHT_FEATURE' => array(
'title' => $this->l('Features weight'), 'title' => $this->l('Features weight'),
'size' => 4,
'validation' => 'isUnsignedInt', 'validation' => 'isUnsignedInt',
'type' => 'text', 'type' => 'text',
'cast' => 'intval' 'cast' => 'intval'
@@ -230,32 +226,30 @@ class AdminSearchConfControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Aliases'), 'title' => $this->l('Aliases'),
'image' => '../img/admin/search.gif' 'icon' => 'icon-search'
), ),
'input' => array( 'input' => array(
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Alias:'), 'label' => $this->l('Alias:'),
'name' => 'alias', 'name' => 'alias',
'size' => 40,
'required' => true, 'required' => true,
'desc' => array( 'hint' => array(
$this->l('Enter each alias separated by a comma (e.g. \'prestshop,preztashop,prestasohp\')'), $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( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Result:'), 'label' => $this->l('Result:'),
'name' => 'search', 'name' => 'search',
'size' => 15,
'required' => true, 'required' => true,
'desc' => $this->l('Search this word instead.') 'hint' => $this->l('Search this word instead.')
) )
), ),
'submit' => array( 'submit' => array(
'title' => $this->l('Save'), '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() public function __construct()
{ {
$this->bootstrap = true;
$this->table = 'store'; $this->table = 'store';
$this->className = 'Store'; $this->className = 'Store';
$this->lang = false; $this->lang = false;
@@ -68,32 +69,32 @@ class AdminStoresControllerCore extends AdminController
'fields' => array( 'fields' => array(
'PS_STORES_DISPLAY_FOOTER' => array( 'PS_STORES_DISPLAY_FOOTER' => array(
'title' => $this->l('Display in the footer'), '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', 'cast' => 'intval',
'type' => 'bool' 'type' => 'bool'
), ),
'PS_STORES_DISPLAY_SITEMAP' => array( 'PS_STORES_DISPLAY_SITEMAP' => array(
'title' => $this->l('Display in the sitemap page'), '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', 'cast' => 'intval',
'type' => 'bool' 'type' => 'bool'
), ),
'PS_STORES_SIMPLIFIED' => array( 'PS_STORES_SIMPLIFIED' => array(
'title' => $this->l('Show a simplified store locator'), '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', 'cast' => 'intval',
'type' => 'bool' 'type' => 'bool'
), ),
'PS_STORES_CENTER_LAT' => array( 'PS_STORES_CENTER_LAT' => array(
'title' => $this->l('Latitude by default'), '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', 'cast' => 'floatval',
'type' => 'text', 'type' => 'text',
'size' => '10' 'size' => '10'
), ),
'PS_STORES_CENTER_LONG' => array( 'PS_STORES_CENTER_LONG' => array(
'title' => $this->l('Longitude by default'), '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', 'cast' => 'floatval',
'type' => 'text', 'type' => 'text',
'size' => '10' 'size' => '10'
@@ -153,43 +154,40 @@ class AdminStoresControllerCore extends AdminController
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
'title' => $this->l('Stores'), 'title' => $this->l('Stores'),
'image' => '../img/admin/home.gif' 'icon' => 'icon-home'
), ),
'input' => array( 'input' => array(
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Name'), 'label' => $this->l('Name'),
'name' => 'name', 'name' => 'name',
'size' => 33,
'required' => false, 'required' => false,
'hint' => sprintf($this->l('Allowed characters: letters, spaces and %s'), '().-'), 'hint' => array(
'desc' => $this->l('Store name (e.g. City Center Mall Store)') $this->l('Allowed characters: letters, spaces and %s'), '().-',
$this->l('Store name (e.g. City Center Mall Store)')
)
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Address'), 'label' => $this->l('Address'),
'name' => 'address1', 'name' => 'address1',
'size' => 33,
'required' => true 'required' => true
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Address (2)'), 'label' => $this->l('Address (2)'),
'name' => 'address2', 'name' => 'address2'
'size' => 33
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Postal Code/Zip Code'), 'label' => $this->l('Postal Code/Zip Code'),
'name' => 'postcode', 'name' => 'postcode',
'size' => 6,
'required' => true 'required' => true
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('City'), 'label' => $this->l('City'),
'name' => 'city', 'name' => 'city',
'size' => 33,
'required' => true 'required' => true
), ),
array( array(
@@ -220,27 +218,23 @@ class AdminStoresControllerCore extends AdminController
'label' => $this->l('Latitude / Longitude'), 'label' => $this->l('Latitude / Longitude'),
'name' => 'latitude', 'name' => 'latitude',
'required' => true, 'required' => true,
'size' => 11,
'maxlength' => 12, '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( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Phone'), 'label' => $this->l('Phone'),
'name' => 'phone', 'name' => 'phone'
'size' => 33
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Fax'), 'label' => $this->l('Fax'),
'name' => 'fax', 'name' => 'fax'
'size' => 33
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => $this->l('Email address'), 'label' => $this->l('Email address'),
'name' => 'email', 'name' => 'email'
'size' => 33
), ),
array( array(
'type' => 'textarea', 'type' => 'textarea',
@@ -250,11 +244,10 @@ class AdminStoresControllerCore extends AdminController
'rows' => 4 'rows' => 4
), ),
array( array(
'type' => 'radio', 'type' => 'switch',
'label' => $this->l('Status'), 'label' => $this->l('Status'),
'name' => 'active', 'name' => 'active',
'required' => false, 'required' => false,
'class' => 't',
'is_bool' => true, 'is_bool' => true,
'values' => array( 'values' => array(
array( array(
@@ -268,7 +261,7 @@ class AdminStoresControllerCore extends AdminController
'label' => $this->l('Disabled') '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 ( 'rightCols' => array (
@@ -276,12 +269,12 @@ class AdminStoresControllerCore extends AdminController
'type' => 'file', 'type' => 'file',
'label' => $this->l('Picture'), 'label' => $this->l('Picture'),
'name' => 'image', 'name' => 'image',
'desc' => $this->l('Storefront picture') 'hint' => $this->l('Storefront picture')
) )
), ),
'submit' => array( 'submit' => array(
'title' => $this->l(' Save '), 'title' => $this->l(' Save '),
'class' => 'button' 'class' => 'btn btn-default'
) )
); );
@@ -413,24 +406,21 @@ class AdminStoresControllerCore extends AdminController
$formFields = array( $formFields = array(
'PS_SHOP_NAME' => array( 'PS_SHOP_NAME' => array(
'title' => $this->l('Shop name'), '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', 'validation' => 'isGenericName',
'required' => true, 'required' => true,
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_EMAIL' => array('title' => $this->l('Shop email'), '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', 'validation' => 'isEmail',
'required' => true, 'required' => true,
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_DETAILS' => array( 'PS_SHOP_DETAILS' => array(
'title' => $this->l('Registration'), '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', 'validation' => 'isGenericName',
'size' => 30,
'type' => 'textarea', 'type' => 'textarea',
'cols' => 30, 'cols' => 30,
'rows' => 5 'rows' => 5
@@ -438,25 +428,21 @@ class AdminStoresControllerCore extends AdminController
'PS_SHOP_ADDR1' => array( 'PS_SHOP_ADDR1' => array(
'title' => $this->l('Shop address line 1'), 'title' => $this->l('Shop address line 1'),
'validation' => 'isAddress', 'validation' => 'isAddress',
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_ADDR2' => array( 'PS_SHOP_ADDR2' => array(
'title' => $this->l('Shop address line 2'), 'title' => $this->l('Shop address line 2'),
'validation' => 'isAddress', 'validation' => 'isAddress',
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_CODE' => array( 'PS_SHOP_CODE' => array(
'title' => $this->l('Postal Code/Zip code'), 'title' => $this->l('Postal Code/Zip code'),
'validation' => 'isGenericName', 'validation' => 'isGenericName',
'size' => 6,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_CITY' => array( 'PS_SHOP_CITY' => array(
'title' => $this->l('City'), 'title' => $this->l('City'),
'validation' => 'isGenericName', 'validation' => 'isGenericName',
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_COUNTRY_ID' => array( 'PS_SHOP_COUNTRY_ID' => array(
@@ -479,13 +465,11 @@ class AdminStoresControllerCore extends AdminController
'PS_SHOP_PHONE' => array( 'PS_SHOP_PHONE' => array(
'title' => $this->l('Phone'), 'title' => $this->l('Phone'),
'validation' => 'isGenericName', 'validation' => 'isGenericName',
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
'PS_SHOP_FAX' => array( 'PS_SHOP_FAX' => array(
'title' => $this->l('Fax'), 'title' => $this->l('Fax'),
'validation' => 'isGenericName', 'validation' => 'isGenericName',
'size' => 30,
'type' => 'text' 'type' => 'text'
), ),
); );