From 5e70aadeb7cf70da53365b9d22271e405eb87ac2 Mon Sep 17 00:00:00 2001 From: aFolletete Date: Tue, 3 Jan 2012 09:45:57 +0000 Subject: [PATCH] // change error message in AdminInvoices --- controllers/admin/AdminInvoicesController.php | 14 +++++++++----- translations/fr/admin.php | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/controllers/admin/AdminInvoicesController.php b/controllers/admin/AdminInvoicesController.php index a30f9a56c..8a1fff1cc 100644 --- a/controllers/admin/AdminInvoicesController.php +++ b/controllers/admin/AdminInvoicesController.php @@ -226,7 +226,7 @@ class AdminInvoicesControllerCore extends AdminController else if (Tools::isSubmit('submitAddinvoice_status')) { if (!is_array($status_array = Tools::getValue('id_order_state')) || !count($status_array)) - $this->_errors[] = $this->l('Invalid order statuses'); + $this->_errors[] = $this->l('You must select at least one order status'); else { foreach ($status_array as $id_order_state) @@ -243,21 +243,25 @@ class AdminInvoicesControllerCore extends AdminController public function beforeUpdateOptions() { if ((int)Tools::getValue('PS_INVOICE_START_NUMBER') != 0 && (int)Tools::getValue('PS_INVOICE_START_NUMBER') <= Order::getLastInvoiceNumber()) - $this->_errors[] = $this->l('Invalid invoice number (must be > ').Order::getLastInvoiceNumber().')'; + $this->_errors[] = $this->l('Invalid invoice number (must be > ').Order::getLastInvoiceNumber().')'; } protected function getInvoicesModels() { - $models = array(array('value'=>'invoice', 'name'=>'invoice')); + $models = array( + array( + 'value' => 'invoice', + 'name' => 'invoice' + ) + ); $d = dir(_PS_THEME_DIR_.'/pdf/'); while (false !== ($entry = $d->read())) { - if (preg_match('`^(invoice-[a-z0-9]+)\.tpl$`', $entry, $matches)) { + if (preg_match('`^(invoice-[a-z0-9]+)\.tpl$`', $entry, $matches)) $models[] = array( 'value' => $matches[1], 'name' => $matches[1] ); - } } $d->close(); return $models; diff --git a/translations/fr/admin.php b/translations/fr/admin.php index 9a69fa330..e4447aedd 100644 --- a/translations/fr/admin.php +++ b/translations/fr/admin.php @@ -741,7 +741,7 @@ $_LANGADM['AdminInvoices1f5b4e1a0e2c01cf6de547861dc86cd8'] = 'Générer un fichi $_LANGADM['AdminInvoicesf596633d68fc44d6c7460676060d5dcb'] = 'Date de début invalide'; $_LANGADM['AdminInvoicesff9e9791ff17e1ca431449bb2fe992c0'] = 'Date de fin invalide'; $_LANGADM['AdminInvoices366a2e6043b7f22bbb12df4a5fce45fb'] = 'Aucune facture trouvée pour cette période'; -$_LANGADM['AdminInvoicescb63a9e24da94fffad24dd2f9bcf4ca4'] = 'Statuts de commande invalide'; +$_LANGADM['AdminInvoices99836f130b5bbf07dc34028586749d3a'] = 'Vous devez sélectionner au moins un statut de commande'; $_LANGADM['AdminInvoices9a572188372df6be754991fd8f080f16'] = 'Aucune facture trouvée pour ces statuts'; $_LANGADM['AdminInvoices38b1cc080b5571823889c6f775bf6606'] = 'Numéro de facture invalide (il doit être supèrieur à '; $_LANGADM['AdminModulesPositions51a8b3a61ad63d4e5df2ce86870e39b8'] = 'Greffer un module';