Fight against valign="top". Minor css fixes.

This commit is contained in:
Laurent Destailleur 2015-05-14 16:47:15 +02:00
parent 74607218ea
commit 3e94cc07d2
11 changed files with 109 additions and 89 deletions

View File

@ -313,13 +313,13 @@ if ($id > 0 || ! empty($ref))
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
print '</td></tr>';
// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$object->label.'</td></tr>';
print '</table>';

View File

@ -144,7 +144,7 @@ print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
if ($_GET["account"])
{
@ -172,7 +172,7 @@ else
print '</td></tr>';
// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">';
if (! empty($id))
{

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
@ -266,24 +266,26 @@ if ($action == 'create')
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="clos" value="0">';
dol_fiche_head('');
print '<table class="border" width="100%">';
// Ref
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.($_POST["ref"]?$_POST["ref"]:$account->ref).'" maxlength="12"></td></tr>';
// Label
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("LabelBankCashAccount").'</td>';
print '<td colspan="3"><input size="30" type="text" class="flat" name="label" value="'.GETPOST("label").'"></td></tr>';
// Type
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountType").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
print '<td colspan="3">';
$formbank->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type");
print '</td></tr>';
// Currency
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
print '<td colspan="3">';
$selectedcode=$account->account_currency_code;
if (! $selectedcode) $selectedcode=$conf->currency;
@ -293,7 +295,7 @@ if ($action == 'create')
print '</td></tr>';
// Status
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Status").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
print '<td colspan="3">';
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
print '</td></tr>';
@ -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 '<tr><td valign="top" class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
print '<td colspan="3">';
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 '</td></tr>';
// Web
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
print '<tr><td>'.$langs->trans("Web").'</td>';
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.$_POST["url"].'"></td></tr>';
// Comment
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
print '<td colspan="3">';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@ -353,18 +355,18 @@ if ($action == 'create')
print '<table class="border" width="100%">';
// Sold
print '<tr><td valign="top" width="25%">'.$langs->trans("InitialBankBalance").'</td>';
print '<tr><td width="25%">'.$langs->trans("InitialBankBalance").'</td>';
print '<td colspan="3"><input size="12" type="text" class="flat" name="solde" value="'.(GETPOST("solde")?GETPOST("solde"):price2num($account->solde)).'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("Date").'</td>';
print '<tr><td>'.$langs->trans("Date").'</td>';
print '<td colspan="3">';
$form->select_date('', 're', 0, 0, 0, 'formsoc');
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.($_POST["account_min_allowed"]?$_POST["account_min_allowed"]:$account->account_min_allowed).'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->account_min_desired).'"></td></tr>';
print '</table>';
@ -375,7 +377,7 @@ if ($action == 'create')
print '<table class="border" width="100%">';
// If bank account
print '<tr><td valign="top" width="25%">'.$langs->trans("BankName").'</td>';
print '<tr><td width="25%">'.$langs->trans("BankName").'</td>';
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
print '</tr>';
@ -452,16 +454,16 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans($bickey).'</td>';
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
print $account->domiciliation;
print "</textarea></td></tr>";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
print $account->owner_address;
print "</textarea></td></tr>";
@ -474,25 +476,27 @@ if ($action == 'create')
// Accountancy code
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
{
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number'):$account->account_number).'"></td></tr>';
}
else
{
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(GETPOST("account_number")?GETPOST('account_number'):$account->account_number).'"></td></tr>';
}
// Accountancy journal
if (! empty($conf->accounting->enabled))
{
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(GETPOST("accountancy_journal")?GETPOST('accountancy_journal'):$account->accountancy_journal).'"></td></tr>';
}
print '</table>';
print '<br><div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
dol_fiche_end();
print '<div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
print '</form>';
}
@ -538,21 +542,21 @@ else
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($account, 'ref', $linkback, 1, 'ref');
print '</td></tr>';
// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$account->label.'</td></tr>';
// Type
print '<tr><td valign="top">'.$langs->trans("AccountType").'</td>';
print '<tr><td>'.$langs->trans("AccountType").'</td>';
print '<td colspan="3">'.$account->type_lib[$account->type].'</td></tr>';
// Currency
print '<tr><td valign="top">'.$langs->trans("Currency").'</td>';
print '<tr><td>'.$langs->trans("Currency").'</td>';
print '<td colspan="3">';
$selectedcode=$account->account_currency_code;
if (! $selectedcode) $selectedcode=$conf->currency;
@ -560,7 +564,7 @@ else
print '</td></tr>';
// Status
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="3">'.$account->getLibStatut(4).'</td></tr>';
// Country
@ -579,7 +583,7 @@ else
print '</td></tr>';
// Conciliate
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
print '<td colspan="3">';
$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 '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<td colspan="3">'.$account->min_allowed.'</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
print '<td colspan="3">'.$account->min_desired.'</td></tr>';
print '<tr><td valign="top">'.$langs->trans("Web").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">';
if ($account->url) print '<a href="'.$account->url.'" target="_gobank">';
print $account->url;
if ($account->url) print '</a>';
print "</td></tr>\n";
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
print '<td colspan="3">'.dol_htmlentitiesbr($account->comment).'</td></tr>';
// Other attributes
@ -687,7 +691,7 @@ else
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
print '<tr><td valign="top">'.$langs->trans($ibankey).'</td>';
print '<tr><td>'.$langs->trans($ibankey).'</td>';
print '<td colspan="3">'.$account->iban.'&nbsp;';
if (! empty($account->iban)) {
if (! checkIbanForAccount($account)) {
@ -698,7 +702,7 @@ else
}
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans($bickey).'</td>';
print '<tr><td>'.$langs->trans($bickey).'</td>';
print '<td colspan="3">'.$account->bic.'&nbsp;';
if (! empty($account->bic)) {
if (! checkSwiftForAccount($account)) {
@ -709,15 +713,15 @@ else
}
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
print nl2br($account->domiciliation);
print "</td></tr>\n";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td><td colspan="3">';
print $account->proprio;
print "</td></tr>\n";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
print nl2br($account->owner_address);
print "</td></tr>\n";
@ -727,13 +731,13 @@ else
print '<table class="border" width="100%">';
// Accountancy code
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3">'.$account->account_number.'</td></tr>';
// Accountancy journal
if (! empty($conf->accounting->enabled))
{
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
print '<td colspan="3">'.$account->accountancy_journal.'</td></tr>';
}
@ -799,24 +803,26 @@ else
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$_REQUEST["id"].'">'."\n\n";
dol_fiche_head('');
print '<table class="border" width="100%">';
// Ref
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3"><input size="8" type="text" class="flat" name="ref" value="'.(isset($_POST["ref"])?$_POST["ref"]:$account->ref).'"></td></tr>';
// Label
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Label").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td>';
print '<td colspan="3"><input size="30" type="text" class="flat" name="label" value="'.(isset($_POST["label"])?$_POST["label"]:$account->label).'"></td></tr>';
// Type
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountType").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("AccountType").'</td>';
print '<td colspan="3">';
$formbank->select_type_comptes_financiers((isset($_POST["type"])?$_POST["type"]:$account->type),"type");
print '</td></tr>';
// Currency
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency");
print '<tr><td class="fieldrequired">'.$langs->trans("Currency");
print '<input type="hidden" value="'.$account->currency_code.'">';
print '</td>';
print '<td colspan="3">';
@ -828,7 +834,7 @@ else
print '</td></tr>';
// Status
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Status").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td>';
print '<td colspan="3">';
print $form->selectarray("clos",array(0=>$account->status[0],1=>$account->status[1]),(isset($_POST["clos"])?$_POST["clos"]:$account->clos));
print '</td></tr>';
@ -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 '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Country").'</td>';
print '<tr><td class="fieldrequired">'.$langs->trans("Country").'</td>';
print '<td colspan="3">';
print $form->select_country($selectedcode,'account_country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
@ -859,7 +865,7 @@ else
print '</td></tr>';
// Conciliable
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
print '<td colspan="3">';
$conciliate=$account->canBeConciliated();
if ($conciliate == -2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
@ -868,19 +874,19 @@ else
print '</td></tr>';
// Balance
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<tr><td>'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_allowed" value="'.(isset($_POST["account_min_allowed"])?$_POST["account_min_allowed"]:$account->min_allowed).'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalDesired").'</td>';
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.(isset($_POST["account_min_desired"])?$_POST["account_min_desired"]:$account->min_desired).'"></td></tr>';
// Web
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
print '<tr><td>'.$langs->trans("Web").'</td>';
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.(isset($_POST["url"])?$_POST["url"]:$account->url).'">';
print '</td></tr>';
// Comment
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
print '<tr><td class="tdtop">'.$langs->trans("Comment").'</td>';
print '<td colspan="3">';
// Editor wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@ -903,7 +909,7 @@ else
print '<table class="border" width="100%">';
// If bank account
print '<tr><td valign="top" width="25%">'.$langs->trans("BankName").'</td>';
print '<tr><td width="25%">'.$langs->trans("BankName").'</td>';
print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>';
print '</tr>';
@ -975,22 +981,22 @@ else
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
// IBAN
print '<tr><td valign="top">'.$langs->trans($ibankey).'</td>';
print '<tr><td>'.$langs->trans($ibankey).'</td>';
print '<td colspan="3"><input size="34" maxlength="34" type="text" class="flat" name="iban" value="'.$account->iban.'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans($bickey).'</td>';
print '<tr><td>'.$langs->trans($bickey).'</td>';
print '<td colspan="3"><input size="11" maxlength="11" type="text" class="flat" name="bic" value="'.$account->bic.'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="3">';
print "<textarea class=\"flat\" name=\"domiciliation\" rows=\"2\" cols=\"40\">";
print $account->domiciliation;
print "</textarea></td></tr>";
print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>';
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td colspan="3"><input size="30" type="text" class="flat" name="proprio" value="'.$account->proprio.'">';
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
print "<textarea class=\"flat\" name=\"owner_address\" rows=\"2\" cols=\"40\">";
print $account->owner_address;
print "</textarea></td></tr>";
@ -1004,25 +1010,27 @@ else
// Accountancy code
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
{
print '<tr><td valign="top" class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
}
else
{
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<tr><td width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
}
// Accountancy journal
if (! empty($conf->accounting->enabled))
{
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>';
}
print '</table>';
print '<br><div class="center">';
dol_fiche_end();
print '<div class="center">';
print '<input value="'.$langs->trans("Modify").'" type="submit" class="button">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input name="cancel" value="'.$langs->trans("Cancel").'" type="submit" class="button">';

View File

@ -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 '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
if ($account)
{
@ -799,7 +799,7 @@ else
print '</td></tr>';
// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">';
if ($account && $_GET["option"]!='all')
{

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
@ -128,13 +128,13 @@ if (empty($num))
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
print '</td></tr>';
// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$acct->label.'</td></tr>';
print '</table>';

View File

@ -98,13 +98,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
print '</td></tr>';
// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$acct->label.'</td></tr>';
print '</table>';

View File

@ -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='';
}

View File

@ -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 '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<table class="noborder" width="100%">';
@ -221,9 +221,9 @@ if ($resql)
// Amount with no taxe
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ht" value="'.$search_amount_ht.'"></td>';
print '<td class="liste_titre">&nbsp;</td>';
// Amount with all taxes
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ttc" value="'.$search_amount_ttc.'"></td>';
@ -288,7 +288,7 @@ if ($resql)
}
else
{
print '<td colspan="9">'.$langs->trans("NoRecordFound").'</td>';
print '<tr '.$bc[false].'>'.'<td colspan="9">'.$langs->trans("NoRecordFound").'</td></tr>';
}
print "</table>";

View File

@ -88,8 +88,8 @@ foreach($cp->logs as $logs_CP)
print '<td>'.$user_action->getNomUrl(1).'</td>';
print '<td>'.$user_update->getNomUrl(1).'</td>';
print '<td>'.$logs_CP['type_action'].'</td>';
print '<td style="text-align: right;">'.$logs_CP['prev_solde'].' '.$langs->trans('days').'</td>';
print '<td style="text-align: right;">'.$logs_CP['new_solde'].' '.$langs->trans('days').'</td>';
print '<td style="text-align: right;">'.price2num($logs_CP['prev_solde'],8).' '.$langs->trans('days').'</td>';
print '<td style="text-align: right;">'.price2num($logs_CP['new_solde'],8).' '.$langs->trans('days').'</td>';
print '</tr>'."\n";
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* 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 '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="createtask">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
if (! empty($object->id)) print '<input type="hidden" name="id" value="'.$object->id.'">';
if (! empty($mode)) print '<input type="hidden" name="mode" value="'.$mode.'">';
dol_fiche_head('');
print '<table class="border" width="100%">';
$defaultref='';
@ -342,7 +344,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
print '</table>';
print '<div align="center"><br>';
dol_fiche_end();
print '<div align="center">';
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
print ' &nbsp; &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';

View File

@ -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 {