From 3e94cc07d296f7dcc13242a3da7b50080a9b83d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2015 16:47:15 +0200 Subject: [PATCH] Fight against valign="top". Minor css fixes. --- htdocs/compta/bank/account.php | 4 +- htdocs/compta/bank/annuel.php | 4 +- htdocs/compta/bank/card.php | 126 +++++++++++++----------- htdocs/compta/bank/graph.php | 8 +- htdocs/compta/bank/releve.php | 6 +- htdocs/compta/bank/treso.php | 4 +- htdocs/core/actions_fetchobject.inc.php | 12 ++- htdocs/expensereport/list.php | 8 +- htdocs/holiday/view_log.php | 4 +- htdocs/projet/tasks.php | 14 ++- htdocs/theme/eldy/style.css.php | 8 +- 11 files changed, 109 insertions(+), 89 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 7184f0c71f1..75e650d69b8 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -313,13 +313,13 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print ''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); print ''; // Label - print ''.$langs->trans("Label").''; + print ''.$langs->trans("Label").''; print ''.$object->label.''; print ''; diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 6dfbea29791..182340a2baa 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -144,7 +144,7 @@ print ''; $linkback = ''.$langs->trans("BackToList").''; // Ref -print ''; +print ''; print ''; // Label -print ''; +print ''; print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''."\n"; } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index cd544b4fd83..d49520f2f19 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,7 @@ $action = GETPOST('action', 'alpha'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $backtopage=GETPOST('backtopage','alpha'); +$cancel=GETPOST('cancel'); $mode = GETPOST('mode', 'alpha'); $mine = ($mode == 'mine' ? 1 : 0); @@ -48,7 +49,7 @@ $taskstatic = new Task($db); $extrafields_project = new ExtraFields($db); $extrafields_task = new ExtraFields($db); -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once if ($id > 0 || ! empty($ref)) { @@ -85,7 +86,7 @@ if ($action == 'createtask' && $user->rights->projet->creer) $date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear'],'user'); $date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user'); - if (empty($_POST["cancel"])) + if (! $cancel) { if (empty($label)) { @@ -271,10 +272,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print ''; print ''; - if (! empty($object->id)) print ''; if (! empty($mode)) print ''; + dol_fiche_head(''); + print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; if ($_GET["account"]) { @@ -172,7 +172,7 @@ else print '
'.$langs->trans("Label").'
'.$langs->trans("Label").''; if (! empty($id)) { diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index b7af461ff42..acc1d3ecfa3 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014-2015 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry @@ -266,24 +266,26 @@ if ($action == 'create') print ''; print ''; + dol_fiche_head(''); + print ''; // Ref - print ''; + print ''; print ''; // Label - print ''; + print ''; print ''; // Type - print ''; + print ''; print ''; // Currency - print ''; + print ''; print ''; // Status - print ''; + print ''; print ''; @@ -307,7 +309,7 @@ if ($action == 'create') else if (empty($selectedcode)) $selectedcode=$mysoc->country_code; $account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules - print ''; + print ''; print ''; // Web - print ''; + print ''; print ''; // Comment - print ''; + print ''; print ''; + print ''; print ''; // Label - print ''; + print ''; print ''; // Type - print ''; + print ''; print ''; // Currency - print ''; + print ''; print ''; // Status - print ''; + print ''; print ''; // Country @@ -579,7 +583,7 @@ else print ''; // Conciliate - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print '\n"; - print ''; + print ''; print ''; // Other attributes @@ -687,7 +691,7 @@ else if ($account->getCountryCode() == 'IN') $ibankey="IFSC"; if ($account->getCountryCode() == 'IN') $bickey="SWIFT"; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print '\n"; - print '\n"; - print '\n"; @@ -727,13 +731,13 @@ else print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'ref).'" maxlength="12">
'.$langs->trans("LabelBankCashAccount").'
'.$langs->trans("LabelBankCashAccount").'
'.$langs->trans("AccountType").'
'.$langs->trans("AccountType").''; $formbank->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type"); print '
'.$langs->trans("Currency").'
'.$langs->trans("Currency").''; $selectedcode=$account->account_currency_code; if (! $selectedcode) $selectedcode=$conf->currency; @@ -293,7 +295,7 @@ if ($action == 'create') print '
'.$langs->trans("Status").'
'.$langs->trans("Status").''; print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); print '
'.$langs->trans("BankAccountCountry").'
'.$langs->trans("BankAccountCountry").''; print $form->select_country($selectedcode,'account_country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); @@ -326,11 +328,11 @@ if ($action == 'create') print '
'.$langs->trans("Web").'
'.$langs->trans("Web").'
'.$langs->trans("Comment").'
'.$langs->trans("Comment").''; // Editor wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -353,18 +355,18 @@ if ($action == 'create') print ''; // Sold - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("InitialBankBalance").'
'.$langs->trans("InitialBankBalance").'solde)).'">
'.$langs->trans("Date").'
'.$langs->trans("Date").''; $form->select_date('', 're', 0, 0, 0, 'formsoc'); print '
'.$langs->trans("BalanceMinimalAllowed").'
'.$langs->trans("BalanceMinimalAllowed").'account_min_allowed).'">
'.$langs->trans("BalanceMinimalDesired").'
'.$langs->trans("BalanceMinimalDesired").'account_min_desired).'">
'; @@ -375,7 +377,7 @@ if ($action == 'create') print ''; // If bank account - print ''; + print ''; print ''; print ''; @@ -452,16 +454,16 @@ if ($action == 'create') print ''; print ''; - print '"; - print ''; + print ''; print ''; - print '"; @@ -474,25 +476,27 @@ if ($action == 'create') // Accountancy code if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) { - print ''; + print ''; print ''; } else { - print ''; + print ''; print ''; } // Accountancy journal if (! empty($conf->accounting->enabled)) { - print ''; + print ''; print ''; } print '
'.$langs->trans("BankName").'
'.$langs->trans("BankName").'
'.$langs->trans($bickey).'
'.$langs->trans("BankAccountDomiciliation").''; + print '
'.$langs->trans("BankAccountDomiciliation").''; print "
'.$langs->trans("BankAccountOwner").'
'.$langs->trans("BankAccountOwner").''; print '
'.$langs->trans("BankAccountOwnerAddress").''; + print '
'.$langs->trans("BankAccountOwnerAddress").''; print "
'.$langs->trans("AccountancyCode").'
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").'
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyJournal").'
'.$langs->trans("AccountancyJournal").'accountancy_journal).'">
'; - print '
'; + dol_fiche_end(); + + print '
'; print ''; } @@ -538,21 +542,21 @@ else $linkback = ''.$langs->trans("BackToList").''; // Ref - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($account, 'ref', $linkback, 1, 'ref'); print '
'.$langs->trans("Label").'
'.$langs->trans("Label").''.$account->label.'
'.$langs->trans("AccountType").'
'.$langs->trans("AccountType").''.$account->type_lib[$account->type].'
'.$langs->trans("Currency").'
'.$langs->trans("Currency").''; $selectedcode=$account->account_currency_code; if (! $selectedcode) $selectedcode=$conf->currency; @@ -560,7 +564,7 @@ else print '
'.$langs->trans("Status").'
'.$langs->trans("Status").''.$account->getLibStatut(4).'
'.$langs->trans("Conciliable").'
'.$langs->trans("Conciliable").''; $conciliate=$account->canBeConciliated(); if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; @@ -587,19 +591,19 @@ else else print ($account->rappro==1 ? $langs->trans("Yes") : ($langs->trans("No").' ('.$langs->trans("ConciliationDisabled").')')); print '
'.$langs->trans("BalanceMinimalAllowed").'
'.$langs->trans("BalanceMinimalAllowed").''.$account->min_allowed.'
'.$langs->trans("BalanceMinimalDesired").'
'.$langs->trans("BalanceMinimalDesired").''.$account->min_desired.'
'.$langs->trans("Web").''; + print '
'.$langs->trans("Web").''; if ($account->url) print ''; print $account->url; if ($account->url) print ''; print "
'.$langs->trans("Comment").'
'.$langs->trans("Comment").''.dol_htmlentitiesbr($account->comment).'
'.$langs->trans($ibankey).'
'.$langs->trans($ibankey).''.$account->iban.' '; if (! empty($account->iban)) { if (! checkIbanForAccount($account)) { @@ -698,7 +702,7 @@ else } print '
'.$langs->trans($bickey).'
'.$langs->trans($bickey).''.$account->bic.' '; if (! empty($account->bic)) { if (! checkSwiftForAccount($account)) { @@ -709,15 +713,15 @@ else } print '
'.$langs->trans("BankAccountDomiciliation").''; + print '
'.$langs->trans("BankAccountDomiciliation").''; print nl2br($account->domiciliation); print "
'.$langs->trans("BankAccountOwner").''; + print '
'.$langs->trans("BankAccountOwner").''; print $account->proprio; print "
'.$langs->trans("BankAccountOwnerAddress").''; + print '
'.$langs->trans("BankAccountOwnerAddress").''; print nl2br($account->owner_address); print "
'; // Accountancy code - print ''; + print ''; print ''; // Accountancy journal if (! empty($conf->accounting->enabled)) { - print ''; + print ''; print ''; } @@ -799,24 +803,26 @@ else print ''; print ''."\n\n"; + dol_fiche_head(''); + print '
'.$langs->trans("AccountancyCode").'
'.$langs->trans("AccountancyCode").''.$account->account_number.'
'.$langs->trans("AccountancyJournal").'
'.$langs->trans("AccountancyJournal").''.$account->accountancy_journal.'
'; // Ref - print ''; + print ''; print ''; // Label - print ''; + print ''; print ''; // Type - print ''; + print ''; print ''; // Currency - print ''; print ''; // Status - print ''; + print ''; print ''; @@ -840,7 +846,7 @@ else else if (empty($selectedcode)) $selectedcode=$mysoc->country_code; $account->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules - print ''; + print ''; print ''; // Conciliable - print ''; + print ''; print ''; // Balance - print ''; + print ''; print ''; - print ''; + print ''; print ''; // Web - print ''; + print ''; print ''; // Comment - print ''; + print ''; print ''; + print ''; print ''; // Label - print ''; + print ''; print ''; print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'ref).'">
'.$langs->trans("Label").'
'.$langs->trans("Label").'label).'">
'.$langs->trans("AccountType").'
'.$langs->trans("AccountType").''; $formbank->select_type_comptes_financiers((isset($_POST["type"])?$_POST["type"]:$account->type),"type"); print '
'.$langs->trans("Currency"); + print '
'.$langs->trans("Currency"); print ''; print ''; @@ -828,7 +834,7 @@ else print '
'.$langs->trans("Status").'
'.$langs->trans("Status").''; print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos)); print '
'.$langs->trans("Country").'
'.$langs->trans("Country").''; print $form->select_country($selectedcode,'account_country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); @@ -859,7 +865,7 @@ else print '
'.$langs->trans("Conciliable").'
'.$langs->trans("Conciliable").''; $conciliate=$account->canBeConciliated(); if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')'; @@ -868,19 +874,19 @@ else print '
'.$langs->trans("BalanceMinimalAllowed").'
'.$langs->trans("BalanceMinimalAllowed").'min_allowed).'">
'.$langs->trans("BalanceMinimalDesired").'
'.$langs->trans("BalanceMinimalDesired").'min_desired).'">
'.$langs->trans("Web").'
'.$langs->trans("Web").'url).'">'; print '
'.$langs->trans("Comment").'
'.$langs->trans("Comment").''; // Editor wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -903,7 +909,7 @@ else print ''; // If bank account - print ''; + print ''; print ''; print ''; @@ -975,22 +981,22 @@ else if ($account->getCountryCode() == 'IN') $bickey="SWIFT"; // IBAN - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print '"; - print ''; + print ''; print ''; - print '"; @@ -1004,25 +1010,27 @@ else // Accountancy code if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) { - print ''; + print ''; print ''; } else { - print ''; + print ''; print ''; } // Accountancy journal if (! empty($conf->accounting->enabled)) { - print ''; + print ''; print ''; } print '
'.$langs->trans("BankName").'
'.$langs->trans("BankName").'
'.$langs->trans($ibankey).'
'.$langs->trans($ibankey).'
'.$langs->trans($bickey).'
'.$langs->trans($bickey).'
'.$langs->trans("BankAccountDomiciliation").''; + print '
'.$langs->trans("BankAccountDomiciliation").''; print "
'.$langs->trans("BankAccountOwner").'
'.$langs->trans("BankAccountOwner").''; print '
'.$langs->trans("BankAccountOwnerAddress").''; + print '
'.$langs->trans("BankAccountOwnerAddress").''; print "
'.$langs->trans("AccountancyCode").'
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").'
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyJournal").'
'.$langs->trans("AccountancyJournal").'accountancy_journal).'">
'; - print '
'; + dol_fiche_end(); + + print '
'; print ''; print '     '; print ''; diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index d87d95f6026..d0afdee61bb 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -441,7 +441,7 @@ else $datas = array(); $datamin = array(); $dataall = array(); - + $subtotal = 0; $day = $min; @@ -483,7 +483,7 @@ else if ($acct->min_desired) array_push($graph_datas[$i],$datamin[$i]); if ($acct->min_allowed) array_push($graph_datas[$i],$dataall[$i]); } - + $px3 = new DolGraph(); $px3->SetData($graph_datas); $arraylegends=array($langs->transnoentities("Balance")); @@ -760,7 +760,7 @@ print ''; $linkback = ''.$langs->trans("BackToList").''; // Ref -print ''; +print ''; print ''; // Label -print ''; +print ''; print ''; + print ''; print ''; // Label - print ''; + print ''; print ''; print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; if ($account) { @@ -799,7 +799,7 @@ else print '
'.$langs->trans("Label").'
'.$langs->trans("Label").''; if ($account && $_GET["option"]!='all') { diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 5293f518738..f82139d1f3a 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * @@ -128,13 +128,13 @@ if (empty($num)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); print '
'.$langs->trans("Label").'
'.$langs->trans("Label").''.$acct->label.'
'; diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index e62c5203ea6..4643b367630 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -98,13 +98,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $linkback = ''.$langs->trans("BackToList").''; // Ref - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref'); print '
'.$langs->trans("Label").'
'.$langs->trans("Label").''.$acct->label.'
'; diff --git a/htdocs/core/actions_fetchobject.inc.php b/htdocs/core/actions_fetchobject.inc.php index 463b3113c2a..3014e8652a6 100644 --- a/htdocs/core/actions_fetchobject.inc.php +++ b/htdocs/core/actions_fetchobject.inc.php @@ -25,15 +25,19 @@ // $action must be defined // $object must be defined (object is loaded in this file with fetch) +// $cancel must be defined // $id or $ref must be defined (object is loaded in this file with fetch) -if ($id > 0 || ! empty($ref)) +if (($id > 0 || ! empty($ref)) && empty($cancel)) { $ret = $object->fetch($id,$ref); - if ($ret > 0) { + if ($ret > 0) + { $object->fetch_thirdparty(); - $id=$object->id; - } else { + $id = $object->id; + } + else + { setEventMessages($object->error, $object->errors, 'errors'); $action=''; } diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index ca33fc34f0f..0974ce0f31c 100755 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -177,7 +177,7 @@ if ($resql) if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht; if ($search_amount_ttc) $param.="&search_amount_ttc=".$search_amount_ttc; if ($search_status >= 0) $param.="&search_status=".$search_status; - + print_barre_liste($langs->trans("ListTripsAndExpenses"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print '
'."\n"; print ''; @@ -221,9 +221,9 @@ if ($resql) // Amount with no taxe print ''; - + print ''; - + // Amount with all taxes print ''; @@ -288,7 +288,7 @@ if ($resql) } else { - print ''; + print ''.''; } print "
 '.$langs->trans("NoRecordFound").'
'.$langs->trans("NoRecordFound").'
"; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 5f18a524acc..bb9b2c430be 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -88,8 +88,8 @@ foreach($cp->logs as $logs_CP) print '
'.$user_action->getNomUrl(1).''.$user_update->getNomUrl(1).''.$logs_CP['type_action'].''.$logs_CP['prev_solde'].' '.$langs->trans('days').''.$logs_CP['new_solde'].' '.$langs->trans('days').''.price2num($logs_CP['prev_solde'],8).' '.$langs->trans('days').''.price2num($logs_CP['new_solde'],8).' '.$langs->trans('days').'
'; $defaultref=''; @@ -342,7 +344,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '
'; - print '

'; + dol_fiche_end(); + + print '
'; print ''; print '     '; print ''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ff91803c96e..f375c8ed78e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1680,8 +1680,12 @@ table.border, table.dataTable, .table-border, .table-border-col, .table-key-bord .border tbody tr, .border tbody tr td { height: 20px; } -div.tabBar table.border tr { - height: 20px; +div.tabBar table.border tr, div.tabBar table.border tr td { + height: 28px; +} +div.tabBar .tdtop { + vertical-align: top; + padding-top: 6px; } table.border td, div.border div div.tagtd {