Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-01-21 11:32:40 +01:00
commit a9790f355d
9 changed files with 334 additions and 231 deletions

File diff suppressed because one or more lines are too long

View File

@ -342,11 +342,12 @@ if ($action == 'create')
print '</td></tr>';
// Morphy
$morphys = array();
$morphys[""] = $langs->trans("MorPhy");
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span>'.$langs->trans("MemberNature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"]) ? $_POST["morphy"] : $object->morphy);
print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : 'morphy');
print "</td></tr>";
print '<tr><td>'.$langs->trans("SubscriptionRequired").'</td><td>';
@ -354,12 +355,12 @@ if ($action == 'create')
print '</td></tr>';
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
print $form->selectyesno("vote", 0, 1);
print $form->selectyesno("vote", GETPOSTISSET("vote") ? GETPOST('vote', 'aZ09') : 1, 1);
print '</td></tr>';
print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3">';
print '<input name="duration_value" size="5" value="'.$_POST["duration_value"].'"> ';
print $formproduct->selectMeasuringUnits("duration_unit", "time", $_POST["duration_unit"], 0, 1);
print '<input name="duration_value" size="5" value="'.GETPOST('duraction_unit', 'aZ09').'"> ';
print $formproduct->selectMeasuringUnits("duration_unit", "time", GETPOSTISSET("duration_unit") ? GETPOST('duration_unit', 'aZ09') : 'y', 0, 1);
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';

View File

@ -377,6 +377,7 @@ print '</table>'."\n";
print '<br>';
// Other
print '<div class="div-table-responsive-no-min">';
print '<table summary="edit" class="noborder centpercent">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("LoginPage").'</td><td></td>';
print '<td width="20">&nbsp;</td>';
@ -427,7 +428,7 @@ print '</div>';
print '</td></tr>';
print '</table>'."\n";
print '</div>';
print '<br>';
print '<div class="center">';

View File

@ -382,7 +382,7 @@ if ($action != 'create') {
print '</td></tr>';
print '<tr><td>'.$langs->trans("Position").'</td><td><input type="text" name="position" class="maxwidth50" value="'.GETPOST('position', 'int').'"></td></tr>';
print '<tr><td>'.$langs->trans("Status").'</td><td>';
print $form->selectyesno('active', GETPOST('active', 'int'), 1);
print $form->selectarray('active', $object->fields['active']['arrayofkeyval'], GETPOST('active', 'int'), 0);
print '</td></tr>';
print '</table>';
print '<br>';

View File

@ -397,7 +397,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
print '<td class="nowrap">';
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="110" class="nobordernopadding nowrap">';
print '<td class="nobordernopadding nowraponall">';
print $facturestatic->getNomUrl(1, '');
print '</td>';
print '<td width="20" class="nobordernopadding nowrap">';
@ -509,7 +509,7 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->
//$thirdpartystatic->code_compta = $obj->code_compta;
$thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
print '<tr class="oddeven"><td>';
print '<tr class="oddeven nowraponall"><td>';
print $facstatic->getNomUrl(1, '');
print '</td>';
print '<td>';

View File

@ -101,7 +101,7 @@ class EmailSenderProfile extends CommonObject
'position' => array('type'=>'integer', 'label'=>'Position', 'visible'=>1, 'enabled'=>1, 'position'=>405, 'notnull'=>-1, 'index'=>1,),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1),
'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')),
);
/**

View File

@ -435,6 +435,7 @@ class Loan extends CommonObject
// Load translation files required by the page
$langs->loadLangs(array("customers","bills"));
unset($this->labelStatus); // Force to reset the array of status label, because label can change depending on parameters
if (empty($this->labelStatus) || empty($this->labelStatusShort))
{
global $langs;
@ -442,7 +443,7 @@ class Loan extends CommonObject
$this->labelStatus[self::STATUS_UNPAID] = $langs->trans('Unpaid');
$this->labelStatus[self::STATUS_PAID] = $langs->trans('Paid');
if ($status == 0 && $alreadypaid > 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted");
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('Draft');
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('Unpaid');
$this->labelStatusShort[self::STATUS_PAID] = $langs->trans('Enabled');
if ($status == 0 && $alreadypaid > 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted");
}
@ -458,23 +459,53 @@ class Loan extends CommonObject
/**
* Return clicable name (with eventually the picto)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen Label max length
* @return string Chaine with URL
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen Label max length
* @param string $option On what the link point to ('nolink', ...)
* @param int $notooltip 1=Disable tooltip
* @param string $morecss Add more css on link
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string Chaine with URL
*/
public function getNomUrl($withpicto = 0, $maxlen = 0)
public function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{
global $langs;
global $conf, $langs;
$result = '';
$tooltip = '<u>'.$langs->trans("ShowLoan").'</u>';
if (!empty($this->ref))
$tooltip .= '<br><strong>'.$langs->trans('Ref').':</strong> '.$this->ref;
if (!empty($this->label))
$tooltip .= '<br><strong>'.$langs->trans('Label').':</strong> '.$this->label;
$label = '<u>'.$langs->trans("ShowLoan").'</u>';
if (!empty($this->ref)) {
$label .= '<br><strong>'.$langs->trans('Ref').':</strong> '.$this->ref;
}
if (!empty($this->label)) {
$label .= '<br><strong>'.$langs->trans('Label').':</strong> '.$this->label;
}
$linkstart = '<a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$this->id.'" title="'.str_replace('\n', '', dol_escape_htmltag($tooltip, 1)).'" class="classfortooltip">';
$url = DOL_URL_ROOT.'/loan/card.php?id='.$this->id;
if ($option != 'nolink')
{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1;
if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1';
}
$linkclose = '';
if (empty($notooltip))
{
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label = $langs->trans("ShowMyObject");
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
}
else $linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
$linkstart = '<a href="'.$url.'"';
$linkstart .= $linkclose.'>';
$linkend = '</a>';
$result .= $linkstart;

View File

@ -184,7 +184,6 @@ if ($resql)
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre"></td>';
print '<td class="right liste_titre">';
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterAndCheckAddButtons(0);
print $searchpicto;
@ -216,6 +215,7 @@ if ($resql)
$loan_static->id = $obj->rowid;
$loan_static->ref = $obj->rowid;
$loan_static->label = $obj->label;
$loan_static->paid = $obj->paid;
print '<tr class="oddeven">';
@ -234,7 +234,9 @@ if ($resql)
// Date end
print '<td class="center width100">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
print '<td class="right nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
print '<td class="right nowrap">';
print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed);
print '</td>';
print '<td></td>';

View File

@ -70,7 +70,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
display: none;
}
.tmenu .open.dropdown, .login_block .open.dropdown, .tmenu .open.dropdown, .login_block .dropdown:hover{
.tmenu .open.dropdown, .tmenu .open.dropdown {
background: rgba(0, 0, 0, 0.1);
}
.tmenu .dropdown-menu, .login_block .dropdown-menu {