select by default, remove the show empty everywhere the field is required

This commit is contained in:
Laurent De Coninck 2020-10-17 21:15:52 +02:00
parent cea7fd6894
commit d2e2cad028
No known key found for this signature in database
GPG Key ID: 2BA964D76BB3A499
11 changed files with 11 additions and 11 deletions

View File

@ -927,7 +927,7 @@ if ($rowid > 0) {
// Bank account
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>';
$form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 1);
$form->select_comptes(GETPOST('accountid'), 'accountid');
print "</td></tr>\n";
// Payment mode

View File

@ -370,7 +370,7 @@ if ($action == 'create')
{
print '<tr><td>';
print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).'</td><td>';
$form->select_comptes($accountid, "accountid", 0, '', 1); // Affiche liste des comptes courant
$form->select_comptes($accountid, "accountid", 0, ''); // Affiche liste des comptes courant
print '</td></tr>';
}

View File

@ -178,7 +178,7 @@ if ($action == 'create')
if (!empty($conf->banque->enabled))
{
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
$form->select_comptes($_POST["accountid"], "accountid", 0, "courant=1", 1); // Affiche liste des comptes courant
$form->select_comptes($_POST["accountid"], "accountid", 0, "courant=1"); // Affiche liste des comptes courant
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';

View File

@ -496,7 +496,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if ($facture->type != 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToCredit').'</span></td>';
if ($facture->type == 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToDebit').'</span></td>';
print '<td>';
$form->select_comptes($accountid, 'accountid', 0, '', 2);
$form->select_comptes($accountid, 'accountid', 0, '');
print '</td>';
} else {
print '<td>&nbsp;</td>';

View File

@ -236,7 +236,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
print '<td>';
$form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $charge->accountid, "accountid", 0, '', 1); // Show opend bank account list
$form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $charge->accountid, "accountid", 0, ''); // Show opend bank account list
print '</td></tr>';
// Number

View File

@ -370,7 +370,7 @@ if ($action == 'create')
if (!empty($conf->banque->enabled))
{
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
$form->select_comptes($fk_account, 'fk_account', 0, '');
print '</td></tr>';
}

View File

@ -271,7 +271,7 @@ if ($action == 'create')
if (!empty($conf->banque->enabled))
{
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccount").'</td><td>';
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 2); // List of bank account available
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1"); // List of bank account available
print '</td></tr>';
}

View File

@ -291,7 +291,7 @@ if (!empty($arrayfields['transaction']['checked'])) {
// Filter: Bank account
if (!empty($arrayfields['ba.label']['checked'])) {
print '<td class="liste_titre">';
$form->select_comptes($search_account, 'search_account', 0, '', 1);
$form->select_comptes($search_account, 'search_account', 0, '');
print '</td>';
}

View File

@ -3880,7 +3880,7 @@ class Form
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
if ($selected == $obj->rowid || ($num === 1 && empty($selected)))
if ($selected == $obj->rowid || (empty($useempty) && $num === 1 && empty($selected)))
{
print '<option value="'.$obj->rowid.'" selected>';
} else {

View File

@ -215,7 +215,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('AccountToCredit').'</td>';
print '<td colspan="2">';
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $object->accountid, "accountid", 0, '', 1); // Show open bank account list
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $object->accountid, "accountid", 0, ''); // Show open bank account list
print '</td></tr>';
// Number

View File

@ -262,7 +262,7 @@ if ($action == 'create' || empty($action))
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
print '<td colspan="2">';
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", "int") : $expensereport->accountid, "accountid", 0, '', 1); // Show open bank account list
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", "int") : $expensereport->accountid, "accountid"); // Show open bank account list
print '</td></tr>';
}