diff --git a/core/lib/Thelia/Form/AddressCreateForm.php b/core/lib/Thelia/Form/AddressCreateForm.php index 472a7429c..ed1750047 100644 --- a/core/lib/Thelia/Form/AddressCreateForm.php +++ b/core/lib/Thelia/Form/AddressCreateForm.php @@ -23,6 +23,7 @@ namespace Thelia\Form; use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Core\Translation\Translator; /** * Class AddressCreateForm @@ -59,65 +60,104 @@ class AddressCreateForm extends BaseForm "constraints" => array( new NotBlank() ), - "label" => "address name", + "label" => Translator::getInstance()->trans("Address label *"), + "label_attr" => array( + "for" => "label_create" + ), "required" => true )) ->add("title", "text", array( "constraints" => array( new NotBlank() ), - "label" => "title" + "label" => Translator::getInstance()->trans("Title"), + "label_attr" => array( + "for" => "title_create" + ) )) ->add("firstname", "text", array( "constraints" => array( new NotBlank() ), - "label" => "first name" + "label" => Translator::getInstance()->trans("Firstname"), + "label_attr" => array( + "for" => "firstname_create" + ) )) ->add("lastname", "text", array( "constraints" => array( new NotBlank() ), - "label" => "last name" + "label" => Translator::getInstance()->trans("Lastname"), + "label_attr" => array( + "for" => "lastname_create" + ) )) ->add("address1", "text", array( "constraints" => array( new NotBlank() ), - "label" => "address" + "label" => Translator::getInstance()->trans("Street Address"), + "label_attr" => array( + "for" => "address1_create" + ) )) - ->add("address2", "text", array( - "label" => "address (line 2)" + ->add("address2", "text", array( + "label" => Translator::getInstance()->trans("Additional address"), + "label_attr" => array( + "for" => "address2_create" + ) )) ->add("address3", "text", array( - "label" => "address (line 3)" + "label" => Translator::getInstance()->trans("Additional address"), + "label_attr" => array( + "for" => "address3_create" + ) )) ->add("zipcode", "text", array( "constraints" => array( new NotBlank() ), - "label" => "zipcode" + "label" => Translator::getInstance()->trans("Zip code"), + "label_attr" => array( + "for" => "zipcode_create" + ) )) ->add("city", "text", array( "constraints" => array( new NotBlank() ), - "label" => "city" + "label" => Translator::getInstance()->trans("City"), + "label_attr" => array( + "for" => "city_create" + ) )) ->add("country", "text", array( "constraints" => array( new NotBlank() ), - "label" => "country" + "label" => Translator::getInstance()->trans("Country"), + "label_attr" => array( + "for" => "country_create" + ) )) ->add("phone", "text", array( - "label" => "phone" + "label" => Translator::getInstance()->trans("Phone"), + "label_attr" => array( + "for" => "phone_create" + ) )) ->add("cellphone", "text", array( - "label" => "cellphone" + "label" => Translator::getInstance()->trans("Cellphone"), + "label_attr" => array( + "for" => "cellphone_create" + ) )) ->add("company", "text", array( - "label" => "company" + "label" => Translator::getInstance()->trans("Compagny"), + "label_attr" => array( + "for" => "company_create" + ) )) ; } diff --git a/core/lib/Thelia/Form/AddressUpdateForm.php b/core/lib/Thelia/Form/AddressUpdateForm.php index 556841261..4fcf6e29c 100644 --- a/core/lib/Thelia/Form/AddressUpdateForm.php +++ b/core/lib/Thelia/Form/AddressUpdateForm.php @@ -23,6 +23,7 @@ namespace Thelia\Form; use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Core\Translation\Translator; /** * Class AddressUpdateForm @@ -55,6 +56,112 @@ class AddressUpdateForm extends AddressCreateForm { parent::buildForm(); + $this->formBuilder + ->add("label", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Address label *"), + "label_attr" => array( + "for" => "label_update" + ), + "required" => true + )) + ->add("title", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Title"), + "label_attr" => array( + "for" => "title_update" + ) + )) + ->add("firstname", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Firstname"), + "label_attr" => array( + "for" => "firstname_update" + ) + )) + ->add("lastname", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Lastname"), + "label_attr" => array( + "for" => "lastname_update" + ) + )) + ->add("address1", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Street Address"), + "label_attr" => array( + "for" => "address1_update" + ) + )) + ->add("address2", "text", array( + "label" => Translator::getInstance()->trans("Additional address"), + "label_attr" => array( + "for" => "address2_update" + ) + )) + ->add("address3", "text", array( + "label" => Translator::getInstance()->trans("Additional address"), + "label_attr" => array( + "for" => "address3_update" + ) + )) + ->add("zipcode", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Zip code"), + "label_attr" => array( + "for" => "zipcode_update" + ) + )) + ->add("city", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("City"), + "label_attr" => array( + "for" => "city_update" + ) + )) + ->add("country", "text", array( + "constraints" => array( + new NotBlank() + ), + "label" => Translator::getInstance()->trans("Country"), + "label_attr" => array( + "for" => "country_update" + ) + )) + ->add("phone", "text", array( + "label" => Translator::getInstance()->trans("Phone"), + "label_attr" => array( + "for" => "phone_update" + ) + )) + ->add("cellphone", "text", array( + "label" => Translator::getInstance()->trans("Cellphone"), + "label_attr" => array( + "for" => "cellphone_update" + ) + )) + ->add("company", "text", array( + "label" => Translator::getInstance()->trans("Compagny"), + "label_attr" => array( + "for" => "company_update" + ) + )) + ; + } /** diff --git a/templates/admin/default/assets/js/main.js b/templates/admin/default/assets/js/main.js index c8fc1a7b7..d472a22a9 100644 --- a/templates/admin/default/assets/js/main.js +++ b/templates/admin/default/assets/js/main.js @@ -69,6 +69,11 @@ } + // -- Bootstrap tooltip -- + if($('[rel="tooltip"]').length){ + $('[rel="tooltip"]').tooltip(); + } + // -- Confirm Box -- if($('[data-toggle="confirm"]').length){ $('[data-toggle="confirm"]').click(function(e){ diff --git a/templates/admin/default/customer-edit.html b/templates/admin/default/customer-edit.html index d3f9b6bc5..c512bb056 100644 --- a/templates/admin/default/customer-edit.html +++ b/templates/admin/default/customer-edit.html @@ -45,6 +45,7 @@ {if $form_error}
{intl l="Customer informations"}
{form_field form=$form field='title'}{intl l="Default address"}
{form_field form=$form field='address1'}+ {intl l="Other addresses"} + + + + + +
+ +| {intl l="Address"} | +{intl l="Actions"} | +
|---|---|
|
+
+ Twitter, Inc. + 795 Folsom Ave, Suite 600 + San Francisco, CA 94107 + P: (123) 456-7890 + + |
+ + + | +
|
+
+ Twitter, Inc. + 795 Folsom Ave, Suite 600 + San Francisco, CA 94107 + P: (123) 456-7890 + + |
+ + + | +
|
+
+ Twitter, Inc. + 795 Folsom Ave, Suite 600 + San Francisco, CA 94107 + P: (123) 456-7890 + + |
+ + + | +