From f2a2cfd8c85ea7241e4e830caa772921d7fef765 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 20 Jun 2017 11:46:30 +0200 Subject: [PATCH] Look and feel v6 --- htdocs/admin/multicurrency.php | 53 +++++++++++++++------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 3aa6ad5dc26..ac5ab678109 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -61,7 +61,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) dol_print_error($db); } } - + if (preg_match('/del_(.*)/',$action,$reg)) { $code=$reg[1]; @@ -79,7 +79,7 @@ if (preg_match('/del_(.*)/',$action,$reg)) if ($action == 'add_currency') { $langs->loadCacheCurrencies(''); - + $code = GETPOST('code', 'alpha'); $rate = GETPOST('rate', 'alpha'); $currency = new MultiCurrency($db); @@ -96,23 +96,23 @@ if ($action == 'add_currency') elseif ($action == 'update_currency') { $submit = GETPOST('submit', 'alpha'); - + if ($submit == $langs->trans('Modify')) { $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); $rate = GETPOST('rate', 'float'); $currency = new MultiCurrency($db); - + if ($currency->fetch($fk_multicurrency) > 0) { $currency->updateRate($rate); - } + } } elseif ($submit == $langs->trans('Delete')) { $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); $currency = new MultiCurrency($db); - + if ($currency->fetch($fk_multicurrency) > 0) { if ($currency->delete() > 0) setEventMessages($langs->trans('RecordDeleted'), array()); @@ -120,14 +120,14 @@ elseif ($action == 'update_currency') } } } -elseif ($action == 'synchronize') +elseif ($action == 'synchronize') { $response = GETPOST('response'); $response = json_decode($response); - + if ($response->success) { - MultiCurrency::syncRates($response); + MultiCurrency::syncRates($response); } else { @@ -159,19 +159,12 @@ $page_name = "MultiCurrencySetup"; llxHeader('', $langs->trans($page_name)); // Subheader -$linkback = '' - . $langs->trans("BackToModuleList") . ''; +$linkback = '' . $langs->trans("BackToModuleList") . ''; print_fiche_titre($langs->trans($page_name), $linkback); // Configuration header $head = multicurrencyAdminPrepareHead(); -dol_fiche_head( - $head, - 'settings', - $langs->trans("ModuleSetup"), - 0, - "multicurrency" -); +dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurrency"); // Setup page goes here $form=new Form($db); @@ -225,7 +218,7 @@ print ''; print ''; */ -/* TODO uncomment when the functionality will integrated +/* TODO uncomment when the functionality will integrated print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").''; @@ -258,9 +251,9 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print $langs->trans("Value").' '; print ''; print ''; - - - + + + print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_appId").''; print ' '; @@ -272,8 +265,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''; print ''; - - + + print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").''; print ' '; @@ -285,8 +278,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''; print ''; - - + + print ''; print ''.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").''; print ' '; @@ -298,7 +291,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print ''; print ''; - + print ''; print '
'; } @@ -333,8 +326,8 @@ print ''; foreach ($TCurrency as &$currency) { if($currency->code == $conf->currency) continue; - - + + print ''; print ''.$currency->code.' - '.$currency->name.''; print ' '; @@ -362,7 +355,7 @@ print ' { $("#bt_sync").attr("disabled", true); var url_sync = "http://apilayer.net/api/live?access_key='.$conf->global->MULTICURRENCY_APP_ID.'&format=1'.(!empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '&source='.$conf->global->MULTICURRENCY_APP_SOURCE : '').'"; - + $.ajax({ url: url_sync, dataType: "jsonp"