Fix look and feel v7 for popup on ref of social contributions payments
This commit is contained in:
parent
894f16c5ee
commit
3f489ee3c6
@ -467,18 +467,55 @@ class ChargeSociales extends CommonObject
|
|||||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||||
* @param int $maxlen Max length of label
|
* @param int $maxlen Max length of label
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
|
* @param int $short 1=Return just URL
|
||||||
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
* @return string String with link
|
* @return string String with link
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
|
function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $short=0, $save_lastsearch_value=-1)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs, $conf, $user, $form;
|
||||||
|
|
||||||
|
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
if (empty($this->ref)) $this->ref=$this->lib;
|
$url = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$this->id;
|
||||||
$label = $langs->trans("ShowSocialContribution").': '.$this->ref;
|
|
||||||
|
|
||||||
$linkstart = '<a href="'.DOL_URL_ROOT.'/compta/sociales/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
if ($short) return $url;
|
||||||
|
|
||||||
|
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';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (empty($this->ref)) $this->ref=$this->lib;
|
||||||
|
|
||||||
|
$label = '<u>'.$langs->trans("ShowSocialContribution").'</u>';
|
||||||
|
if (! empty($this->ref))
|
||||||
|
$label .= '<br><b>'.$langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||||
|
if (! empty($this->lib))
|
||||||
|
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->lib;
|
||||||
|
if (! empty($this->type_libelle))
|
||||||
|
$label .= '<br><b>'.$langs->trans('Type') . ':</b> ' . $this->type_libelle;
|
||||||
|
|
||||||
|
$linkclose='';
|
||||||
|
if (empty($notooltip) && $user->rights->facture->lire)
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
|
{
|
||||||
|
$label=$langs->trans("ShowSocialContribution");
|
||||||
|
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
}
|
||||||
|
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
$linkclose.=' class="classfortooltip"';
|
||||||
|
}
|
||||||
|
|
||||||
|
$linkstart='<a href="'.$url.'"';
|
||||||
|
$linkstart.=$linkclose.'>';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
|
|||||||
@ -28,9 +28,7 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||||
|
|
||||||
$langs->load("compta");
|
$langs->loadLangs(array("compta","banks","bills"));
|
||||||
$langs->load("banks");
|
|
||||||
$langs->load("bills");
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||||
@ -189,10 +187,10 @@ if ($resql)
|
|||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="3" name="search_ref" value="'.$search_ref.'">';
|
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Label
|
// Label
|
||||||
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_label" value="'.$search_label.'"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
|
||||||
// Type
|
// Type
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
$formsocialcontrib->select_type_socialcontrib($typeid,'typeid',1,0,0,'maxwidth100onsmartphone');
|
$formsocialcontrib->select_type_socialcontrib($typeid,'typeid',1,0,0,'maxwidth100onsmartphone');
|
||||||
@ -201,7 +199,7 @@ if ($resql)
|
|||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_amount" value="'.$search_amount.'">';
|
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Status
|
// Status
|
||||||
@ -233,13 +231,15 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$chargesociale_static->id=$obj->id;
|
||||||
|
$chargesociale_static->ref=$obj->id;
|
||||||
|
$chargesociale_static->lib=$obj->libelle;
|
||||||
|
$chargesociale_static->type_libelle=$obj->type_lib;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td width="60">';
|
print '<td width="60">';
|
||||||
$chargesociale_static->id=$obj->id;
|
|
||||||
$chargesociale_static->lib=$obj->id;
|
|
||||||
$chargesociale_static->ref=$obj->id;
|
|
||||||
print $chargesociale_static->getNomUrl(1,'20');
|
print $chargesociale_static->getNomUrl(1,'20');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user