Clean code
This commit is contained in:
parent
826e3d2855
commit
b3af666697
@ -156,8 +156,9 @@ if ($resql) {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$page_name = "MultiCurrencySetup";
|
$page_name = "MultiCurrencySetup";
|
||||||
|
$help_url = '';
|
||||||
|
|
||||||
llxHeader('', $langs->trans($page_name));
|
llxHeader('', $langs->trans($page_name), $help_url);
|
||||||
|
|
||||||
// Subheader
|
// Subheader
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
@ -165,7 +166,7 @@ print load_fiche_titre($langs->trans($page_name), $linkback);
|
|||||||
|
|
||||||
// Configuration header
|
// Configuration header
|
||||||
$head = multicurrencyAdminPrepareHead();
|
$head = multicurrencyAdminPrepareHead();
|
||||||
print dol_get_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurrency");
|
print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "multicurrency");
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
@ -303,7 +304,7 @@ print '<input type="hidden" name="action" value="add_currency">';
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$form->selectCurrency('', 'code', 1).'</td>';
|
print '<td>'.$form->selectCurrency('', 'code', 1).'</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '<input type="text" name="rate" value="" size="13" placeholder="'.$langs->trans('Rate').'" /> ';
|
print '<input type="text" name="rate" value="" class="width75 right" placeholder="'.$langs->trans('Rate').'" /> ';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -328,7 +329,7 @@ foreach ($TCurrency as &$currency) {
|
|||||||
print '<input type="hidden" name="action" value="update_currency">';
|
print '<input type="hidden" name="action" value="update_currency">';
|
||||||
print '<input type="hidden" name="fk_multicurrency" value="'.$currency->id.'">';
|
print '<input type="hidden" name="fk_multicurrency" value="'.$currency->id.'">';
|
||||||
print '1 '.$conf->currency.' = ';
|
print '1 '.$conf->currency.' = ';
|
||||||
print '<input type="text" name="rate" value="'.($currency->rate->rate ? $currency->rate->rate : '').'" size="13" /> '.$currency->code.' ';
|
print '<input type="text" name="rate" class="width75 right" value="'.($currency->rate->rate ? $currency->rate->rate : '').'" size="13"> '.$currency->code.' ';
|
||||||
print '<input type="submit" name="updatecurrency" class="button" value="'.$langs->trans("Modify").'"> ';
|
print '<input type="submit" name="updatecurrency" class="button" value="'.$langs->trans("Modify").'"> ';
|
||||||
print '<input type="submit" name="deletecurrency" class="button" value="'.$langs->trans("Delete").'">';
|
print '<input type="submit" name="deletecurrency" class="button" value="'.$langs->trans("Delete").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@ -232,7 +232,7 @@ if (empty($reshook)) {
|
|||||||
$htmlother = new FormOther($db);
|
$htmlother = new FormOther($db);
|
||||||
|
|
||||||
$title = $langs->trans("CurrencyRate");
|
$title = $langs->trans("CurrencyRate");
|
||||||
$page_name = "ListCurrencyRate";
|
$page_name = "MultiCurrencySetup";
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
|
|
||||||
llxHeader('', $title, $help_url, '');
|
llxHeader('', $title, $help_url, '');
|
||||||
@ -417,24 +417,24 @@ if ($resql) {
|
|||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
|
|
||||||
// date
|
// date
|
||||||
if (!empty($arrayfields['cr.date_sync']['checked'])) {
|
if (!empty($arrayfields['cr.date_sync']['checked'])) {
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print $form->selectDate(dol_print_date($search_date_sync, "%Y-%m-%d"), 'search_date_sync', 0, 0, 1);
|
print $form->selectDate(dol_print_date($search_date_sync, "%Y-%m-%d"), 'search_date_sync', 0, 0, 1);
|
||||||
print $form->selectDate(dol_print_date($search_date_sync_end, "%Y-%m-%d"), 'search_date_sync_end', 0, 0, 1);
|
print $form->selectDate(dol_print_date($search_date_sync_end, "%Y-%m-%d"), 'search_date_sync_end', 0, 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// code
|
// code
|
||||||
if (!empty($arrayfields['m.code']['checked'])) {
|
if (!empty($arrayfields['m.code']['checked'])) {
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print $form->selectMultiCurrency($multicurrency_code, 'search_code', 1, " code != '".$conf->currency."'", true);
|
print $form->selectMultiCurrency($multicurrency_code, 'search_code', 1, " code != '".$conf->currency."'", true);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// rate
|
// rate
|
||||||
if (!empty($arrayfields['cr.rate']['checked'])) {
|
if (!empty($arrayfields['cr.rate']['checked'])) {
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="search_rate" size="8" value="'.dol_escape_htmltag($search_rate).'">';
|
print '<input class="flat" type="text" name="search_rate" size="8" value="'.dol_escape_htmltag($search_rate).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields);
|
$parameters = array('arrayfields'=>$arrayfields);
|
||||||
@ -469,7 +469,7 @@ if (!empty($arrayfields['cr.rate']['checked'])) {
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
while ($i < min($num, $limit)) {
|
while ($i < min($num, $limit)) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -538,6 +538,7 @@ while ($i < min($num, $limit)) {
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user