diff --git a/.gitignore b/.gitignore index bbaa9036..7cf954a1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,6 @@ coverage .buildpath .project .settings/ -local/media/documents/* -local/media/images/* -!local/media/images/store/favicon.png -!local/media/images/store/logo.png -!local/media/images/store/banner.jpg web/assets/* web/cache/* web/tinymce diff --git a/local/media/images/carousel/abricot-moeulleux-e1607343895996-1.jpg b/local/media/images/carousel/abricot-moeulleux-e1607343895996-1.jpg new file mode 100644 index 00000000..cc9885d2 Binary files /dev/null and b/local/media/images/carousel/abricot-moeulleux-e1607343895996-1.jpg differ diff --git a/local/media/images/carousel/pomme-pink-e1604311872719-2.png b/local/media/images/carousel/pomme-pink-e1604311872719-2.png new file mode 100644 index 00000000..1f2baae9 Binary files /dev/null and b/local/media/images/carousel/pomme-pink-e1604311872719-2.png differ diff --git a/local/media/images/module/WireTransfer-1-logo.png b/local/media/images/module/WireTransfer-1-logo.png new file mode 100644 index 00000000..c131327d Binary files /dev/null and b/local/media/images/module/WireTransfer-1-logo.png differ diff --git a/local/media/images/product/pomme-pink-e1604311872719-1.png b/local/media/images/product/pomme-pink-e1604311872719-1.png new file mode 100644 index 00000000..1f2baae9 Binary files /dev/null and b/local/media/images/product/pomme-pink-e1604311872719-1.png differ diff --git a/local/media/images/store/6017c618005d3-logo-declinaison-rvb.jpg b/local/media/images/store/6017c618005d3-logo-declinaison-rvb.jpg new file mode 100644 index 00000000..7c367aaa Binary files /dev/null and b/local/media/images/store/6017c618005d3-logo-declinaison-rvb.jpg differ diff --git a/local/media/images/store/6017c6f9178ed-logo-rvb.jpg.ico b/local/media/images/store/6017c6f9178ed-logo-rvb.jpg.ico new file mode 100644 index 00000000..9a6cf0a3 Binary files /dev/null and b/local/media/images/store/6017c6f9178ed-logo-rvb.jpg.ico differ diff --git a/local/media/images/store/6017c7cc57b4b-logo.jpg b/local/media/images/store/6017c7cc57b4b-logo.jpg new file mode 100644 index 00000000..bb13ff5c Binary files /dev/null and b/local/media/images/store/6017c7cc57b4b-logo.jpg differ diff --git a/local/media/images/store/banner.jpg b/local/media/images/store/banner.jpg new file mode 100644 index 00000000..c80e1652 Binary files /dev/null and b/local/media/images/store/banner.jpg differ diff --git a/local/media/images/store/favicon.png b/local/media/images/store/favicon.png new file mode 100644 index 00000000..5669f3e7 Binary files /dev/null and b/local/media/images/store/favicon.png differ diff --git a/local/media/images/store/logo.png b/local/media/images/store/logo.png new file mode 100644 index 00000000..6cb56aea Binary files /dev/null and b/local/media/images/store/logo.png differ diff --git a/local/modules/HookTest/Config/config.xml b/local/modules/HookTest/Config/config.xml deleted file mode 100644 index 6b26bd61..00000000 --- a/local/modules/HookTest/Config/config.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/local/modules/HookTest/Config/module.xml b/local/modules/HookTest/Config/module.xml deleted file mode 100644 index 9cd16c76..00000000 --- a/local/modules/HookTest/Config/module.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - HookTest\HookTest - - Hook module tester - - - Hook module tester - - 0.1 - - Julien Chanséaume - jchanseaume@openstudio.fr - - classic - 2.0.0 - other - diff --git a/local/modules/HookTest/Hook/FrontHook.php b/local/modules/HookTest/Hook/FrontHook.php deleted file mode 100644 index ea805a63..00000000 --- a/local/modules/HookTest/Hook/FrontHook.php +++ /dev/null @@ -1,170 +0,0 @@ - - */ -class FrontHook extends BaseHook { - - protected $ldelim = "::"; - protected $rdelim = "::"; - - - public function onMainHeadTop(HookRenderEvent $event) - { - $event->add($this->mark("main.head-top test0")); - } - - public function onMainHeadTopTest1(HookRenderEvent $event) - { - $event->add($this->mark("main.head-top test1")); - } - - public function onMainHeadTopTest2(HookRenderEvent $event) - { - $event->add($this->mark("main.head-top test2")); - } - - public function onMainHeadTopTest3(HookRenderEvent $event) - { - $event->add($this->mark("main.head-top test3")); - } - - - // == Hook Function ===================================================== - - public function onMainBodyTop(HookRenderEvent $event){ - $event->add($this->mark("main.body-top 1-1")); - $event->add($this->mark("main.body-top 1-2")); - } - - public function onMainBodyTop2(HookRenderEvent $event) - { - $event->add($this->mark("main.body-top 2")); - } - - - // == ifhook / elsehook ================================================ - - public function onMainNavbarSecondary(HookRenderEvent $event){ - $event->add($this->mark("main.navbar-secondary 1")); - } - - /** - * empty string should be considered as empty :) and should activate the elsehook - * - * @param HookRenderEvent $event - */ - public function onMainNavbarPrimary(HookRenderEvent $event) - { - $event->add(""); - $event->add(" "); - } - - public function onProductAdditional(HookRenderEvent $event) - { - // nothing added - } - - - // == hookblock / forhook ============================================== - - public function onMainFooterBody(HookRenderBlockEvent $event) - { - $event->addFragment(new Fragment(array( - "id" => "id1", - "class" => "class1", - "content" => "content1" - ))); - $event->add(array( - "id" => "id2", - "class" => "class2", - "content" => "content2" - )); - } - - // == global objects =================================================== - - public function onMainContentTop(HookRenderEvent $event) - { - $event->add($this->mark("main.content-top")); - $event->add($this->mark("view : " . $this->getView())); - $event->add($this->mark("request : " . $this->getRequest())); - $event->add($this->mark("session : " . $this->getSession()->getId())); - $event->add($this->mark("cart : " . ($this->getCart() === null ? "null" : "not null"))); - $event->add($this->mark("order : " . ($this->getOrder() === null ? "null" : "not null"))); - $event->add($this->mark("currency : " . $this->getCurrency()->getId())); - $event->add($this->mark("customer : " . $this->getCustomer())); - $event->add($this->mark("lang : " . $this->getLang()->getId())); - } - - public function onMainContentTopRender(HookRenderEvent $event) - { - $event->add($this->render("render.html")); - } - - public function onMainContentTopDump(HookRenderEvent $event) - { - $event->add($this->dump("dump.txt")); - } - - public function onMainContentTopAddCSS(HookRenderEvent $event) - { - $event->add($this->mark($this->addCSS("assets/css/styles.css"))); - $event->add($this->mark($this->addCSS("assets/css/print.css", array("media" => "print")))); - } - - public function onMainContentTopAddJS(HookRenderEvent $event) - { - $event->add($this->mark($this->addJS("assets/js/script.js"))); - } - - public function onMainContentTopTrans(HookRenderEvent $event) - { - $event->add($this->mark($this->trans("Hodor Hodor", array(), "hooktest"))); - $event->add($this->mark($this->trans("Hello World", array(), "hooktest"))); - $event->add($this->mark($this->trans("Hello %name%", array("%name%" => "Hodor")))); - $event->add($this->mark($this->trans("Hi %name%", array("%name%" => "Hodor"), "hooktest", 'fr_FR'))); - } - - // == template overriding ==================================================== - - public function onMainContentTopOverriding(HookRenderEvent $event) - { - $event->add($this->render("override1.html")); - // redefined in template hooktest in the module - $event->add($this->render("override2.html")); - // redefined in template hooktest - $event->add($this->render("override3.html")); - - $event->add($this->render("override-assets.html")); - - } - - - - protected function mark($message, $endofline="\n") - { - return sprintf("%s %s %s%s", $this->ldelim, $message, $this->rdelim, $endofline); - } - -} \ No newline at end of file diff --git a/local/modules/HookTest/HookTest.php b/local/modules/HookTest/HookTest.php deleted file mode 100644 index 1a95a557..00000000 --- a/local/modules/HookTest/HookTest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'Hodor en_US Hodor', - 'Hello World' => 'Hello en_US World', - 'Hello %name%' => 'Hello en_US %name%', - 'Hi %name%' => 'Hi en_US %name%', -); diff --git a/local/modules/HookTest/I18n/fr_FR.php b/local/modules/HookTest/I18n/fr_FR.php deleted file mode 100644 index 78016ce0..00000000 --- a/local/modules/HookTest/I18n/fr_FR.php +++ /dev/null @@ -1,7 +0,0 @@ - 'Hodor fr_FR Hodor', - 'Hello World' => 'Bonjour fr_FR monde', - 'Hello %name%' => 'Bonjour fr_FR %name%', - 'Hi %name%' => 'Salut fr_FR %name%', -); diff --git a/local/modules/HookTest/I18n/frontOffice/default/en_US.php b/local/modules/HookTest/I18n/frontOffice/default/en_US.php deleted file mode 100644 index afca37ed..00000000 --- a/local/modules/HookTest/I18n/frontOffice/default/en_US.php +++ /dev/null @@ -1,5 +0,0 @@ - - {ifloop rel="cartloop"} - - {/ifloop} - {elseloop rel="cartloop"} - - {/elseloop} - \ No newline at end of file diff --git a/local/modules/HookTest/templates/frontOffice/default/override-assets.html b/local/modules/HookTest/templates/frontOffice/default/override-assets.html deleted file mode 100644 index 3702db3c..00000000 --- a/local/modules/HookTest/templates/frontOffice/default/override-assets.html +++ /dev/null @@ -1,13 +0,0 @@ - - -{stylesheets file="assets/css/style1.css" source="HookTest"} -asset file 1 : {$asset_url} -{/stylesheets} -{stylesheets file="assets/css/style2.css" source="HookTest"} -asset file 2 : {$asset_url} -{/stylesheets} -{stylesheets file="assets/css/style3.css" source="HookTest"} -asset file 3 : {$asset_url} -{/stylesheets} - - \ No newline at end of file diff --git a/local/modules/HookTest/templates/frontOffice/default/override1.html b/local/modules/HookTest/templates/frontOffice/default/override1.html deleted file mode 100644 index 31b1e3e4..00000000 --- a/local/modules/HookTest/templates/frontOffice/default/override1.html +++ /dev/null @@ -1 +0,0 @@ -:: file override1 from module/default :: diff --git a/local/modules/HookTest/templates/frontOffice/default/override2.html b/local/modules/HookTest/templates/frontOffice/default/override2.html deleted file mode 100644 index d3744dba..00000000 --- a/local/modules/HookTest/templates/frontOffice/default/override2.html +++ /dev/null @@ -1 +0,0 @@ -:: file override2 from module/default :: diff --git a/local/modules/HookTest/templates/frontOffice/default/override3.html b/local/modules/HookTest/templates/frontOffice/default/override3.html deleted file mode 100644 index e178cc79..00000000 --- a/local/modules/HookTest/templates/frontOffice/default/override3.html +++ /dev/null @@ -1 +0,0 @@ -:: file override3 from module/default :: diff --git a/local/modules/HookTest/templates/frontOffice/default/render.html b/local/modules/HookTest/templates/frontOffice/default/render.html deleted file mode 100644 index 217a5f63..00000000 --- a/local/modules/HookTest/templates/frontOffice/default/render.html +++ /dev/null @@ -1,2 +0,0 @@ - -:: function render :: diff --git a/local/modules/HookTest/templates/frontOffice/hooktest/assets/css/style2.css b/local/modules/HookTest/templates/frontOffice/hooktest/assets/css/style2.css deleted file mode 100644 index 348fd427..00000000 --- a/local/modules/HookTest/templates/frontOffice/hooktest/assets/css/style2.css +++ /dev/null @@ -1 +0,0 @@ -/* style2 in module/hooktest */ \ No newline at end of file diff --git a/local/modules/HookTest/templates/frontOffice/hooktest/override2.html b/local/modules/HookTest/templates/frontOffice/hooktest/override2.html deleted file mode 100644 index 108fb477..00000000 --- a/local/modules/HookTest/templates/frontOffice/hooktest/override2.html +++ /dev/null @@ -1 +0,0 @@ -:: file override2 from module/hooktest :: diff --git a/local/modules/LivraisonParSecteurs/Config/config.xml b/local/modules/LivraisonParSecteurs/Config/config.xml index ba000b1e..3a5fac10 100644 --- a/local/modules/LivraisonParSecteurs/Config/config.xml +++ b/local/modules/LivraisonParSecteurs/Config/config.xml @@ -20,10 +20,11 @@ - - + + + diff --git a/local/modules/LivraisonParSecteurs/Hook/AdminHook.php b/local/modules/LivraisonParSecteurs/Hook/AdminHook.php index fec57cb3..3bf96997 100644 --- a/local/modules/LivraisonParSecteurs/Hook/AdminHook.php +++ b/local/modules/LivraisonParSecteurs/Hook/AdminHook.php @@ -21,7 +21,7 @@ class AdminHook extends BaseHook $this->securityContext = $securityContext; } - public function onModuleConfig(HookRenderEvent $event) + public function onMainTopMenuTools(HookRenderEvent $event) { $isGranted = $this->securityContext->isGranted( ["ADMIN"], @@ -31,10 +31,26 @@ class AdminHook extends BaseHook ); if ($isGranted) { - $event->add($this->render("deliveryarea-list.html", $event->getArguments())); + $event->add($this->render("menu-hook.html", $event->getArguments())); } } + +// public function onModuleConfig(HookRenderEvent $event) +// { +// $isGranted = $this->securityContext->isGranted( +// ["ADMIN"], +// [], +// [LivraisonParSecteurs::getModuleCode()], +// [AccessManager::VIEW] +// ); +// +// if ($isGranted) { +// $event->add($this->render("deliveryarea-list.html", $event->getArguments())); +// } +// } + + /* Pour intégrer la date prévue de livraison dans différents formulaires (email, backOffice, ...) */ public function displayDeliveryDate(HookRenderEvent $event) { diff --git a/local/modules/LivraisonParSecteurs/templates/backOffice/default/menu-hook.html b/local/modules/LivraisonParSecteurs/templates/backOffice/default/menu-hook.html new file mode 100644 index 00000000..64236456 --- /dev/null +++ b/local/modules/LivraisonParSecteurs/templates/backOffice/default/menu-hook.html @@ -0,0 +1,3 @@ +
  • + {intl l='Module name' d='livraisonparsecteurs'} +
  • \ No newline at end of file diff --git a/local/modules/TheliaMigrateCountry/Config/config.xml b/local/modules/TheliaMigrateCountry/Config/config.xml deleted file mode 100644 index 9a63718e..00000000 --- a/local/modules/TheliaMigrateCountry/Config/config.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - -
    - - - - - - - - - - - - - - - - - - - diff --git a/local/modules/TheliaMigrateCountry/Config/module.xml b/local/modules/TheliaMigrateCountry/Config/module.xml deleted file mode 100644 index e567af8e..00000000 --- a/local/modules/TheliaMigrateCountry/Config/module.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - TheliaMigrateCountry\TheliaMigrateCountry - - Countries/states migration tool - - - Utilitaire de migration des pays/états - - - en_US - fr_FR - - 2.4.3 - - - Julien Chanséaume - julien@thelia.net - - - classic - 2.3.0 - alpha - diff --git a/local/modules/TheliaMigrateCountry/Config/routing.xml b/local/modules/TheliaMigrateCountry/Config/routing.xml deleted file mode 100644 index 111b7cb7..00000000 --- a/local/modules/TheliaMigrateCountry/Config/routing.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - TheliaMigrateCountry\Controller\MigrateController::migrateSystemAction - - - - TheliaMigrateCountry\Controller\MigrateController::doMigrateSystemAction - - - diff --git a/local/modules/TheliaMigrateCountry/Controller/MigrateController.php b/local/modules/TheliaMigrateCountry/Controller/MigrateController.php deleted file mode 100644 index 9b582845..00000000 --- a/local/modules/TheliaMigrateCountry/Controller/MigrateController.php +++ /dev/null @@ -1,175 +0,0 @@ - - */ -class MigrateController extends BaseAdminController -{ - protected $useFallbackTemplate = true; - - public function migrateSystemAction() - { - $response = $this->checkAuth(AdminResources::COUNTRY, array(), AccessManager::UPDATE); - if (null !== $response) { - return $response; - } - - // load country not migrated - $dataForm = []; - - $migratedCountries = json_decode(ConfigQuery::read('thelia_country_state_migration', '[]'), true); - - $countries = CountryQuery::create() - ->filterByHasStates(1) - ; - - /** @var Country $country */ - foreach ($countries as $country) { - $oldCountries = CountryQuery::create() - ->filterByHasStates(0) - ->filterByIsocode($country->getIsoCode()) - ->find() - ; - /** @var Country $oldCountry */ - foreach ($oldCountries as $oldCountry) { - if (!isset($migratedCountries[$oldCountry->getId()])) { - $dataForm[] = [ - 'migrate' => false, - 'country' => $oldCountry->getId(), - 'new_country' => $country->getId(), - 'new_state' => null - ]; - } - } - } - - // prepare form - $form = $this->createForm('thelia.admin.country.state.migration', 'form', ['migrations' => $dataForm]); - $this->getParserContext()->addForm($form); - - return $this->render( - 'countries-migrate', - [ - 'countriesMigrated' => $migratedCountries, - 'showForm' => count($dataForm) != 0 - ] - ); - } - - public function doMigrateSystemAction() - { - $response = $this->checkAuth(AdminResources::COUNTRY, array(), AccessManager::UPDATE); - if (null !== $response) { - return $response; - } - - $changeForm = $this->createForm('thelia.admin.country.state.migration', 'form'); - - try { - // Check the form against constraints violations - $form = $this->validateForm($changeForm, "POST"); - - // Get the form field values - $data = $form->getData(); - - foreach ($data['migrations'] as $migration) { - - if (!$migration['migrate']) { - continue; - } - - $changeEvent = new MigrateCountryEvent( - $migration['country'], - $migration['new_country'], - $migration['new_state'] - ); - - $this->dispatch(MigrateCountryEvents::MIGRATE_COUNTRY, $changeEvent); - - // memorize the migration - $migratedCountries = json_decode(ConfigQuery::read('thelia_country_state_migration', '[]'), true); - $migratedCountries[$changeEvent->getCountry()] = [ - 'country' => $changeEvent->getNewCountry(), - 'state' => $changeEvent->getNewState(), - 'counter' => $changeEvent->getCounter() - ]; - ConfigQuery::write('thelia_country_state_migration', json_encode($migratedCountries)); - - // message - $message = $this->getTranslator()->trans( - 'Country %id migrated to country (ID %country) and state (ID %state) (address: %address, tax rules: %tax, shipping zones: %zone)', - [ - '%id' => $changeEvent->getCountry(), - '%country' => $changeEvent->getNewCountry(), - '%state' => $changeEvent->getNewState(), - '%address' => $changeEvent->getCounter()[AddressTableMap::TABLE_NAME], - '%tax' => $changeEvent->getCounter()[TaxRuleCountryTableMap::TABLE_NAME], - '%zone' => $changeEvent->getCounter()[CountryAreaTableMap::TABLE_NAME] - ] - ); - - // add flash message - $this->getSession()->getFlashBag()->add('migrate', $message); - - // Log migration - $this->adminLogAppend( - AdminResources::COUNTRY, - AccessManager::UPDATE, - $message, - $changeEvent->getCountry() - ); - - } - - return $this->generateSuccessRedirect($changeForm); - } catch (FormValidationException $ex) { - // Form cannot be validated - $error_msg = $this->createStandardFormValidationErrorMessage($ex); - } - - if (false !== $error_msg) { - $this->setupFormErrorContext( - $this->getTranslator()->trans("Country migration"), - $error_msg, - $changeForm, - $ex - ); - - return $this->render( - 'countries-migrate', - [ - 'countriesMigrated' => $migratedCountries, - 'showForm' => true - ] - ); - } - } -} diff --git a/local/modules/TheliaMigrateCountry/EventListeners/MigrateCountryListener.php b/local/modules/TheliaMigrateCountry/EventListeners/MigrateCountryListener.php deleted file mode 100644 index 9271e117..00000000 --- a/local/modules/TheliaMigrateCountry/EventListeners/MigrateCountryListener.php +++ /dev/null @@ -1,155 +0,0 @@ - - */ -class MigrateCountryListener implements EventSubscriberInterface -{ - - public function migrateCountry(MigrateCountryEvent $event) - { - $counter = []; - - // update address - $counter[AddressTableMap::TABLE_NAME] = $this->migrateAddress($event); - - // tax rules - $counter[TaxRuleCountryTableMap::TABLE_NAME] = $this->migrateAddress($event); - - // shipping zone - $counter[CountryAreaTableMap::TABLE_NAME] = $this->migrateAddress($event); - - // if it succeeds we toggle the visibility of old country and new - $this->setCountriesVisibility($event); - - $event->setCounter($counter); - - } - - protected function migrateAddress(MigrateCountryEvent $event) - { - $con = Propel::getWriteConnection(AddressTableMap::DATABASE_NAME); - $con->beginTransaction(); - try { - $updatedRows = AddressQuery::create() - ->filterByCountryId($event->getCountry()) - ->update( - [ - 'CountryId' => $event->getNewCountry(), - 'StateId' => $event->getNewState(), - ] - ); - - $con->commit(); - - return $updatedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - protected function migrateTaxRules(MigrateCountryEvent $event) - { - $con = Propel::getWriteConnection(TaxRuleCountryTableMap::DATABASE_NAME); - $con->beginTransaction(); - try { - $updatedRows = TaxRuleCountryQuery::create() - ->filterByCountryId($event->getCountry()) - ->update( - [ - 'CountryId' => $event->getNewCountry(), - 'StateId' => $event->getNewState(), - ] - ); - - $con->commit(); - - return $updatedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - protected function migrateShippingZones(MigrateCountryEvent $event) - { - $con = Propel::getWriteConnection(CountryAreaTableMap::DATABASE_NAME); - $con->beginTransaction(); - try { - $updatedRows = CountryAreaQuery::create() - ->filterByCountryId($event->getCountry()) - ->update( - [ - 'CountryId' => $event->getNewCountry(), - 'StateId' => $event->getNewState(), - ] - ); - - $con->commit(); - - return $updatedRows; - } catch (PropelException $e) { - $con->rollback(); - throw $e; - } - } - - private function setCountriesVisibility(MigrateCountryEvent $event) - { - $oldCountry = CountryQuery::create()->findPk($event->getCountry()); - - if (null !== $oldCountry) { - $oldCountry - ->setVisible(0) - ->save() - ; - } - - $newCountry = CountryQuery::create()->findPk($event->getNewCountry()); - if (null !== $newCountry) { - $newCountry - ->setVisible(1) - ->save() - ; - } - } - - /** - * @inheritdoc - */ - public static function getSubscribedEvents() - { - return [ - MigrateCountryEvents::MIGRATE_COUNTRY => 'migrateCountry' - ]; - } -} diff --git a/local/modules/TheliaMigrateCountry/Events/MigrateCountryEvent.php b/local/modules/TheliaMigrateCountry/Events/MigrateCountryEvent.php deleted file mode 100644 index 53613b09..00000000 --- a/local/modules/TheliaMigrateCountry/Events/MigrateCountryEvent.php +++ /dev/null @@ -1,117 +0,0 @@ - - */ -class MigrateCountryEvent extends ActionEvent -{ - /** @var int Old country Id */ - protected $country; - - /** @var int New country Id */ - protected $newCountry; - - /** @var int New state Id */ - protected $newState; - - /** @var array counter */ - protected $counter = []; - - /** - * MigrateCountryEvent constructor. - * @param $country - * @param int $newCountry - * @param int $newState - */ - public function __construct($country, $newCountry, $newState) - { - $this->country = $country; - $this->newCountry = $newCountry; - $this->newState = $newState; - } - - /** - * @return mixed - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param mixed $country - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return int - */ - public function getNewCountry() - { - return $this->newCountry; - } - - /** - * @param int $newCountry - */ - public function setNewCountry($newCountry) - { - $this->newCountry = $newCountry; - return $this; - } - - /** - * @return int - */ - public function getNewState() - { - return $this->newState; - } - - /** - * @param int $newState - */ - public function setNewState($newState) - { - $this->newState = $newState; - return $this; - } - - /** - * @return array - */ - public function getCounter() - { - return $this->counter; - } - - /** - * @param array $counter - */ - public function setCounter($counter) - { - $this->counter = $counter; - return $this; - } -} diff --git a/local/modules/TheliaMigrateCountry/Events/MigrateCountryEvents.php b/local/modules/TheliaMigrateCountry/Events/MigrateCountryEvents.php deleted file mode 100644 index 3a1cdcb0..00000000 --- a/local/modules/TheliaMigrateCountry/Events/MigrateCountryEvents.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ -class MigrateCountryEvents -{ - const MIGRATE_COUNTRY = 'action.migrate-country.migrate'; -} diff --git a/local/modules/TheliaMigrateCountry/Form/CountryStateMigrationForm.php b/local/modules/TheliaMigrateCountry/Form/CountryStateMigrationForm.php deleted file mode 100644 index 9a352af9..00000000 --- a/local/modules/TheliaMigrateCountry/Form/CountryStateMigrationForm.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class CountryStateMigrationForm extends BaseForm -{ - - /** - * @inheritdocs - */ - protected function buildForm() - { - $this->formBuilder - ->add( - 'migrations', - 'collection', - [ - "type" => "country_state_migration", - "allow_add" => true, - "required" => true, - "cascade_validation" => true, - "constraints" => array( - new Count(["min" => 1]), - ), - ] - ) - ; - } - - public function getName() - { - return "thelia_country_state_migration"; - } -} diff --git a/local/modules/TheliaMigrateCountry/Form/Type/CountryStateMigrationType.php b/local/modules/TheliaMigrateCountry/Form/Type/CountryStateMigrationType.php deleted file mode 100644 index acbf43fa..00000000 --- a/local/modules/TheliaMigrateCountry/Form/Type/CountryStateMigrationType.php +++ /dev/null @@ -1,114 +0,0 @@ - - */ -class CountryStateMigrationType extends AbstractTheliaType -{ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults( - [ - "cascade_validation" => true, - "constraints" => array( - new Callback([ - "methods" => array( - [$this, "checkStateId"], - ), - ]), - ), - ] - ); - } - - public function buildForm(FormBuilderInterface $builder, array $options) - { - $builder - ->add("migrate", "checkbox") - ->add( - "country", - "country_id" - ) - ->add( - "new_country", - "country_id" - ) - ->add( - "new_state", - "state_id", - [ - "constraints" => [], - ] - ) - ; - } - - public function checkStateId($value, ExecutionContextInterface $context) - { - - if ($value['migrate']) { - if (null !== $state = StateQuery::create()->findPk($value['new_state'])) { - if ($state->getCountryId() !== $value['new_country']) { - $context->addViolation( - Translator::getInstance()->trans( - "The state id '%id' does not belong to country id '%id_country'", - [ - '%id' => $value['new_state'], - '%id_country' => $value['new_country'] - ] - ) - ); - } - } else { - $context->addViolation( - Translator::getInstance()->trans( - "The state id '%id' doesn't exist", - ['%id' => $value['new_state']] - ) - ); - } - } - - } - - private function getRowData(ExecutionContextInterface $context) - { - $propertyPath = $context->getPropertyPath(); - $data = $this->getRowData($context); - - - } - - /** - * Returns the name of this type. - * - * @return string The name of this type - */ - public function getName() - { - return 'country_state_migration'; - } -} diff --git a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/en_US.php b/local/modules/TheliaMigrateCountry/I18n/backOffice/default/en_US.php deleted file mode 100644 index 35906899..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/en_US.php +++ /dev/null @@ -1,31 +0,0 @@ - ' country ', - ' migrated to ' => ' migrated to ', - ' state ' => ' state ', - 'After the migration the old country will be hide and the new one shown' => 'After the migration the old country will be hide and the new one shown', - 'All States' => 'All States', - 'All countries have been migrated' => 'All countries have been migrated', - 'Configuration' => 'Configuration', - 'Countries' => 'Countries', - 'Countries migrated' => 'Countries migrated', - 'Countries to migrate' => 'Countries to migrate', - 'Country ' => 'Country ', - 'Country migration' => 'Country migration', - 'For USA and Canada the states already exists as countries, so you have to select the right state.' => 'For USA and Canada the states already exists as countries, so you have to select the right state.', - 'For other countries, you should decide to use state or not. ' => 'For other countries, you should decide to use state or not. ', - 'Home' => 'Home', - 'If you want to use the new country with its states, you have to check the migrate checkbox and select a state.' => 'If you want to use the new country with its states, you have to check the migrate checkbox and select a state.', - 'In version 2.3 of Thelia, the system of country has changed.' => 'In version 2.3 of Thelia, the system of country has changed.', - 'Migrate ?' => 'Migrate ?', - 'Migrate countries' => 'Migrate countries', - 'New country' => 'New country', - 'Now, countries has been splited in countries and states.' => 'Now, countries has been splited in countries and states.', - 'Old country' => 'Old country', - 'State' => 'State', - 'The migration proccess is tricky and couldn\'t be automated.' => 'The migration proccess is tricky and couldn\'t be automated.', - 'The migration will change the address, tax rules and shipping zones to match with the new system.' => 'The migration will change the address, tax rules and shipping zones to match with the new system.', - 'The update proccess has created new countries (even if it exists) and associated states.' => 'The update proccess has created new countries (even if it exists) and associated states.', - 'We added a \'default\' state with a blank name as a fallback. Customer will have the possibility to change it later.' => 'We added a \'default\' state with a blank name as a fallback. Customer will have the possibility to change it later.', -); diff --git a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/fr_FR.php b/local/modules/TheliaMigrateCountry/I18n/backOffice/default/fr_FR.php deleted file mode 100644 index 70b7092b..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/fr_FR.php +++ /dev/null @@ -1,31 +0,0 @@ - ' le pays', - ' migrated to ' => 'migré vers', - ' state ' => ' état ', - 'After the migration the old country will be hide and the new one shown' => 'Après la migration l\'ancien pays sera caché et le nouveau sera activé.', - 'All States' => 'Tous les états', - 'All countries have been migrated' => 'Tous les pays ont été migré', - 'Configuration' => 'Configuration', - 'Countries' => 'Pays', - 'Countries migrated' => 'Pays migrés', - 'Countries to migrate' => 'Pays à migrer.', - 'Country ' => 'Le pays', - 'Country migration' => 'Migration pays', - 'For USA and Canada the states already exists as countries, so you have to select the right state.' => 'Pour les USA et le Canada les états étaient déjà présents mais en tant que pays. Vous devrez donc choisir l\'état correspondant.', - 'For other countries, you should decide to use state or not. ' => 'Pour les autres pays, vous devrez choisir d\'utiliser ou pas les états.', - 'Home' => 'Accueil', - 'If you want to use the new country with its states, you have to check the migrate checkbox and select a state.' => 'Si vous voulez utiliser les nouveaux pays avec les états, vous devrez cocher la boîte à cocher \'migrer\' et sélectionner un état.', - 'In version 2.3 of Thelia, the system of country has changed.' => 'En version 2.3 de Thelia, le sysème des pays a changé.', - 'Migrate ?' => 'Migrer ?', - 'Migrate countries' => 'Migrer les pays', - 'New country' => 'Nouveau pays', - 'Now, countries has been splited in countries and states.' => 'Les pays ont été séparé en pays et états.', - 'Old country' => 'Ancien pays', - 'State' => 'État/région', - 'The migration proccess is tricky and couldn\'t be automated.' => 'Le processus de migration est compliqué et ne peux pas être automatisé', - 'The migration will change the address, tax rules and shipping zones to match with the new system.' => 'La migration changera les adresses, les règles de taxe et les zones de livraisons pour fonctionner avec le nouveau système.', - 'The update proccess has created new countries (even if it exists) and associated states.' => 'Le processus de mise à jour a créé de nouveaux pays (même si il existait) et associé des états.', - 'We added a \'default\' state with a blank name as a fallback. Customer will have the possibility to change it later.' => 'Nous avons ajouté un état par \'défaut\' avec un nom vide. Par la suite, le client pourra le changer.', -]; diff --git a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/it_IT.php b/local/modules/TheliaMigrateCountry/I18n/backOffice/default/it_IT.php deleted file mode 100644 index 8aaa7bfe..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/it_IT.php +++ /dev/null @@ -1,19 +0,0 @@ - 'paese', - ' migrated to ' => ' migrato a ', - ' state ' => ' stato ', - 'All States' => 'Tutti gli Stati', - 'Configuration' => 'Impostazione', - 'Countries' => 'Paesi', - 'Country ' => 'Paese', - 'Country migration' => 'Migrazione del paese', - 'Home' => 'Home', - 'Migrate countries' => 'Migrazione dei paesi', - 'New country' => 'Nuovo paese', - 'Now, countries has been splited in countries and states.' => 'Ora, i paesi sono stati divisi in paesi e stati.', - 'State' => 'Stato', - 'The update proccess has created new countries (even if it exists) and associated states.' => 'Il processo di aggiornamento ha creato nuovi paesi (anche esistenti) e stati associati.', - 'We added a \'default\' state with a blank name as a fallback. Customer will have the possibility to change it later.' => 'Abbiamo aggiunto uno stato di \'default\' con un nome vuoto come fallback. Il cliente avrà la possibilità di modificarlo in seguito.', -]; diff --git a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/ru_RU.php b/local/modules/TheliaMigrateCountry/I18n/backOffice/default/ru_RU.php deleted file mode 100644 index acc81032..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/backOffice/default/ru_RU.php +++ /dev/null @@ -1,31 +0,0 @@ - ' страну ', - ' migrated to ' => ' мигрировать в ', - ' state ' => ' штат ', - 'After the migration the old country will be hide and the new one shown' => 'После миграции старая страна будет скрыта, а новая показана', - 'All States' => 'Все штаты', - 'All countries have been migrated' => 'Все страны мигрированы', - 'Configuration' => 'Конфигурация', - 'Countries' => 'Страны', - 'Countries migrated' => 'Страны мигрированы', - 'Countries to migrate' => 'Страны для миграции', - 'Country ' => 'Страна', - 'Country migration' => 'Миграция страны', - 'For USA and Canada the states already exists as countries, so you have to select the right state.' => 'Для США и Канады штаты уже существуют как страны, поэтому вы должны выбрать правильнй штат.', - 'For other countries, you should decide to use state or not. ' => 'Для остальных стран выдолжны выбрать использовать шатыт или нет.', - 'Home' => 'Главная', - 'If you want to use the new country with its states, you have to check the migrate checkbox and select a state.' => 'Если вы хотите использовать новую страну со штатами, вы должны выбрать флаг миграции и выбрать штат.', - 'In version 2.3 of Thelia, the system of country has changed.' => 'В Thelia версии 2.3, система стран была изменена.', - 'Migrate ?' => 'Мигрировать ?', - 'Migrate countries' => 'Мигрировать страны', - 'New country' => 'Новая страна', - 'Now, countries has been split in countries and states.' => 'Сейчас страны разделены на страны и штаты', - 'Old country' => 'Старая страна', - 'State' => 'Штат', - 'The migration process is tricky and couldn\'t be automated.' => 'Процес миграции непростой и не может быть автоматизирован.', - 'The migration will change the address, tax rules and shipping zones to match with the new system.' => 'Миграция изменит адреса, налоговые правила и зоны доставки для соответствия с ново системой.', - 'The update process has created new countries (even if it exists) and associated states.' => 'Процес обновления создаст новые страны (даже если они существуют) и связаные штаты.', - 'We added a \'default\' state with a blank name as a fallback. Customer will have the possibility to change it later.' => 'Мы добавили \'стандартный\' штат с пустым именем как резерв. Клиент будет иметь возможность изменить его позже.', -); diff --git a/local/modules/TheliaMigrateCountry/I18n/en_US.php b/local/modules/TheliaMigrateCountry/I18n/en_US.php deleted file mode 100644 index 582bf0dc..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/en_US.php +++ /dev/null @@ -1,8 +0,0 @@ - 'Country %id migrated to country (ID %country) and state (ID %state) (address: %address, tax rules: %tax, shipping zones: %zone)', - 'Country migration' => 'Country migration', - 'The state id \'%id\' does not belong to country id \'%id_country\'' => 'The state id \'%id\' does not belong to country id \'%id_country\'', - 'The state id \'%id\' doesn\'t exist' => 'The state id \'%id\' doesn\'t exist', -); diff --git a/local/modules/TheliaMigrateCountry/I18n/fr_FR.php b/local/modules/TheliaMigrateCountry/I18n/fr_FR.php deleted file mode 100644 index e36af4c7..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/fr_FR.php +++ /dev/null @@ -1,8 +0,0 @@ - 'Le pays %id migré vers le pays (ID %country) et état (ID %state) (adresses: %address, règles de taxe: %tax, zones de livraison: %zone)', - 'Country migration' => 'Migration pays', - 'The state id \'%id\' does not belong to country id \'%id_country\'' => 'L\'état id \'%id\' n\'appartient pas au pays id \'%id_country\'', - 'The state id \'%id\' doesn\'t exist' => 'L\'état id \'%id\' n\'existe pas', -]; diff --git a/local/modules/TheliaMigrateCountry/I18n/it_IT.php b/local/modules/TheliaMigrateCountry/I18n/it_IT.php deleted file mode 100644 index ebcb746f..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/it_IT.php +++ /dev/null @@ -1,8 +0,0 @@ - 'Paese %id migrato a paese (ID %country) e stato (ID %state) (Indirizzo: %address, norme fiscali: %tax, zone di spedizione: %zone)', - 'Country migration' => 'Migrazione del paese', - 'The state id \'%id\' does not belong to country id \'%id_country\'' => 'L\'id dello stato \'%id\' non appartiene a id paese \'%id_country\'', - 'The state id \'%id\' doesn\'t exist' => 'L\'id dello stato \'%id\' non esiste', -]; diff --git a/local/modules/TheliaMigrateCountry/I18n/ru_RU.php b/local/modules/TheliaMigrateCountry/I18n/ru_RU.php deleted file mode 100644 index bfc3f20c..00000000 --- a/local/modules/TheliaMigrateCountry/I18n/ru_RU.php +++ /dev/null @@ -1,8 +0,0 @@ - 'Страна %id мигрирована в страну (ID %country) и штат (ID %state) (адрес: %address, налоговые правила: %tax, зоны доставки: %zone)', - 'Country migration' => 'Миграция стран', - 'The state id \'%id\' does not belong to country id \'%id_country\'' => 'Штат с id \'%id\' не принадлежит стране с id \'%id_country\'', - 'The state id \'%id\' doesn\'t exist' => 'Штат с id \'%id\' не существует', -); diff --git a/local/modules/TheliaMigrateCountry/LICENSE.txt b/local/modules/TheliaMigrateCountry/LICENSE.txt deleted file mode 100644 index 65c5ca88..00000000 --- a/local/modules/TheliaMigrateCountry/LICENSE.txt +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/local/modules/TheliaMigrateCountry/Readme.md b/local/modules/TheliaMigrateCountry/Readme.md deleted file mode 100644 index ae6aee51..00000000 --- a/local/modules/TheliaMigrateCountry/Readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# Thelia Migrate Country - -This module allow you to migrate the system of country from Thelia version <= 2.2.* to version >= 2.3.0-alpha1. - -## Installation - -### Manually - -* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is TheliaMigrateCountry. -* Activate it in your thelia administration panel - -### Composer - -Add it in your main thelia composer.json file - -``` -composer require your-vendor/thelia-migrate-country-module:~1.0 -``` diff --git a/local/modules/TheliaMigrateCountry/TheliaMigrateCountry.php b/local/modules/TheliaMigrateCountry/TheliaMigrateCountry.php deleted file mode 100644 index b8772687..00000000 --- a/local/modules/TheliaMigrateCountry/TheliaMigrateCountry.php +++ /dev/null @@ -1,28 +0,0 @@ - - {intl l='Migrate countries'} - - -{/loop} \ No newline at end of file diff --git a/local/modules/TheliaMigrateCountry/templates/backOffice/default/countries-migrate.html b/local/modules/TheliaMigrateCountry/templates/backOffice/default/countries-migrate.html deleted file mode 100644 index 79b068a9..00000000 --- a/local/modules/TheliaMigrateCountry/templates/backOffice/default/countries-migrate.html +++ /dev/null @@ -1,299 +0,0 @@ -{extends file="admin-layout.tpl"} - -{block name="no-return-functions"} - {$admin_current_location = 'configuration'} -{/block} - -{block name="page-title"}{intl l='Country migration'}{/block} - -{block name="check-resource"}admin.configuration.country{/block} -{block name="check-access"}update{/block} - -{block name="main-content"} -
    - -
    - - - -
    -
    -
    - -
    - {intl l='Migrate countries'} -
    - -
    -
    - {intl l='In version 2.3 of Thelia, the system of country has changed.'} - {intl l='Now, countries has been split in countries and states.'}
    - {intl l="The migration process is tricky and couldn't be automated."}

    - {intl l="The update process has created new countries (even if it exists) and associated states."}
    - {intl l="The migration will change the address, tax rules and shipping zones to match with the new system."}
    - {intl l="After the migration the old country will be hide and the new one shown"}

    - {intl l="For USA and Canada the states already exists as countries, so you have to select the right state."}
    - {intl l="For other countries, you should decide to use state or not. "} - {intl l="If you want to use the new country with its states, you have to check the migrate checkbox and select a state."} - {intl l="We added a 'default' state with a blank name as a fallback. Customer will have the possibility to change it later."} -
    -
    - - {if $showForm} -
    -
    - - {form name="thelia.admin.country.state.migration"} - - {include - file = "includes/inner-form-toolbar.html" - hide_submit_buttons = false - - page_url = {url path="/admin/configuration/countries/migrate"} - close_url = {url path="/admin/configuration/countries"} - } - - {form_hidden_fields exclude="locale"} - - {render_form_field field='success_url' value={url path="/admin/configuration/countries/migrate"}} - - {if $form_error}
    {$form_error_message}
    {/if} - - {if {hasflash type="migrate"}} -
    - {flash type="migrate"} -
    {$MESSAGE}
    - {/flash} -
    - {/if} - -
    - - - - - - - - - - - - {form_collection form=$form collection="migrations"} - {$newCountryId=0} - {$countryId=0} - - - - - - - {/form_collection} - -
    - {intl l='Countries to migrate'} -
    {intl l="Migrate ?"}{intl l="Old country"}{intl l="New country"}{intl l="State"}
    - {form_collection_field form=$form row=$row field="migrate"} - - {/form_collection_field} - - {form_collection_field form=$form row=$row field="country"} - {$countryId={$value}} - - - {/form_collection_field} - - {form_collection_field form=$form row=$row field="new_country"} - {$newCountryId={$value}} - - - {/form_collection_field} - - {form_collection_field form=$form row=$row field="new_state"} - {$ref[]={$label_attr.for}} - - - {/form_collection_field} -
    -
    - - - {/form} - -
    -
    - {else} -
    - {intl l="All countries have been migrated"} -
    - {/if} - -
    -
    - - {if count($countriesMigrated) > 0 } -
    -
    -
    - {intl l='Countries migrated'} -
    -
    - - {foreach $countriesMigrated as $country => $new} -
    -
    - {intl l='Country '} - {intl l=' migrated to '} - {intl l=' country '} - - {intl l=' state '} - -
    -
    - {/foreach} -
    - {/if} - -
    - -
    -
    -{/block} - -{block name="javascript-initialization"} - {javascripts file='assets/js/bootstrap-select/bootstrap-select.js'} - - {/javascripts} - - {javascripts file='assets/js/libs/underscore-min.js'} - - {/javascripts} - - - - -{/block} - -{block name="javascript-last-call"} - {hook name="wysiwyg.js" location="wysiwyg-country-edit-js" } -{/block} \ No newline at end of file