From f1e24553157bc93e3159eaf36c17b0a186158244 Mon Sep 17 00:00:00 2001 From: franck Date: Wed, 11 Sep 2013 09:50:47 +0200 Subject: [PATCH 01/10] fixed typo --- core/lib/Thelia/Controller/Admin/BaseAdminController.php | 1 + core/lib/Thelia/Core/Template/Assets/AsseticHelper.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index 21fffd3d9..84f2e39ae 100755 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -39,6 +39,7 @@ use Thelia\Model\LangQuery; use Thelia\Form\BaseForm; use Thelia\Form\Exception\FormValidationException; use Thelia\Log\Tlog; +use Symfony\Component\Routing\Router; class BaseAdminController extends BaseController { diff --git a/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php b/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php index a3323ae2a..294fa9e92 100755 --- a/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php +++ b/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php @@ -124,7 +124,7 @@ class AsseticHelper // // before generating 3bc974a-ad3ef47.css, delete 3bc974a-* files. // - if ($dev_mode == true || ! file_exists($target_file)) { + if (/*$dev_mode == true || */! file_exists($target_file)) { // Delete previous version of the file list($commonPart, $dummy) = explode('-', $asset_target_path); From 953bf005a177a33a4f7df7afaff4917397ff7edb Mon Sep 17 00:00:00 2001 From: mespeche Date: Wed, 11 Sep 2013 11:39:33 +0200 Subject: [PATCH 02/10] - Change boolean type to integer type for update_logged_in_user field - Create view for customer modification --- core/lib/Thelia/Form/CustomerModification.php | 58 +++++-- templates/admin/default/customer-edit.html | 152 ++++++++++++++++++ templates/admin/default/customers.html | 10 +- 3 files changed, 206 insertions(+), 14 deletions(-) create mode 100644 templates/admin/default/customer-edit.html diff --git a/core/lib/Thelia/Form/CustomerModification.php b/core/lib/Thelia/Form/CustomerModification.php index 61f1e0834..358154a18 100755 --- a/core/lib/Thelia/Form/CustomerModification.php +++ b/core/lib/Thelia/Form/CustomerModification.php @@ -24,6 +24,7 @@ namespace Thelia\Form; use Symfony\Component\Validator\Constraints; +use Thelia\Core\Translation\Translator; /** * Class CustomerModification @@ -56,60 +57,93 @@ class CustomerModification extends BaseForm { $this->formBuilder - ->add('update_logged_in_user', 'boolean') // In a front office context, update the in-memory logged-in user data + ->add('update_logged_in_user', 'integer') // In a front office context, update the in-memory logged-in user data ->add("firstname", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "firstname" + "label" => Translator::getInstance()->trans("First Name"), + "label_attr" => array( + "for" => "firstname" + ) )) ->add("lastname", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "lastname" + "label" => Translator::getInstance()->trans("Last Name"), + "label_attr" => array( + "for" => "lastname" + ) )) ->add("address1", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "address" + "label_attr" => array( + "for" => "address" + ), + "label" => Translator::getInstance()->trans("Street Address") )) ->add("address2", "text", array( - "label" => "Address Line 2" + "label" => Translator::getInstance()->trans("Address Line 2"), + "label_attr" => array( + "for" => "address2" + ) )) ->add("address3", "text", array( - "label" => "Address Line 3" + "label" => Translator::getInstance()->trans("Address Line 3"), + "label_attr" => array( + "for" => "address3" + ) )) ->add("phone", "text", array( - "label" => "phone" + "label" => Translator::getInstance()->trans("Phone"), + "label_attr" => array( + "for" => "phone" + ) )) ->add("cellphone", "text", array( - "label" => "cellphone" + "label" => Translator::getInstance()->trans("Cellphone"), + "label_attr" => array( + "for" => "cellphone" + ) )) ->add("zipcode", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "zipcode" + "label" => Translator::getInstance()->trans("Zip code"), + "label_attr" => array( + "for" => "zipcode" + ) )) ->add("city", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "city" + "label" => Translator::getInstance()->trans("City"), + "label_attr" => array( + "for" => "city" + ) )) ->add("country", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "country" + "label" => Translator::getInstance()->trans("Country"), + "label_attr" => array( + "for" => "country" + ) )) ->add("title", "text", array( "constraints" => array( new Constraints\NotBlank() ), - "label" => "title" + "label" => Translator::getInstance()->trans("Title"), + "label_attr" => array( + "for" => "title" + ) )) ; } diff --git a/templates/admin/default/customer-edit.html b/templates/admin/default/customer-edit.html new file mode 100644 index 000000000..d3f9b6bc5 --- /dev/null +++ b/templates/admin/default/customer-edit.html @@ -0,0 +1,152 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Edit a customer'}{/block} + +{block name="check-permissions"}admin.customer.edit{/block} + +{block name="main-content"} +
+ +
+ + {loop name="customer_edit" type="customer" current="false" id="$customer_id" backend_context="1" lang="$edit_language_id"} + + + +
+
+
+ +
+ {intl l="Edit customer $FIRSTNAME $LASTNAME"} +
+ +
+
+ + {form name="thelia.customer.modification"} +
+ + {* Be sure to get the customer ID, even if the form could not be validated *} + + + {include file="includes/inner-form-toolbar.html"} + + {form_hidden_fields form=$form} + + {form_field form=$form field='success_url'} + + {/form_field} + + {if $form_error}
{$form_error_message}
{/if} + +
+ + {form_field form=$form field='title'} +
+ + + +
+ {/form_field} + + {form_field form=$form field='firstname'} +
+ + +
+ {/form_field} + + {form_field form=$form field='lastname'} +
+ + +
+ {/form_field} + +
+ +
+ {loop name="address" type="address" customer="$customer_id" backend_context="1"} + + {form_field form=$form field='address1'} +
+ + +
+ {/form_field} + + {form_field form=$form field='address2'} +
+ +
+ {/form_field} + + {form_field form=$form field='address3'} +
+ +
+ {/form_field} + + {form_field form=$form field='zipcode'} +
+ + +
+ {/form_field} + + {form_field form=$form field='city'} +
+ + +
+ {/form_field} + + {form_field form=$form field='country'} +
+ + +
+ {/form_field} + + {/loop} +
+ +
+ {/form} + +
+
+ +
+
+ +
+ + {/loop} + + {elseloop rel="customer_edit"} +
+
+
+ {intl l="Sorry, customer ID=$customer_id was not found."} +
+
+
+ {/elseloop} + +
+
+{/block} \ No newline at end of file diff --git a/templates/admin/default/customers.html b/templates/admin/default/customers.html index 570c38bdc..faec8fb34 100644 --- a/templates/admin/default/customers.html +++ b/templates/admin/default/customers.html @@ -9,7 +9,7 @@ {assign var=customer_page value={$smarty.get.page|default:1}} -
+
@@ -150,7 +150,13 @@ {/form_field} - + {form_field form=$form field='company'} +
+ + +
+ {/form_field} + {form_field form=$form field='title'}
From abb501af29e1ba6daaa576bf060517580820df16 Mon Sep 17 00:00:00 2001 From: mespeche Date: Wed, 11 Sep 2013 11:43:49 +0200 Subject: [PATCH 03/10] Add breadcrumb to customers view --- templates/admin/default/customers.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/admin/default/customers.html b/templates/admin/default/customers.html index faec8fb34..a43c59131 100644 --- a/templates/admin/default/customers.html +++ b/templates/admin/default/customers.html @@ -11,7 +11,11 @@
- + + {module_include location='customer_top'} From f50d41b32ce49183a9b9bdcb5a4ad02d2eea1da5 Mon Sep 17 00:00:00 2001 From: mespeche Date: Wed, 11 Sep 2013 11:46:50 +0200 Subject: [PATCH 04/10] Change breadcrumb separator color --- templates/admin/default/assets/less/thelia/variables.less | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/admin/default/assets/less/thelia/variables.less b/templates/admin/default/assets/less/thelia/variables.less index 35bc931b5..77ef1dfd3 100755 --- a/templates/admin/default/assets/less/thelia/variables.less +++ b/templates/admin/default/assets/less/thelia/variables.less @@ -49,5 +49,8 @@ // Forms // ------------------------- +@input-border-focus: @link-color; -@input-border-focus: @link-color; \ No newline at end of file +// Breadcrumbs +// ------------------------- +@breadcrumb-color: #333; \ No newline at end of file From ae786f2139f80a657bb6fc8e7cb19992ce65e04f Mon Sep 17 00:00:00 2001 From: franck Date: Wed, 11 Sep 2013 12:14:39 +0200 Subject: [PATCH 05/10] Added process_assets config variable --- .../Core/Template/Assets/AsseticHelper.php | 36 ++++++++++--------- install/insert.sql | 4 +-- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php b/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php index 294fa9e92..349fa178a 100755 --- a/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php +++ b/core/lib/Thelia/Core/Template/Assets/AsseticHelper.php @@ -29,6 +29,7 @@ use Assetic\Filter; use Assetic\Factory\AssetFactory; use Assetic\Factory\Worker\CacheBustingWorker; use Assetic\AssetWriter; +use Thelia\Model\ConfigQuery; /** * This class is a simple helper for generating assets using Assetic. @@ -124,27 +125,30 @@ class AsseticHelper // // before generating 3bc974a-ad3ef47.css, delete 3bc974a-* files. // - if (/*$dev_mode == true || */! file_exists($target_file)) { + if ($dev_mode == true || ! file_exists($target_file)) { - // Delete previous version of the file - list($commonPart, $dummy) = explode('-', $asset_target_path); + if (ConfigQuery::read('process_assets', true)) { - foreach (glob("$output_path/$commonPart-*") as $filename) { - @unlink($filename); - } + // Delete previous version of the file + list($commonPart, $dummy) = explode('-', $asset_target_path); - // Apply filters now - foreach ($filter_list as $filter) { - if ('?' != $filter[0]) { - $asset->ensureFilter($fm->get($filter)); - } elseif (!$debug) { - $asset->ensureFilter($fm->get(substr($filter, 1))); + foreach (glob("$output_path/$commonPart-*") as $filename) { + @unlink($filename); } + + // Apply filters now + foreach ($filter_list as $filter) { + if ('?' != $filter[0]) { + $asset->ensureFilter($fm->get($filter)); + } elseif (!$debug) { + $asset->ensureFilter($fm->get(substr($filter, 1))); + } + } + + $writer = new AssetWriter($output_path); + + $writer->writeAsset($asset); } - - $writer = new AssetWriter($output_path); - - $writer->writeAsset($asset); } return rtrim($output_url, '/').'/'.$asset_target_path; diff --git a/install/insert.sql b/install/insert.sql index da1414ce3..4ef9de276 100755 --- a/install/insert.sql +++ b/install/insert.sql @@ -17,8 +17,8 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat ('image_cache_dir_from_web_root', 'cache/images', 0, 0, NOW(), NOW()), ('currency_rate_update_url', 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml', 0, 0, NOW(), NOW()), ('page_not_found_view', '404.html', 0, 0, NOW(), NOW()), -('use_tax_free_amounts', 1, 1, 0, NOW(), NOW()); - +('use_tax_free_amounts', '1', 0, 0, NOW(), NOW()); +('process_assets', '1', 0, 0, NOW(), NOW()); INSERT INTO `module` (`id`, `code`, `type`, `activate`, `position`, `full_namespace`, `created_at`, `updated_at`) VALUES (1, 'DebugBar', 1, 1, 1, 'DebugBar\\DebugBar', NOW(), NOW()); From d21e4532c9697b1428147083b5acf144da48316c Mon Sep 17 00:00:00 2001 From: mespeche Date: Wed, 11 Sep 2013 13:32:21 +0200 Subject: [PATCH 06/10] - Add creation address form - Add addresses list - Add update address form --- core/lib/Thelia/Form/AddressCreateForm.php | 68 +++- core/lib/Thelia/Form/AddressUpdateForm.php | 107 ++++++ templates/admin/default/assets/js/main.js | 5 + templates/admin/default/customer-edit.html | 382 ++++++++++++++++++++- 4 files changed, 542 insertions(+), 20 deletions(-) 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..b4acac7ae 100644 --- a/templates/admin/default/customer-edit.html +++ b/templates/admin/default/customer-edit.html @@ -45,6 +45,7 @@ {if $form_error}
{$form_error_message}
{/if}
+

{intl l="Customer informations"}

{form_field form=$form field='title'}
@@ -70,12 +71,11 @@
- {/form_field} + {/form_field} -
- -
- {loop name="address" type="address" customer="$customer_id" backend_context="1"} + {loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"} + +

{intl l="Default address"}

{form_field form=$form field='address1'}
@@ -121,7 +121,111 @@
{/form_field} - {/loop} + {/loop} + +
+ +
+

+ {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 +
+
+
+ + + + + + + + + + + + + +
+
@@ -149,4 +253,270 @@
+ + + {* Add an Address *} + + {form name="thelia.address.create"} + + {* Capture the dialog body, to pass it to the generic dialog *} + {capture "address_creation_dialog"} + + {form_hidden_fields form=$form} + + {form_field form=$form field='label'} +
+ + +
+ {/form_field} + + {form_field form=$form field='company'} +
+ + +
+ {/form_field} + + {form_field form=$form field='title'} +
+ + + +
+ {/form_field} + + {form_field form=$form field='firstname'} +
+ + +
+ {/form_field} + + {form_field form=$form field='lastname'} +
+ + +
+ {/form_field} + + {form_field form=$form field='address1'} +
+ + +
+ +
+ {form_field form=$form field='address2'} + + {/form_field} +
+ +
+ {form_field form=$form field='address3'} + + {/form_field} +
+ {/form_field} + + {form_field form=$form field='zipcode'} +
+ + +
+ {/form_field} + + {form_field form=$form field='city'} +
+ + +
+ {/form_field} + + {form_field form=$form field='country'} +
+ + +
+ {/form_field} + + {/capture} + + {include + file = "includes/generic-create-dialog.html" + + dialog_id = "address_creation_dialog" + dialog_title = {intl l="Create an address"} + dialog_body = {$smarty.capture.address_creation_dialog nofilter} + + dialog_ok_label = {intl l="Create this address"} + dialog_cancel_label = {intl l="Cancel"} + + form_action = {url path='/admin/address/create'} + form_enctype = {form_enctype form=$form} + form_error_message = $form_error_message + } + + {/form} + + {* Update an Address *} + + {form name="thelia.address.update"} + + {* Capture the dialog body, to pass it to the generic dialog *} + {capture "edit_address_dialog"} + + {form_hidden_fields form=$form} + + {form_field form=$form field='label'} +
+ + +
+ {/form_field} + + {form_field form=$form field='company'} +
+ + +
+ {/form_field} + + {form_field form=$form field='title'} +
+ + + +
+ {/form_field} + + {form_field form=$form field='firstname'} +
+ + +
+ {/form_field} + + {form_field form=$form field='lastname'} +
+ + +
+ {/form_field} + + {form_field form=$form field='address1'} +
+ + +
+ +
+ {form_field form=$form field='address2'} + + {/form_field} +
+ +
+ {form_field form=$form field='address3'} + + {/form_field} +
+ {/form_field} + + {form_field form=$form field='zipcode'} +
+ + +
+ {/form_field} + + {form_field form=$form field='city'} +
+ + +
+ {/form_field} + + {form_field form=$form field='country'} +
+ + +
+ {/form_field} + + {/capture} + + {include + file = "includes/generic-create-dialog.html" + + dialog_id = "edit_address_dialog" + dialog_title = {intl l="Edit an address"} + dialog_body = {$smarty.capture.edit_address_dialog nofilter} + + dialog_ok_label = {intl l="Edit this address"} + dialog_cancel_label = {intl l="Cancel"} + + form_action = {url path='/admin/address/update'} + form_enctype = {form_enctype form=$form} + form_error_message = $form_error_message + } + + {/form} + + + {* Default confirmation dialog *} + + {capture "use_address_dialog"} + + {/capture} + + {include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "use_address_dialog" + dialog_title = {intl l="Use address by default"} + dialog_message = {intl l="Do you really want to use this address by default ?"} + + form_action = {url path='/admin/address/use'} + form_content = {$smarty.capture.use_address_dialog nofilter} + } + + {* Delete confirmation dialog *} + + {capture "delete_address_dialog"} + + {/capture} + + {include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "delete_address_dialog" + dialog_title = {intl l="Delete address"} + dialog_message = {intl l="Do you really want to delete this address ?"} + + form_action = {url path='/admin/address/delete'} + form_content = {$smarty.capture.delete_dialog nofilter} + } +{/block} + +{block name="javascript-initialization"} + {javascripts file='assets/js/main.js'} + + {/javascripts} {/block} \ No newline at end of file From e02ed4d6549ac72e0d42a03c4206be634c1cb8ef Mon Sep 17 00:00:00 2001 From: mespeche Date: Wed, 11 Sep 2013 14:36:32 +0200 Subject: [PATCH 07/10] Add tooltip --- templates/admin/default/customer-edit.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/admin/default/customer-edit.html b/templates/admin/default/customer-edit.html index b4acac7ae..c512bb056 100644 --- a/templates/admin/default/customer-edit.html +++ b/templates/admin/default/customer-edit.html @@ -186,7 +186,7 @@ - + @@ -213,7 +213,7 @@ - + From 36d2b873ff9d460dac737e8210c5771f3a5cd4ad Mon Sep 17 00:00:00 2001 From: franck Date: Wed, 11 Sep 2013 15:08:56 +0200 Subject: [PATCH 08/10] Removed a redondant "use" --- core/lib/Thelia/Controller/Admin/BaseAdminController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index f2d76f5ab..4fb8bf31e 100755 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -25,7 +25,6 @@ namespace Thelia\Controller\Admin; use Symfony\Component\Routing\Exception\InvalidParameterException; use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\Router; use Thelia\Controller\BaseController; use Symfony\Component\HttpFoundation\Response; use Thelia\Core\Security\Exception\AuthorizationException; From 1ec9e7486d57f803e2dda4bfd45d027b0be01dc0 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 11 Sep 2013 15:21:43 +0200 Subject: [PATCH 09/10] just add Propel information in phpDebugBar --- local/modules/DebugBar/Config/config.xml | 2 +- local/modules/DebugBar/Listeners/DebugBarListeners.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/local/modules/DebugBar/Config/config.xml b/local/modules/DebugBar/Config/config.xml index 6713c8ce6..12c5ccd24 100644 --- a/local/modules/DebugBar/Config/config.xml +++ b/local/modules/DebugBar/Config/config.xml @@ -30,7 +30,7 @@ - + diff --git a/local/modules/DebugBar/Listeners/DebugBarListeners.php b/local/modules/DebugBar/Listeners/DebugBarListeners.php index 7d0981d5d..336aa952c 100644 --- a/local/modules/DebugBar/Listeners/DebugBarListeners.php +++ b/local/modules/DebugBar/Listeners/DebugBarListeners.php @@ -22,7 +22,11 @@ /*************************************************************************************/ namespace DebugBar\Listeners; +use DebugBar\DataCollector\MemoryCollector; +use DebugBar\DataCollector\MessagesCollector; +use DebugBar\DataCollector\PhpInfoCollector; use DebugBar\DataCollector\PropelCollector; +use DebugBar\DataCollector\TimeDataCollector; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\KernelEvents; use Thelia\Action\BaseAction; @@ -40,6 +44,12 @@ class DebugBarListeners extends BaseAction implements EventSubscriberInterface { { $debugBar = $this->container->get("debugBar"); + + $debugBar->addCollector(new PhpInfoCollector()); + //$debugBar->addCollector(new MessagesCollector()); + //$debugBar->addCollector(new RequestDataCollector()); + //$debugBar->addCollector(new TimeDataCollector()); + $debugBar->addCollector(new MemoryCollector()); $debugBar->addCollector(new PropelCollector()); } From 769993cc96f21eb37bd0dc7eb1024be8c3985da7 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 11 Sep 2013 15:26:47 +0200 Subject: [PATCH 10/10] add TimeDataCollector --- local/modules/DebugBar/Listeners/DebugBarListeners.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/modules/DebugBar/Listeners/DebugBarListeners.php b/local/modules/DebugBar/Listeners/DebugBarListeners.php index 336aa952c..f789a9a13 100644 --- a/local/modules/DebugBar/Listeners/DebugBarListeners.php +++ b/local/modules/DebugBar/Listeners/DebugBarListeners.php @@ -48,7 +48,7 @@ class DebugBarListeners extends BaseAction implements EventSubscriberInterface { $debugBar->addCollector(new PhpInfoCollector()); //$debugBar->addCollector(new MessagesCollector()); //$debugBar->addCollector(new RequestDataCollector()); - //$debugBar->addCollector(new TimeDataCollector()); + $debugBar->addCollector(new TimeDataCollector()); $debugBar->addCollector(new MemoryCollector()); $debugBar->addCollector(new PropelCollector()); }