Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

Conflicts:
	controllers/admin/AdminCategoriesController.php
This commit is contained in:
Jerome Nadaud
2013-10-25 14:29:02 +02:00
97 changed files with 3010 additions and 1960 deletions
@@ -114,6 +114,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Identification Number'),
'name' => 'dni',
'required' => false,
'col' => '4',
'hint' => $this->l('DNI / NIF / NIE')
),
array(
@@ -121,6 +122,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Address alias'),
'name' => 'alias',
'required' => true,
'col' => '4',
'hint' => $this->l('Invalid characters:').' <>;=#{}'
),
array(
@@ -128,6 +130,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Home phone'),
'name' => 'phone',
'required' => false,
'col' => '4',
'hint' => Configuration::get('PS_ONE_PHONE_AT_LEAST') ? sprintf($this->l('You must register at least one phone number')) : ''
),
array(
@@ -135,6 +138,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Mobile phone'),
'name' => 'phone_mobile',
'required' => false,
'col' => '4',
'hint' => Configuration::get('PS_ONE_PHONE_AT_LEAST') ? sprintf($this->l('You must register at least one phone number')) : ''
),
array(
@@ -182,11 +186,13 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Company'),
'name' => 'company',
'required' => false,
'col' => '4',
'hint' => $this->l('Invalid characters:').' <>;=#{}'
);
$temp_fields[] = array(
'type' => 'text',
'label' => $this->l('VAT number'),
'col' => '2',
'name' => 'vat_number'
);
}
@@ -205,6 +211,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Last Name'),
'name' => 'lastname',
'required' => true,
'col' => '4',
'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:',
'default_value' => $default_value,
);
@@ -224,6 +231,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('First Name'),
'name' => 'firstname',
'required' => true,
'col' => '4',
'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:',
'default_value' => $default_value,
);
@@ -234,6 +242,7 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Address'),
'name' => 'address1',
'col' => '6',
'required' => true,
);
}
@@ -243,6 +252,7 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Address').' (2)',
'name' => 'address2',
'col' => '6',
'required' => false,
);
}
@@ -252,6 +262,7 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Zip/Postal Code'),
'name' => 'postcode',
'col' => '2',
'required' => true,
);
}
@@ -261,6 +272,7 @@ class AdminAddressesControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('City'),
'name' => 'city',
'col' => '4',
'required' => true,
);
}
@@ -271,6 +283,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Country'),
'name' => 'id_country',
'required' => false,
'col' => '4',
'default_value' => (int)$this->context->country->id,
'options' => array(
'query' => Country::getCountries($this->context->language->id),
@@ -283,6 +296,7 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('State'),
'name' => 'id_state',
'required' => false,
'col' => '4',
'options' => array(
'query' => array(),
'id' => 'id_state',
@@ -185,6 +185,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
'name' => 'name',
'lang' => true,
'required' => true,
'col' => '4',
'hint' => $this->l('Invalid characters:').' <>;=#{}'
),
array(
@@ -193,6 +194,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
'name' => 'public_name',
'lang' => true,
'required' => true,
'col' => '4',
'hint' => $this->l('Group name displayed to the customer').'&nbsp;'.$this->l('Invalid characters:').' <>;=#{}'
),
array(
@@ -205,6 +207,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
'id' => 'id',
'name' => 'name'
),
'col' => '2',
'hint' => $this->l('Choose the type of the attribute')
)
)
@@ -60,6 +60,7 @@ class AdminContactsControllerCore extends AdminController
'name' => 'name',
'required' => true,
'lang' => true,
'col' => 4,
'hint' => $this->l('Contact name (e.g. Customer Support)'),
),
array(
@@ -67,6 +68,7 @@ class AdminContactsControllerCore extends AdminController
'label' => $this->l('Email address'),
'name' => 'email',
'required' => false,
'col' => 4,
'hint' => $this->l('Emails will be sent to this address'),
),
array(
@@ -96,6 +98,7 @@ class AdminContactsControllerCore extends AdminController
'name' => 'description',
'required' => false,
'lang' => true,
'col' => 6,
'hint' => $this->l('Further information regarding this contact'),
),
),
+31 -24
View File
@@ -284,6 +284,7 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('First name:'),
'name' => 'firstname',
'required' => true,
'col' => '4',
'hint' => $this->l('Forbidden characters:').' 0-9!&lt;&gt;,;?=+()@#"�{}_$%:'
),
array(
@@ -291,12 +292,14 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('Last name:'),
'name' => 'lastname',
'required' => true,
'col' => '4',
'hint' => $this->l('Invalid characters:').' 0-9!&lt;&gt;,;?=+()@#"�{}_$%:'
),
array(
'type' => 'text',
'label' => $this->l('Email address:'),
'name' => 'email',
'col' => '4',
'required' => true
),
array(
@@ -304,6 +307,7 @@ class AdminCustomersControllerCore extends AdminController
'label' => $this->l('Password:'),
'name' => 'passwd',
'required' => ($obj->id ? false : true),
'col' => '4',
'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(
@@ -392,32 +396,35 @@ class AdminCustomersControllerCore extends AdminController
unset($groups[$key]);
}
$this->fields_form['input'] = array_merge($this->fields_form['input'],
$this->fields_form['input'] = array_merge(
$this->fields_form['input'],
array(
array(
array(
'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',
'label' => $this->l('Default customer group:'),
'name' => 'id_default_group',
'options' => array(
'query' => $groups,
'id' => 'id_group',
'name' => 'name'
),
'hint' => array(
$this->l('The group will be as applied by default.'),
$this->l('Apply the discount\'s price of this group.')
)
)
'type' => 'group',
'label' => $this->l('Group access:'),
'name' => 'groupBox',
'values' => $groups,
'required' => true,
'col' => '6',
'hint' => $this->l('Select all the groups that you would like to apply to this customer.')
),
array(
'type' => 'select',
'label' => $this->l('Default customer group:'),
'name' => 'id_default_group',
'options' => array(
'query' => $groups,
'id' => 'id_group',
'name' => 'name'
),
'col' => '4',
'hint' => array(
$this->l('The group will be as applied by default.'),
$this->l('Apply the discount\'s price of this group.')
)
);
)
)
);
// if customer is a guest customer, password hasn't to be there
if ($obj->id && ($obj->is_guest && $obj->id_default_group == Configuration::get('PS_GUEST_GROUP')))
@@ -110,6 +110,7 @@ class AdminGendersControllerCore extends AdminController
'label' => $this->l('Name:'),
'name' => 'name',
'lang' => true,
'col' => 4,
'hint' => $this->l('Invalid characters:').' 0-9!&lt;&gt;,;?=+()@#"�{}_$%:',
'required' => true
),
@@ -141,18 +142,21 @@ class AdminGendersControllerCore extends AdminController
'type' => 'file',
'label' => $this->l('Image:'),
'name' => 'image',
'col' => 6,
'value' => true
),
array(
'type' => 'text',
'label' => $this->l('Image Width:'),
'name' => 'img_width',
'col' => 2,
'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',
'col' => 2,
'hint' => $this->l('Image height in pixels. Enter "0" to use the original size.')
)
),
+5 -2
View File
@@ -221,7 +221,7 @@ class AdminGroupsControllerCore extends AdminController
'date_add' => array('title' => $this->l('Register date'), 'type' => 'date', 'class' => 'fixed-width-md', 'align' => 'center'),
'active' => array('title' => $this->l('Enabled'),'align' => 'center', 'class' => 'fixed-width-sm', 'active' => 'status','type' => 'bool', 'filter_key' => 'c!active')
));
$this->_select = 'c.*';
$this->_select = 'c.*, a.id_group';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (a.`id_customer` = c.`id_customer`)';
$this->_where = 'AND a.`id_group` = '.(int)$group->id.' AND c.`deleted` != 1';
self::$currentIndex = self::$currentIndex.'&viewgroup';
@@ -240,7 +240,7 @@ class AdminGroupsControllerCore extends AdminController
'icon' => 'icon-group'
),
'submit' => array(
'title' => $this->l('Save '),
'title' => $this->l('Save'),
'class' => 'btn btn-default'
),
'input' => array(
@@ -250,18 +250,21 @@ class AdminGroupsControllerCore extends AdminController
'name' => 'name',
'required' => true,
'lang' => true,
'col' => 4,
'hint' => $this->l('Forbidden characters:').' 0-9!&amp;lt;&amp;gt;,;?=+()@#"�{}_$%:'
),
array(
'type' => 'text',
'label' => $this->l('Discount (%):'),
'name' => 'reduction',
'col' => 2,
'hint' => $this->l('Automatically apply this value as a discount on all products for members of this customer group.')
),
array(
'type' => 'select',
'label' => $this->l('Price display method:'),
'name' => 'price_display_method',
'col' => 2,
'hint' => $this->l('How prices are displayed in the order summary for this customer group.'),
'options' => array(
'query' => array(
@@ -287,6 +287,7 @@ class AdminManufacturersControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Name:'),
'name' => 'name',
'col' => 4,
'required' => true,
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
@@ -298,6 +299,7 @@ class AdminManufacturersControllerCore extends AdminController
'cols' => 60,
'rows' => 10,
'autoload_rte' => 'rte', //Enable TinyMCE editor for short description
'col' => 6,
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
array(
@@ -307,6 +309,7 @@ class AdminManufacturersControllerCore extends AdminController
'lang' => true,
'cols' => 60,
'rows' => 10,
'col' => 6,
'autoload_rte' => 'rte', //Enable TinyMCE editor for description
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}'
),
@@ -317,6 +320,7 @@ class AdminManufacturersControllerCore extends AdminController
'image' => $image_url ? $image_url : false,
'size' => $image_size,
'display_image' => true,
'col' => 6,
'hint' => $this->l('Upload a manufacturer logo from your computer.')
),
array(
@@ -324,6 +328,7 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('Meta title:'),
'name' => 'meta_title',
'lang' => true,
'col' => 4,
'hint' => $this->l('Forbidden characters:').' &lt;&gt;;=#{}'
),
array(
@@ -331,6 +336,7 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('Meta description:'),
'name' => 'meta_description',
'lang' => true,
'col' => 6,
'hint' => $this->l('Forbidden characters:').' &lt;&gt;;=#{}'
),
array(
@@ -338,6 +344,7 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('Meta keywords:'),
'name' => 'meta_keywords',
'lang' => true,
'col' => 6,
'hint' => array(
$this->l('Forbidden characters:').' &lt;&gt;;=#{}',
$this->l('To add "tags," click inside the field, write something, and then press "Enter."')
@@ -435,6 +442,7 @@ class AdminManufacturersControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Manufacturer:'),
'name' => 'name',
'col' => 4,
'disabled' => true,
);
@@ -459,6 +467,7 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('Last name:'),
'name' => 'lastname',
'required' => true,
'col' => 4,
'hint' => $this->l('Invalid characters:').' 0-9!&lt;&gt;,;?=+()@#"�{}_$%:'
);
$form['input'][] = array(
@@ -466,24 +475,28 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('First name:'),
'name' => 'firstname',
'required' => true,
'col' => 4,
'hint' => $this->l('Invalid characters:').' 0-9!&lt;&gt;,;?=+()@#"�{}_$%:'
);
$form['input'][] = array(
'type' => 'text',
'label' => $this->l('Address:'),
'name' => 'address1',
'col' => 6,
'required' => true,
);
$form['input'][] = array(
'type' => 'text',
'label' => $this->l('Address (2):'),
'name' => 'address2',
'col' => 6,
'required' => false,
);
$form['input'][] = array(
'type' => 'text',
'label' => $this->l('Zip Code/Postal Code'),
'name' => 'postcode',
'col' => 2,
'required' => true,
'required' => false,
);
@@ -491,6 +504,7 @@ class AdminManufacturersControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('City:'),
'name' => 'city',
'col' => 4,
'required' => true,
);
$form['input'][] = array(
@@ -499,6 +513,7 @@ class AdminManufacturersControllerCore extends AdminController
'name' => 'id_country',
'required' => false,
'default_value' => (int)$this->context->country->id,
'col' => 4,
'options' => array(
'query' => Country::getCountries($this->context->language->id),
'id' => 'id_country',
@@ -510,6 +525,7 @@ class AdminManufacturersControllerCore extends AdminController
'label' => $this->l('State:'),
'name' => 'id_state',
'required' => false,
'col' => 4,
'options' => array(
'query' => array(),
'id' => 'id_state',
@@ -520,12 +536,14 @@ class AdminManufacturersControllerCore extends AdminController
'type' => 'text',
'label' => $this->l('Home phone:'),
'name' => 'phone',
'col' => 4,
'required' => false,
);
$form['input'][] = array(
'type' => 'text',
'label' => $this->l('Mobile phone:'),
'name' => 'phone_mobile',
'col' => 4,
'required' => false,
);
$form['input'][] = array(
@@ -535,7 +553,8 @@ class AdminManufacturersControllerCore extends AdminController
'required' => false,
'hint' => $this->l('Forbidden characters:').' &lt;&gt;;=#{}',
'rows' => 2,
'cols' => 10
'cols' => 10,
'col' => 6,
);
$form['submit'] = array(
'title' => $this->l('Save '),
@@ -108,6 +108,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Name'),
'name' => 'name',
'required' => true,
'col' => 4,
'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',
),
array(
@@ -126,6 +127,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Phone:'),
'name' => 'phone',
'maxlength' => 16,
'col' => 4,
'hint' => $this->l('Phone number for this supplier')
),
array(
@@ -133,12 +135,14 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Address:'),
'name' => 'address',
'maxlength' => 128,
'col' => 6,
'required' => true
),
array(
'type' => 'text',
'label' => $this->l('Address:').' (2)',
'name' => 'address2',
'col' => 6,
'maxlength' => 128,
),
array(
@@ -146,6 +150,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Postal Code/Zip Code:'),
'name' => 'postcode',
'maxlength' => 12,
'col' => 2,
'required' => true,
),
array(
@@ -153,6 +158,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('City:'),
'name' => 'city',
'maxlength' => 32,
'col' => 4,
'required' => true,
),
array(
@@ -160,6 +166,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Country:'),
'name' => 'id_country',
'required' => true,
'col' => 4,
'default_value' => (int)$this->context->country->id,
'options' => array(
'query' => Country::getCountries($this->context->language->id, false),
@@ -171,6 +178,7 @@ class AdminSuppliersControllerCore extends AdminController
'type' => 'select',
'label' => $this->l('State'),
'name' => 'id_state',
'col' => 4,
'options' => array(
'id' => 'id_state',
'query' => array(),
@@ -191,6 +199,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Meta title:'),
'name' => 'meta_title',
'lang' => true,
'col' => 4,
'hint' => $this->l('Forbidden characters:').' &lt;&gt;;=#{}'
),
array(
@@ -198,6 +207,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Meta description:'),
'name' => 'meta_description',
'lang' => true,
'col' => 6,
'hint' => $this->l('Forbidden characters:').' &lt;&gt;;=#{}'
),
array(
@@ -205,6 +215,7 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Meta keywords:'),
'name' => 'meta_keywords',
'lang' => true,
'col' => 6,
'hint' => array(
$this->l('To add "tags" click in the field, write something and then press "Enter"'),
$this->l('Forbidden characters:').' &lt;&gt;;=#{}'