// WIP customer

This commit is contained in:
Kevin Granger
2013-07-29 16:16:10 +02:00
parent 2ac6ada03d
commit ae225dce4c
6 changed files with 154 additions and 131 deletions
@@ -40,7 +40,11 @@
{block name="field"}
{if $input.type == 'text_customer'}
{if isset($customer)}
<div class="margin-form"><a style="display: block; padding-top: 4px;" href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={$tokenCustomer}">{$customer->lastname} {$customer->firstname} ({$customer->email})</a></div>
<div>
<a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={$tokenCustomer}">
{$customer->lastname} {$customer->firstname} ({$customer->email})
</a>
</div>
<input type="hidden" name="id_customer" value="{$customer->id}" />
<input type="hidden" name="email" value="{$customer->email}" />
{else}
@@ -79,8 +83,10 @@
}
});
</script>
<div class="margin-form">
<input type="text" size="33" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" style="text-transform: lowercase;" /> <sup>*</sup>
<input type="text" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}"/>
<sup>*</sup>
</div>
{/if}
{else}
@@ -69,9 +69,9 @@
<div class="row">
<div id="conf_id_{$key}" {if $field['is_invisible']} class="isInvisible"{/if}>
{if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
<div class="preference_default_multishop col-lg-6">
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1" {if !$field['is_disabled']}checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
</div>
<div class="preference_default_multishop col-lg-9">
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1" {if !$field['is_disabled']}checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
</div>
{/if}
{block name="label"}
{if isset($field['title']) && isset($field['desc'])}
@@ -88,7 +88,7 @@
{block name="input"}
{if $field['type'] == 'select'}
<div class="col-lg-6">
<div class="col-lg-9">
{if $field['list']}
<select name="{$key}"{if isset($field['js'])} onchange="{$field['js']}"{/if} id="{$key}" {if isset($field['size'])} size="{$field['size']}"{/if}>
{foreach $field['list'] AS $k => $option}
@@ -120,7 +120,7 @@
{elseif $field['type'] == 'radio'}
{foreach $field['choices'] AS $k => $v}
<div class="col-lg-6">
<div class="col-lg-9">
<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>
@@ -129,7 +129,7 @@
{/foreach}
{elseif $field['type'] == 'checkbox'}
{foreach $field['choices'] AS $k => $v}
<div class="col-lg-6">
<div class="col-lg-9">
<p class="checkbox">
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
<label class="col-lg-3" for="{$key}{$k}_on"> {$v}</label>
@@ -137,52 +137,98 @@
</div>
{/foreach}
{elseif $field['type'] == 'text'}
<div class="col-lg-6">
<div class="col-lg-9">
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
{if isset($field['suffix'])}&nbsp;{$field['suffix']|strval}{/if}
</div>
{elseif $field['type'] == 'password'}
<div class="col-lg-6">
<div class="col-lg-9">
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if} />
{if isset($field['suffix'])}&nbsp;{$field['suffix']|strval}{/if}
</div>
{elseif $field['type'] == 'textarea'}
<div class="col-lg-6">
<div class="col-lg-9">
<textarea name={$key} cols="{$field['cols']}" rows="{$field['rows']}">{$field['value']|escape:'htmlall':'UTF-8'}</textarea>
</div>
{elseif $field['type'] == 'file'}
{if isset($field['thumb']) && $field['thumb']}
<div class="col-lg-6">
<div class="col-lg-9">
<img src="{$field['thumb']}" alt="{$field['title']}" title="{$field['title']}" />
</div>
{/if}
<div class="col-lg-6">
<div class="col-lg-9">
<input type="file" name="{$key}" />
</div>
{elseif $field['type'] == 'color'}
<div class="col-lg-6">
<div class="col-lg-9">
<input type="color" size="{$field['size']}" data-hex="true" {if isset($input.class)}class="{$field['class']}" {else}class="color mColorPickerInput"{/if} name="{$field['name']}" class="{if isset($field['class'])}{$field['class']}{/if}" value="{$field['value']|escape:'htmlall':'UTF-8'}" />
</div>
{elseif $field['type'] == 'price'}
<div class="col-lg-6">
<div class="col-lg-9">
{$currency_left_sign}<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'htmlall':'UTF-8'}" />{$currency_right_sign} {l s='(tax excl.)'}
</div>
{elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'}
{if $field['type'] == 'textLang'}
{foreach $field['languages'] AS $id_lang => $value}
<div id="{$key}_{$id_lang}" style="display: {if $id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-1">
<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}_{$id_lang}" value="{$value|escape:'htmlall':'UTF-8'}" />
<div class="col-lg-9">
<div class="row">
{foreach $field['languages'] AS $id_lang => $value}
<div class="input-group col-lg-12 translatable-field lang-{$id_lang}" {if $id_lang != $current_id_lang}style="display:none;"{/if}>
<input type="text"
name="{$key}_{$id_lang}"
value="{$value|escape:'htmlall':'UTF-8'}"
{if isset($input.class)}class="{$input.class}"{/if}
/>
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$id_lang|intval}.jpg" alt="">
<!-- name -->
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach $languages as $language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang});"><img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/foreach}
</div>
{/foreach}
</div>
{elseif $field['type'] == 'textareaLang'}
{foreach $field['languages'] AS $id_lang => $value}
<div id="{$key}_{$id_lang}" style="display: {if $id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-6">
<textarea rows="{$field['rows']}" cols="{$field['cols']|intval}" name="{$key}_{$id_lang}">{$value|replace:'\r\n':"\n"}</textarea>
</div>
{/foreach}
<div class="col-lg-9">
{foreach $field['languages'] AS $id_lang => $value}
<div class="row translatable-field lang-{$id_lang}" {if $id_lang != $current_id_lang}style="display:none;"{/if}>
<div id="{$key}_{$id_lang}" class="col-lg-10" >
<textarea name="{$key}_{$id_lang}">{$value|replace:'\r\n':"\n"}</textarea>
</div>
<div class="input-group-btn col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="{$base_url}/img/l/{$id_lang|intval}.jpg" alt="">
<!-- name -->
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach $languages as $language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang});"><img src="{$base_url}/img/l/{$language.id_lang|intval}.jpg" alt=""> {$language.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/foreach}
</div>
{elseif $field['type'] == 'selectLang'}
{foreach $languages as $language}
<div id="{$key}_{$language.id_lang}" style="display: {if $language.id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-6">
<div id="{$key}_{$language.id_lang}" style="display: {if $language.id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-9">
<select name="{$key}_{$language.iso_code|upper}">
{foreach $field['list'] AS $k => $v}
<option value="{if isset($v.cast)}{$v.cast[$v[$field.identifier]]}{else}{$v[$field.identifier]}{/if}"
@@ -192,22 +238,25 @@
{/foreach}
</select>
</div>
{/foreach}
{/if}
{if count($languages) > 1}
{* TO DO - ajouter les langues*}
<div class="displayed_flag">
<img src="../img/l/{$current_id_lang}.jpg" class="pointer" id="language_current_{$key}" onclick="toggleLanguageFlags(this);" />
</div>
<div id="languages_{$key}" class="language_flags">
{l s='Choose language:'}<br /><br />
{foreach $languages as $language}
<img src="../img/l/{$language.id_lang}.jpg" class="pointer" alt="{$language.name}" title="{$language.name}" onclick="changeLanguage('{$key}', '{if isset($custom_key)}{$custom_key}{else}{$key}{/if}', {$language.id_lang}, '{$language.iso_code}');" />
{/foreach}
</div>
{/if}
<!--
{if count($languages) > 1}
<div class="displayed_flag">
<img src="../img/l/{$current_id_lang}.jpg" class="pointer" id="language_current_{$key}" onclick="toggleLanguageFlags(this);" />
</div>
<div id="languages_{$key}" class="language_flags">
{l s='Choose language:'}
{foreach $languages as $language}
<img src="../img/l/{$language.id_lang}.jpg" class="pointer" alt="{$language.name}" title="{$language.name}" onclick="changeLanguage('{$key}', '{if isset($custom_key)}{$custom_key}{else}{$key}{/if}', {$language.id_lang}, '{$language.iso_code}');" />
{/foreach}
</div>
{/if}
-->
{/if}
{if isset($field['required']) && $field['required'] && $field['type'] != 'radio'}
+17 -31
View File
@@ -31,6 +31,7 @@ class AdminAddressesControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
$this->required_database = true;
$this->required_fields = array('company','address2', 'postcode', 'other', 'phone', 'phone_mobile', 'vat_number', 'dni');
$this->table = 'address';
@@ -54,13 +55,13 @@ class AdminAddressesControllerCore extends AdminController
$this->countries_array[$country['id_country']] = $country['name'];
$this->fields_list = array(
'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'firstname' => array('title' => $this->l('First Name'), 'width' => 120, 'filter_key' => 'a!firstname'),
'lastname' => array('title' => $this->l('Last Name'), 'width' => 140, 'filter_key' => 'a!lastname'),
'id_address' => array('title' => $this->l('ID'), 'align' => 'center'),
'firstname' => array('title' => $this->l('First Name'), 'filter_key' => 'a!firstname'),
'lastname' => array('title' => $this->l('Last Name'), 'filter_key' => 'a!lastname'),
'address1' => array('title' => $this->l('Address')),
'postcode' => array('title' => $this->l('Zip/Postal Code'), 'align' => 'right', 'width' => 80),
'city' => array('title' => $this->l('City'), 'width' => 150),
'country' => array('title' => $this->l('Country'), 'width' => 100, 'type' => 'select', 'list' => $this->countries_array, 'filter_key' => 'cl!id_country'));
'postcode' => array('title' => $this->l('Zip/Postal Code'), 'align' => 'right'),
'city' => array('title' => $this->l('City')),
'country' => array('title' => $this->l('Country'), 'type' => 'select', 'list' => $this->countries_array, 'filter_key' => 'cl!id_country'));
parent::__construct();
@@ -87,29 +88,26 @@ class AdminAddressesControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Addresses'),
'image' => '../img/admin/contact.gif'
'icon' => 'icon-envelope-alt'
),
'input' => array(
array(
'type' => 'text_customer',
'label' => $this->l('Customer'),
'name' => 'id_customer',
'size' => 33,
'required' => false,
),
array(
'type' => 'text',
'label' => $this->l('Identification Number'),
'name' => 'dni',
'size' => 30,
'required' => false,
'desc' => $this->l('DNI / NIF / NIE')
'hint' => $this->l('DNI / NIF / NIE')
),
array(
'type' => 'text',
'label' => $this->l('Address alias'),
'name' => 'alias',
'size' => 33,
'required' => true,
'hint' => $this->l('Invalid characters:').' <>;=#{}'
),
@@ -117,30 +115,26 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Home phone'),
'name' => 'phone',
'size' => 33,
'required' => false,
),
array(
'type' => 'text',
'label' => $this->l('Mobile phone'),
'name' => 'phone_mobile',
'size' => 33,
'required' => false,
'desc' => Configuration::get('PS_ONE_PHONE_AT_LEAST')? sprintf($this->l('You must register at least one phone number %s'), '<sup>*</sup>') : ''
'hint' => Configuration::get('PS_ONE_PHONE_AT_LEAST')? sprintf($this->l('You must register at least one phone number %s')) : ''
),
array(
'type' => 'textarea',
'label' => $this->l('Other'),
'name' => 'other',
'cols' => 36,
'rows' => 4,
'required' => false,
'hint' => $this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span>'
),
),
'submit' => array(
'title' => $this->l('Save '),
'class' => 'button'
'class' => 'btn btn-primary'
)
);
$id_customer = (int)Tools::getValue('id_customer');
@@ -172,15 +166,13 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Company'),
'name' => 'company',
'size' => 33,
'required' => false,
'hint' => $this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span>'
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
);
$temp_fields[] = array(
'type' => 'text',
'label' => $this->l('VAT number'),
'name' => 'vat_number',
'size' => 33,
'name' => 'vat_number'
);
}
else if ($addr_field_item == 'lastname')
@@ -197,9 +189,8 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Last Name'),
'name' => 'lastname',
'size' => 33,
'required' => true,
'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"{}_$%:<span class="hint-pointer">&nbsp;</span>',
'hint' => $this->l('Invalid characters:').' 0-9!&lt;&gt;,;?=+()@#"{}_$%:',
'default_value' => $default_value,
);
}
@@ -217,9 +208,8 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('First Name'),
'name' => 'firstname',
'size' => 33,
'required' => true,
'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"{}_$%:<span class="hint-pointer">&nbsp;</span>',
'hint' => $this->l('Invalid characters:').' 0-9!&lt;&gt;,;?=+()@#"{}_$%:',
'default_value' => $default_value,
);
}
@@ -229,7 +219,6 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Address'),
'name' => 'address1',
'size' => 33,
'required' => true,
);
}
@@ -239,7 +228,6 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Address').' (2)',
'name' => 'address2',
'size' => 33,
'required' => false,
);
}
@@ -249,7 +237,6 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Zip/Postal Code'),
'name' => 'postcode',
'size' => 33,
'required' => true,
);
}
@@ -259,7 +246,6 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('City'),
'name' => 'city',
'size' => 33,
'required' => true,
);
}
@@ -274,7 +260,7 @@ class AdminAddressesControllerCore extends AdminController
'options' => array(
'query' => Country::getCountries($this->context->language->id),
'id' => 'id_country',
'name' => 'name',
'name' => 'name'
)
);
$temp_fields[] = array(
@@ -285,7 +271,7 @@ class AdminAddressesControllerCore extends AdminController
'options' => array(
'query' => array(),
'id' => 'id_state',
'name' => 'name',
'name' => 'name'
)
);
}
+12 -15
View File
@@ -28,6 +28,7 @@ class AdminContactsControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->table = 'contact';
$this->className = 'Contact';
$this->lang = true;
@@ -36,10 +37,10 @@ class AdminContactsControllerCore extends AdminController
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
$this->fields_list = array(
'id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Title'), 'width' => 130),
'email' => array('title' => $this->l('Email address'), 'width' => 130),
'description' => array('title' => $this->l('Description'), 'width' => 150),
'id_contact' => array('title' => $this->l('ID'), 'align' => 'center'),
'name' => array('title' => $this->l('Title')),
'email' => array('title' => $this->l('Email address')),
'description' => array('title' => $this->l('Description')),
);
parent::__construct();
@@ -50,34 +51,32 @@ class AdminContactsControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Contacts'),
'image' => '../img/admin/contact.gif'
'icon' => 'icon-envelope-alt'
),
'input' => array(
array(
'type' => 'text',
'label' => $this->l('Title'),
'name' => 'name',
'size' => 33,
'required' => true,
'lang' => true,
'desc' => $this->l('Contact name (e.g. Customer Support)'),
'hint' => $this->l('Contact name (e.g. Customer Support)'),
),
array(
'type' => 'text',
'label' => $this->l('Email address'),
'name' => 'email',
'size' => 33,
'required' => false,
'desc' => $this->l('Emails will be sent to this address'),
'hint' => $this->l('Emails will be sent to this address'),
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Save messages?'),
'name' => 'customer_service',
'required' => false,
'class' => 't',
'is_bool' => true,
'desc' => $this->l('If enabled, all messages will be saved in the "Customer Service" page under the "Customer" menu.'),
'hint' => $this->l('If enabled, all messages will be saved in the "Customer Service" page under the "Customer" menu.'),
'values' => array(
array(
'id' => 'customer_service_on',
@@ -97,14 +96,12 @@ class AdminContactsControllerCore extends AdminController
'name' => 'description',
'required' => false,
'lang' => true,
'cols' => 36,
'rows' => 5,
'desc' => $this->l('Further information regarding this contact'),
'hint' => $this->l('Further information regarding this contact'),
),
),
'submit' => array(
'title' => $this->l('Save '),
'class' => 'button'
'class' => 'btn btn-primary'
)
);
+24 -33
View File
@@ -34,6 +34,7 @@ class AdminCustomersControllerCore extends AdminController
public function __construct()
{
$this->bootstrap = true;
$this->required_database = true;
$this->required_fields = array('newsletter','optin');
$this->table = 'customer';
@@ -78,12 +79,10 @@ class AdminCustomersControllerCore extends AdminController
$this->fields_list = array(
'id_customer' => array(
'title' => $this->l('ID'),
'align' => 'center',
'width' => 20
'align' => 'center'
),
'id_gender' => array(
'title' => $this->l('Title'),
'width' => 70,
'align' => 'center',
'icon' => $genders_icon,
'orderby' => false,
@@ -92,35 +91,28 @@ class AdminCustomersControllerCore extends AdminController
'filter_key' => 'a!id_gender',
),
'lastname' => array(
'title' => $this->l('Last name'),
'width' => 'auto'
'title' => $this->l('Last name')
),
'firstname' => array(
'title' => $this->l('First Name'),
'width' => 'auto'
'title' => $this->l('First Name')
),
'email' => array(
'title' => $this->l('Email address'),
'width' => 140,
'title' => $this->l('Email address')
),
'age' => array(
'title' => $this->l('Age'),
'width' => 20,
'search' => false,
'align' => 'center'
),
'active' => array(
'title' => $this->l('Enabled'),
'width' => 70,
'align' => 'center',
'active' => 'status',
'type' => 'bool',
'orderby' => false,
'filter_key' => 'a!active',
'orderby' => false
),
'newsletter' => array(
'title' => $this->l('News.'),
'width' => 70,
'align' => 'center',
'type' => 'bool',
'callback' => 'printNewsIcon',
@@ -128,7 +120,6 @@ class AdminCustomersControllerCore extends AdminController
),
'optin' => array(
'title' => $this->l('Opt.'),
'width' => 70,
'align' => 'center',
'type' => 'bool',
'callback' => 'printOptinIcon',
@@ -136,13 +127,11 @@ class AdminCustomersControllerCore extends AdminController
),
'date_add' => array(
'title' => $this->l('Registration'),
'width' => 150,
'type' => 'date',
'align' => 'right'
),
'connect' => array(
'title' => $this->l('Last visit'),
'width' => 100,
'type' => 'datetime',
'search' => false,
'havingFilter' => true
@@ -264,7 +253,7 @@ class AdminCustomersControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Customer'),
'image' => '../img/admin/tab-customers.gif'
'icon' => 'icon-user'
),
'input' => array(
array(
@@ -304,7 +293,7 @@ class AdminCustomersControllerCore extends AdminController
'name' => 'passwd',
'size' => 33,
'required' => ($obj->id ? false : true),
'desc' => ($obj->id ? $this->l('Leave this field blank if there\'s no change') : $this->l('Minimum of five characters (only letters and numbers).').' -_')
'hint' => ($obj->id ? $this->l('Leave this field blank if there\'s no change') : $this->l('Minimum of five characters (only letters and numbers).').' -_')
),
array(
'type' => 'birthday',
@@ -317,7 +306,7 @@ class AdminCustomersControllerCore extends AdminController
)
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Status:'),
'name' => 'active',
'required' => false,
@@ -335,10 +324,10 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('Disabled')
)
),
'desc' => $this->l('Enable or disable customer login')
'hint' => $this->l('Enable or disable customer login')
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Newsletter:'),
'name' => 'newsletter',
'required' => false,
@@ -356,10 +345,10 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('Disabled')
)
),
'desc' => $this->l('Customers will receive your newsletter via email.')
'hint' => $this->l('Customers will receive your newsletter via email.')
),
array(
'type' => 'radio',
'type' => 'switch',
'label' => $this->l('Opt in:'),
'name' => 'optin',
'required' => false,
@@ -377,7 +366,7 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('Disabled')
)
),
'desc' => $this->l('Customer will receive your ads via email.')
'hint' => $this->l('Customer will receive your ads via email.')
),
)
);
@@ -395,12 +384,12 @@ class AdminCustomersControllerCore extends AdminController
$this->fields_form['input'] = array_merge($this->fields_form['input'],
array(
array(
'type' => 'group',
'label' => $this->l('Group access:'),
'name' => 'groupBox',
'values' => $groups,
'required' => true,
'desc' => $this->l('Select all the groups that you would like to apply to this customer.')
'type' => 'group',
'label' => $this->l('Group access:'),
'name' => 'groupBox',
'values' => $groups,
'required' => true,
'hint' => $this->l('Select all the groups that you would like to apply to this customer.')
),
array(
'type' => 'select',
@@ -411,8 +400,10 @@ class AdminCustomersControllerCore extends AdminController
'id' => 'id_group',
'name' => 'name'
),
'hint' => $this->l('The group will be as applied by default.'),
'desc' => $this->l('Apply the discount\'s price of this group.')
'hint' => array(
$this->l('The group will be as applied by default.'),
$this->l('Apply the discount\'s price of this group.')
)
)
)
);
+7 -13
View File
@@ -28,6 +28,7 @@ class AdminGendersControllerCore extends AdminController
{
public function __construct()
{
$this->bootstrap = true;
$this->table = 'gender';
$this->className = 'Gender';
$this->lang = true;
@@ -52,17 +53,14 @@ class AdminGendersControllerCore extends AdminController
$this->fields_list = array(
'id_gender' => array(
'title' => $this->l('ID'),
'align' => 'center',
'width' => 25
'align' => 'center'
),
'name' => array(
'title' => $this->l('Name'),
'width' => 'auto',
'filter_key' => 'b!name'
),
'type' => array(
'title' => $this->l('Type'),
'width' => 100,
'orderby' => false,
'type' => 'select',
'list' => array(
@@ -72,15 +70,14 @@ class AdminGendersControllerCore extends AdminController
),
'filter_key' => 'a!type',
'callback' => 'displayGenderType',
'callback_object' => $this,
'callback_object' => $this
),
'image' => array(
'title' => $this->l('Image'),
'align' => 'center',
'image' => 'genders',
'orderby' => false,
'search' => false,
'width' => 40
'search' => false
)
);
@@ -92,7 +89,7 @@ class AdminGendersControllerCore extends AdminController
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Titles'),
'image' => '../img/admin/tab-genders.gif'
'icon' => 'icon-male'
),
'input' => array(
array(
@@ -100,7 +97,6 @@ class AdminGendersControllerCore extends AdminController
'label' => $this->l('Name:'),
'name' => 'name',
'lang' => true,
'size' => 33,
'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"{}_$%:',
'required' => true
),
@@ -138,15 +134,13 @@ class AdminGendersControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Image Width:'),
'name' => 'img_width',
'size' => 4,
'desc' => $this->l('Image width in pixels. Enter "0" to use the original size.')
'hint' => $this->l('Image width in pixels. Enter "0" to use the original size.')
),
array(
'type' => 'text',
'label' => $this->l('Image Height:'),
'name' => 'img_height',
'size' => 4,
'desc' => $this->l('Image height in pixels. Enter "0" to use the original size.')
'hint' => $this->l('Image height in pixels. Enter "0" to use the original size.')
)
),
'submit' => array(