// update preferences tab

This commit is contained in:
Sarah Lorenzini
2013-07-31 17:43:48 +02:00
parent 9debffe910
commit ca253bcda2
10 changed files with 90 additions and 86 deletions
+4 -4
View File
@@ -185,10 +185,10 @@ function getPath($urlBase, $id_category, $path = '', $highlight = '', $categoryT
$edit = '<a href="'.$urlBase.'&id_cms_category='.$category->id.'&addcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
<img src="../img/admin/edit.gif" alt="Modify" /></a> ';
if ($category->id == 1)
$edit = '<a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
<img src="../img/admin/home.gif" alt="Home" /></a> ';
$path = $edit.'<a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
'.$name.'</a> > '.$path;
$edit = '<li><a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
<i class="icon-home"></i></a></li> ';
$path = $edit.'<li><a href="'.$urlBase.'&id_cms_category='.$category->id.'&viewcategory&token=' . Tools::getAdminToken('AdminCmsContent'.(int)(Tab::getIdFromClassName('AdminCmsContent')).(int)$context->employee->id).'">
'.$name.'</a></li> > '.$path;
if ($category->id == 1)
return substr($path, 0, strlen($path) - 3);
return getPath($urlBase, $category->id_parent, $path, '', 'cms');
@@ -23,9 +23,9 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{if isset($cms_breadcrumb)}
<div class="cat_bar">
<span style="color: #3C8534;">{l s='Current category'} :</span>&nbsp;&nbsp;&nbsp;{$cms_breadcrumb}
</div>
<ul class="breadcrumb cat_bar">
{$cms_breadcrumb}
</ul>
{/if}
{$content}
@@ -41,8 +41,7 @@
{/block}
{block name="after"}
<br/><br/>
<fieldset id="prestastore-content" class="width3"></fieldset>
<fieldset id="prestastore-content" class="col-lg-12"></fieldset>
<script type="text/javascript">
$.post(
"ajax-tab.php",
@@ -53,7 +52,7 @@
action:'getAddonsThemes',
page:'themes'
}, function(a){
$("#prestastore-content").html("<legend><img src='../img/admin/prestastore.gif' class='middle' />{l s='Live from PrestaShop Addons!'}</legend>"+a);
$("#prestastore-content").html("<h3><i class='icon-puzzle-piece'></i> {l s='Live from PrestaShop Addons!'}</h3>"+a);
});
</script>
{/block}
@@ -124,7 +124,7 @@
<p class="radio">
<input type="radio" name="{$key}" id="{$key}_{$k}" value="{$k}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
<label class="col-lg-3" for="{$key}_{$k}"> {$v}</label>
<label class="col-lg-6" for="{$key}_{$k}"> {$v}</label>
</p>
{/foreach}
</div>
@@ -163,11 +163,11 @@
</div>
{elseif $field['type'] == 'file'}
{if isset($field['thumb']) && $field['thumb']}
<div class="col-lg-9">
<div class="col-lg-3">
<img src="{$field['thumb']}" alt="{$field['title']}" title="{$field['title']}" />
</div>
{/if}
<div class="col-lg-9">
<div class="col-lg-5">
<input type="file" name="{$key}" />
</div>
{elseif $field['type'] == 'color'}
@@ -37,6 +37,7 @@ class AdminCmsContentControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
/* Get current category */
$id_cms_category = (int)Tools::getValue('id_cms_category', Tools::getValue('id_cms_category_parent', 1));
self::$category = new CMSCategory($id_cms_category);
@@ -28,6 +28,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->className = 'Configuration';
$this->table = 'configuration';
@@ -51,7 +52,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController
'fields' => array(
'PS_REGISTRATION_PROCESS_TYPE' => array(
'title' => $this->l('Registration process type'),
'desc' => $this->l('The "Only account creation" registration option allows the customer to register faster, and create his/her address later.'),
'hint' => $this->l('The "Only account creation" registration option allows the customer to register faster, and create his/her address later.'),
'validation' => 'isInt',
'cast' => 'intval',
'type' => 'select',
@@ -60,21 +61,21 @@ class AdminCustomerPreferencesControllerCore extends AdminController
),
'PS_ONE_PHONE_AT_LEAST' => array(
'title' => $this->l('Phone number'),
'desc' => $this->l('If you chose yes, your customer will have to provide at least one phone number to register.'),
'hint' => $this->l('If you chose yes, your customer will have to provide at least one phone number to register.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
'PS_CART_FOLLOWING' => array(
'title' => $this->l('Cart re-display at login'),
'desc' => $this->l('After customer logs in, you can recall and display the content of his/her last shopping cart.'),
'hint' => $this->l('After customer logs in, you can recall and display the content of his/her last shopping cart.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
'PS_CUSTOMER_CREATION_EMAIL' => array(
'title' => $this->l('Send an email after registration'),
'desc' => $this->l('Send an email with summary account (email, password) after registration.'),
'hint' => $this->l('Send an email with summary account (email, password) after registration.'),
'validation' => 'isUnsignedInt',
'validation' => 'isBool',
'cast' => 'intval',
@@ -82,7 +83,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController
),
'PS_PASSWD_TIME_FRONT' => array(
'title' => $this->l('Regenerate password'),
'desc' => $this->l('Minimum time required to regenerate a password.'),
'hint' => $this->l('Minimum time required to regenerate a password.'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'size' => 5,
@@ -91,7 +92,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController
),
'PS_B2B_ENABLE' => array(
'title' => $this->l('Enable B2B mode'),
'desc' => $this->l('Activate or deactivate B2B mode. When this option is enabled, B2B features will be made available.'),
'hint' => $this->l('Activate or deactivate B2B mode. When this option is enabled, B2B features will be made available.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
+34 -31
View File
@@ -35,6 +35,7 @@ class AdminMetaControllerCore extends AdminController
{
parent::__construct();
$this->bootstrap = true;
$this->ht_file = _PS_ROOT_DIR_.'/.htaccess';
$this->rb_file = _PS_ROOT_DIR_.'/robots.txt';
$this->sm_file = _PS_ROOT_DIR_.'/sitemap.xml';
@@ -58,22 +59,22 @@ class AdminMetaControllerCore extends AdminController
$general_fields = array(
'PS_REWRITING_SETTINGS' => array(
'title' => $this->l('Friendly URL'),
'desc' => ($mod_rewrite ? $this->l('Enable only if your server allows URL rewriting (recommended).') : ''),
'hint' => ($mod_rewrite ? $this->l('Enable only if your server allows URL rewriting (recommended).') : ''),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'rewriting_settings',
'type' => 'bool',
'mod_rewrite' => $mod_rewrite
),
'PS_ALLOW_ACCENTED_CHARS_URL' => array(
'title' => $this->l('Accented URL'),
'desc' => $this->l('Enable if you want to allow accented characters in your friendly URLs.').' '.$this->l('You should only activate this option if you are using non-latin characters ; for all the latin charsets, your SEO will be better without this option.'),
'hint' => $this->l('Enable if you want to allow accented characters in your friendly URLs.').' '.$this->l('You should only activate this option if you are using non-latin characters ; for all the latin charsets, your SEO will be better without this option.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
'PS_CANONICAL_REDIRECT' => array(
'title' => $this->l('Automatically redirect to the canonical URL'),
'desc' => $this->l('Recommended, but your theme must be compliant.'),
'hint' => $this->l('Recommended, but your theme must be compliant.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
@@ -85,7 +86,7 @@ class AdminMetaControllerCore extends AdminController
{
$general_fields['PS_HTACCESS_DISABLE_MULTIVIEWS'] = array(
'title' => $this->l('Disable apache multiviews'),
'desc' => $this->l('Enable this option only if you have problems with URL rewriting.'),
'hint' => $this->l('Enable this option only if you have problems with URL rewriting.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
@@ -93,7 +94,7 @@ class AdminMetaControllerCore extends AdminController
$general_fields['PS_HTACCESS_DISABLE_MODSEC'] = array(
'title' => $this->l('Disable apache mod security'),
'desc' => $this->l('Some features could not work correctly with a specific configuration of apache mod security. We recommend to turn it off.'),
'hint' => $this->l('Some features could not work correctly with a specific configuration of apache mod security. We recommend to turn it off.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
@@ -102,22 +103,22 @@ class AdminMetaControllerCore extends AdminController
else
{
$url_description = $this->l('Before being able to use this tool, you need to:');
$url_description .= '<br />- '.$this->l('Create a blank .htaccess in your root directory.');
$url_description .= '<br />- '.$this->l('Give it write permissions (CHMOD 666 on Unix system)');
$url_description .= $this->l('Create a blank .htaccess in your root directory.');
$url_description .= $this->l('Give it write permissions (CHMOD 666 on Unix system)');
}
// Options to generate robot.txt
$robots_description = $this->l('Your robots.txt file MUST be in your website\'s root directory and nowhere else (e.g. http://www.yoursite.com/robots.txt).');
if ($this->checkConfiguration($this->rb_file))
{
$robots_description .= '<br />'.$this->l('Generate your "robots.txt" file by clicking on the following button (this will erase the old robots.txt file)');
$robots_description .= $this->l('Generate your "robots.txt" file by clicking on the following button (this will erase the old robots.txt file)');
$robots_submit = array('name' => 'submitRobots', 'title' => $this->l('Generate robots.txt file'));
}
else
{
$robots_description .= '<br />'.$this->l('Before being able to use this tool, you need to:');
$robots_description .= '<br />- '.$this->l('Create a blank robots.txt file in your root directory.');
$robots_description .= '<br />- '.$this->l('Give it write permissions (CHMOD 666 on Unix system)');
$robots_description .= $this->l('Before being able to use this tool, you need to:');
$robots_description .= $this->l('Create a blank robots.txt file in your root directory.');
$robots_description .= $this->l('Give it write permissions (CHMOD 666 on Unix system)');
}
$robots_options = array(
@@ -145,21 +146,18 @@ class AdminMetaControllerCore extends AdminController
'title' => $this->l('Shop domain'),
'validation' => 'isString',
'type' => 'text',
'size' => 70,
'defaultValue' => $this->url->domain,
),
'domain_ssl' => array(
'title' => $this->l('SSL domain'),
'validation' => 'isString',
'type' => 'text',
'size' => 70,
'defaultValue' => $this->url->domain_ssl,
),
'uri' => array(
'title' => $this->l('Base URI'),
'validation' => 'isString',
'type' => 'text',
'size' => 70,
'defaultValue' => $this->url->physical_uri,
),
);
@@ -250,7 +248,7 @@ class AdminMetaControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Meta tags'),
'image' => '../img/admin/metatags.gif'
'icon' => 'icon-tags'
),
'input' => array(
array(
@@ -273,7 +271,7 @@ class AdminMetaControllerCore extends AdminController
'query' => 'query',
),
),
'desc' => $this->l('Name of the related page'),
'hint' => $this->l('Name of the related page'),
'required' => true,
'empty_message' => '<p>'.$this->l('There is no page available!').'</p>',
),
@@ -282,27 +280,31 @@ class AdminMetaControllerCore extends AdminController
'label' => $this->l('Page title:'),
'name' => 'title',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'desc' => $this->l('Title of this page'),
'size' => 30
'hint' => array(
$this->l('Title of this page.'),
$this->l('Invalid characters:').' &lt;&gt;;=#{}'
)
),
array(
'type' => 'text',
'label' => $this->l('Meta description:'),
'name' => 'description',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'desc' => $this->l('A short description of your shop'),
'size' => 50
'hint' => array(
$this->l('Invalid characters:').' &lt;&gt;;=#{}',
$this->l('A short description of your shop')
)
),
array(
'type' => 'tags',
'label' => $this->l('Meta keywords:'),
'name' => 'keywords',
'lang' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
'desc' => $this->l('List of keywords for search engines').' '.$this->l('To add "tags," click in the field, write something, and then press "Enter."'),
'size' => 50
'hint' => array(
$this->l('Invalid characters:').' &lt;&gt;;=#{}',
$this->l('List of keywords for search engines'),
$this->l('To add "tags," click in the field, write something, and then press "Enter."')
)
),
array(
'type' => 'text',
@@ -310,14 +312,15 @@ class AdminMetaControllerCore extends AdminController
'name' => 'url_rewrite',
'lang' => true,
'required' => true,
'hint' => $this->l('Only letters and hyphens are allowed'),
'desc' => $this->l('e.g. "contacts" for http://mysite.com/shop/contacts to redirect to http://mysite.com/shop/contact-form.php'),
'size' => 50
'hint' => array(
$this->l('Only letters and hyphens are allowed'),
$this->l('e.g. "contacts" for http://mysite.com/shop/contacts to redirect to http://mysite.com/shop/contact-form.php'),
)
),
),
'submit' => array(
'title' => $this->l(' Save '),
'class' => 'button'
'title' => $this->l('Save'),
'class' => 'btn btn-primary'
)
);
return parent::renderForm();
@@ -28,6 +28,7 @@ class AdminOrderPreferencesControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->className = 'Configuration';
$this->table = 'configuration';
@@ -123,21 +124,21 @@ class AdminOrderPreferencesControllerCore extends AdminController
'fields' => array(
'PS_GIFT_WRAPPING' => array(
'title' => $this->l('Offer gift wrapping'),
'desc' => $this->l('Suggest gift-wrapping to customers.'),
'hint' => $this->l('Suggest gift-wrapping to customers.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
'PS_GIFT_WRAPPING_PRICE' => array(
'title' => $this->l('Gift-wrapping price'),
'desc' => $this->l('Set a price for gift wrapping'),
'hint' => $this->l('Set a price for gift wrapping'),
'validation' => 'isPrice',
'cast' => 'floatval',
'type' => 'price'
),
'PS_GIFT_WRAPPING_TAX_RULES_GROUP' => array(
'title' => $this->l('Gift-wrapping tax'),
'desc' => $this->l('Set a tax for gift wrapping'),
'hint' => $this->l('Set a tax for gift wrapping'),
'validation' => 'isInt',
'cast' => 'intval',
'type' => 'select',
@@ -146,7 +147,7 @@ class AdminOrderPreferencesControllerCore extends AdminController
),
'PS_RECYCLABLE_PACK' => array(
'title' => $this->l('Offer recycled packaging'),
'desc' => $this->l('Suggest recycled packaging to customer'),
'hint' => $this->l('Suggest recycled packaging to customer'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
@@ -28,6 +28,7 @@ class AdminPPreferencesControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->className = 'Configuration';
$this->table = 'configuration';
@@ -39,7 +40,7 @@ class AdminPPreferencesControllerCore extends AdminController
'fields' => array(
'PS_CATALOG_MODE' => array(
'title' => $this->l('Catalog mode'),
'desc' => $this->l('When active, all shopping features will be disabled.'),
'hint' => $this->l('When active, all shopping features will be disabled.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -47,7 +48,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_COMPARATOR_MAX_ITEM' => array(
'title' => $this->l('Product comparison'),
'desc' => $this->l('Set the maximum number of products that can be selected for comparison.').' '.$this->l('Set to "0" to disable this feature.'),
'hint' => $this->l('Set the maximum number of products that can be selected for comparison. Set to "0" to disable this feature.'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
@@ -61,7 +62,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_CART_REDIRECT' => array(
'title' => $this->l('Redirect after adding product to cart'),
'desc' => $this->l('Only for non-AJAX versions of the cart.'),
'hint' => $this->l('Only for non-AJAX versions of the cart.'),
'cast' => 'intval',
'show' => true,
'required' => false,
@@ -74,7 +75,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_PRODUCT_SHORT_DESC_LIMIT' => array(
'title' => $this->l('Max size of short description'),
'desc' => $this->l('Set the maximum size of product short description (in characters).'),
'hint' => $this->l('Set the maximum size of product short description (in characters).'),
'validation' => 'isInt',
'cast' => 'intval',
'type' => 'text',
@@ -82,7 +83,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_QTY_DISCOUNT_ON_COMBINATION' => array(
'title' => $this->l('Quantity discounts based on'),
'desc' => $this->l('How to calculate quantity discounts'),
'hint' => $this->l('How to calculate quantity discounts'),
'cast' => 'intval',
'show' => true,
'required' => false,
@@ -100,14 +101,14 @@ class AdminPPreferencesControllerCore extends AdminController
'fields' => array(
'PS_PRODUCTS_PER_PAGE' => array(
'title' => $this->l('Products per page'),
'desc' => $this->l('Number of products displayed per page. Default is 10.'),
'hint' => $this->l('Number of products displayed per page. Default is 10.'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'type' => 'text'
),
'PS_PRODUCTS_ORDER_BY' => array(
'title' => $this->l('Default order by'),
'desc' => $this->l('The order in which products are displayed in the product list.'),
'hint' => $this->l('The order in which products are displayed in the product list.'),
'type' => 'select',
'list' => array(
array('id' => '0', 'name' => $this->l('Product name')),
@@ -122,7 +123,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_PRODUCTS_ORDER_WAY' => array(
'title' => $this->l('Default order method'),
'desc' => $this->l('Default order method for product list'),
'hint' => $this->l('Default order method for product list'),
'type' => 'select',
'list' => array(
array(
@@ -143,7 +144,7 @@ class AdminPPreferencesControllerCore extends AdminController
'fields' => array(
'PS_DISPLAY_QTIES' => array(
'title' => $this->l('Display available quantities on the product page'),
'desc' => '',
'hint' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -151,7 +152,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_LAST_QTIES' => array(
'title' => $this->l('Display remaining quantities when the qty is lower than'),
'desc' => $this->l('Set to "0" to disable this feature.'),
'hint' => $this->l('Set to "0" to disable this feature.'),
'validation' => 'isUnsignedId',
'required' => true,
'cast' => 'intval',
@@ -159,7 +160,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_DISPLAY_JQZOOM' => array(
'title' => $this->l('Enable JqZoom instead of Thickbox on the product page'),
'desc' => '',
'hint' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -167,7 +168,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_DISP_UNAVAILABLE_ATTR' => array(
'title' => $this->l('Display unavailable product attributes on the product page'),
'desc' => '',
'hint' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -175,7 +176,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_ATTRIBUTE_CATEGORY_DISPLAY' => array(
'title' => $this->l('Display the "add to cart" button when a product has attributes'),
'desc' => $this->l('Display or hide the "add to cart" button on category pages for products that have attributes forcing customers to see product details.'),
'hint' => $this->l('Display or hide the "add to cart" button on category pages for products that have attributes forcing customers to see product details.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
@@ -187,7 +188,7 @@ class AdminPPreferencesControllerCore extends AdminController
'fields' => array(
'PS_ORDER_OUT_OF_STOCK' => array(
'title' => $this->l('Allow ordering of out-of-stock products'),
'desc' => $this->l('Add to cart button is hidden when a product is unavailable'),
'hint' => $this->l('Add to cart button is hidden when a product is unavailable'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -195,7 +196,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_STOCK_MANAGEMENT' => array(
'title' => $this->l('Enable stock management'),
'desc' => '',
'hint' => '',
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
@@ -207,7 +208,7 @@ class AdminPPreferencesControllerCore extends AdminController
),
'PS_ADVANCED_STOCK_MANAGEMENT' => array(
'title' => $this->l('Enable advanced-stock management'),
'desc' => $this->l('Allows you to manage physical stock, warehouses and supply orders.'),
'hint' => $this->l('Allows you to manage physical stock, warehouses and supply orders.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
+14 -16
View File
@@ -94,12 +94,13 @@ class AdminThemesControllerCore extends AdminController
public function init()
{
// No cache for auto-refresh uploaded logo
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
parent::init();
$this->bootstrap = true;
$this->can_display_themes = (!Shop::isFeatureActive() || Shop::getContext() == Shop::CONTEXT_SHOP) ? true : false;
$this->fields_options = array(
@@ -116,13 +117,15 @@ class AdminThemesControllerCore extends AdminController
),
),
),
/* TO DO - DESC à revoir*/
'appearance' => array(
'title' => $this->l('Appearance'),
'icon' => 'email',
'fields' => array(
'PS_LOGO' => array(
'title' => $this->l('Header logo'),
'desc' => $this->l('Will appear on main page.').' '.$this->l('Recommended height: 52px. Maximum height on default theme: 65px.'),
'hint' => $this->l('Will appear on main page. Recommended height: 52px. Maximum height on default theme: 65px.'),
'type' => 'file',
'thumb' => _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time()
),
@@ -153,27 +156,27 @@ class AdminThemesControllerCore extends AdminController
'PS_FAVICON' => array(
'title' => $this->l('Favicon'),
'hint' => $this->l('Only ICO format allowed'),
'desc' => $this->l('Will appear in the address bar of your web browser.'),
'hint' => $this->l('Will appear in the address bar of your web browser.'),
'type' => 'file',
'thumb' => _PS_IMG_.Configuration::get('PS_FAVICON').'?date='.time()
),
'PS_STORES_ICON' => array(
'title' => $this->l('Store icon'),
'hint' => $this->l('Only GIF format allowed.'),
'desc' => $this->l('Will appear on the store locator (inside Google Maps).').'<br />'.$this->l('Suggested size: 30x30, Transparent GIF'),
'hint' => $this->l('Will appear on the store locator (inside Google Maps).').'<br />'.$this->l('Suggested size: 30x30, Transparent GIF'),
'type' => 'file',
'thumb' => _PS_IMG_.Configuration::get('PS_STORES_ICON').'?date='.time()
),
'PS_NAVIGATION_PIPE' => array(
'title' => $this->l('Navigation pipe'),
'desc' => $this->l('Used for the navigation path inside categories/product.'),
'hint' => $this->l('Used for the navigation path inside categories/product.'),
'cast' => 'strval',
'type' => 'text',
'size' => 20
),
'PS_ALLOW_MOBILE_DEVICE' => array(
'title' => $this->l('Enable the mobile theme.'),
'desc' => $this->l('Allows visitors browsing on mobile devices to view a lighter version of your website.'),
'hint' => $this->l('Allows visitors browsing on mobile devices to view a lighter version of your website.'),
'type' => 'radio',
'required' => true,
'validation' => 'isGenericName',
@@ -186,7 +189,7 @@ class AdminThemesControllerCore extends AdminController
),
'PS_MAIL_COLOR' => array(
'title' => $this->l('Mail color'),
'desc' => $this->l('Your mail will be highlighted in this color. HTML colors only, please (e.g.').' "lightblue", "#CC6600")',
'hint' => $this->l('Your mail will be highlighted in this color. HTML colors only, please (e.g.').' "lightblue", "#CC6600")',
'type' => 'color',
'name' => 'PS_MAIL_COLOR',
'size' => 30,
@@ -201,15 +204,12 @@ class AdminThemesControllerCore extends AdminController
'id_theme' => array(
'title' => $this->l('ID'),
'align' => 'center',
'width' => 20,
),
'name' => array(
'title' => $this->l('Name'),
'width' => 'auto',
),
'directory' => array(
'title' => $this->l('Directory'),
'width' => 'auto',
),
);
}
@@ -252,14 +252,13 @@ class AdminThemesControllerCore extends AdminController
'tinymce' => false,
'legend' => array(
'title' => $this->l('Theme'),
'image' => '../img/admin/themes.gif'
'icon' => 'icon-picture'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Name of the theme:'),
'name' => 'name',
'size' => 48,
'required' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}',
),
@@ -277,7 +276,7 @@ class AdminThemesControllerCore extends AdminController
'label' => $this->l('Name of the theme\'s directory:'),
'name' => 'directory',
'required' => true,
'desc' => $this->l('If the directory does not exists, it will be created.'),
'hint' => $this->l('If the directory does not exists, it will be created.'),
);
$theme_query = Theme::getThemes();
@@ -285,7 +284,7 @@ class AdminThemesControllerCore extends AdminController
'type' => 'select',
'name' => 'based_on',
'label' => $this->l('Copy missing files from existing theme:'),
'desc' => $this->l('If you create a new theme, it\'s recommended that you use default theme files.'),
'hint' => $this->l('If you create a new theme, it\'s recommended that you use default theme files.'),
'options' => array(
'id' => 'id', 'name' => 'name',
'default' => array('value' => 0, 'label' => '&nbsp;-&nbsp;'),
@@ -300,10 +299,9 @@ class AdminThemesControllerCore extends AdminController
'name' => 'directory',
'required' => true,
'br' => true,
'class' => 't',
'values' => $available_theme_dir,
'selected' => $selected_theme_dir,
'desc' => $this->l('Please select a valid theme directory.'),
'hint' => $this->l('Please select a valid theme directory.'),
);
return parent::renderForm();