Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b39b970e52
@ -51,88 +51,90 @@ if ($action == 'addconst')
|
|||||||
dolibarr_set_const($db, "MAIN_BOXES_MAXLINES",$_POST["MAIN_BOXES_MAXLINES"],'',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_BOXES_MAXLINES",$_POST["MAIN_BOXES_MAXLINES"],'',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add')
|
if ($action == 'add') {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
if (isset($_POST['boxid']) && is_array($_POST['boxid'])) {
|
||||||
|
foreach($_POST['boxid'] as $boxid) {
|
||||||
|
if ($boxid['active']=='on') {
|
||||||
|
$pos = $boxid['pos'];
|
||||||
|
|
||||||
// Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
|
// Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
|
||||||
$distinctfkuser=array();
|
$distinctfkuser=array();
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$sql = "SELECT fk_user";
|
$sql = "SELECT fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_param";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user_param";
|
||||||
$sql.= " WHERE param = 'MAIN_BOXES_".$db->escape(GETPOST("pos","alpha"))."' AND value = '1'";
|
$sql.= " WHERE param = 'MAIN_BOXES_".$db->escape($pos)."' AND value = '1'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i=0;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj=$db->fetch_object($resql);
|
||||||
|
$distinctfkuser[$obj->fk_user]=$obj->fk_user;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessage($db->lasterror(), 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG);
|
$distinctfkuser['0']='0'; // Add entry for fk_user = 0. We must use string as key and val
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i=0;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$obj=$db->fetch_object($resql);
|
|
||||||
$distinctfkuser[$obj->fk_user]=$obj->fk_user;
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$distinctfkuser['0']='0'; // Add entry for fk_user = 0. We must use string as key and val
|
foreach($distinctfkuser as $fk_user)
|
||||||
|
{
|
||||||
|
if (! $error && $fk_user != '')
|
||||||
|
{
|
||||||
|
$nbboxonleft=$nbboxonright=0;
|
||||||
|
$sql = "SELECT box_order FROM ".MAIN_DB_PREFIX."boxes WHERE position = ".$pos." AND fk_user = ".$fk_user." AND entity = ".$conf->entity;
|
||||||
|
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
while($obj = $db->fetch_object($resql))
|
||||||
|
{
|
||||||
|
$boxorder=$obj->box_order;
|
||||||
|
if (preg_match('/A/',$boxorder)) $nbboxonleft++;
|
||||||
|
if (preg_match('/B/',$boxorder)) $nbboxonright++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else dol_print_error($db);
|
||||||
|
|
||||||
foreach($distinctfkuser as $fk_user)
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (";
|
||||||
{
|
$sql.= "box_id, position, box_order, fk_user, entity";
|
||||||
if (! $error && $fk_user != '')
|
$sql.= ") values (";
|
||||||
{
|
$sql.= $boxid['value'].", ".$pos.", '".(($nbboxonleft > $nbboxonright) ? 'B01' : 'A01')."', ".$fk_user.", ".$conf->entity;
|
||||||
$nbboxonleft=$nbboxonright=0;
|
$sql.= ")";
|
||||||
$sql = "SELECT box_order FROM ".MAIN_DB_PREFIX."boxes WHERE position = ".GETPOST("pos","alpha")." AND fk_user = ".$fk_user." AND entity = ".$conf->entity;
|
|
||||||
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
while($obj = $db->fetch_object($resql))
|
|
||||||
{
|
|
||||||
$boxorder=$obj->box_order;
|
|
||||||
if (preg_match('/A/',$boxorder)) $nbboxonleft++;
|
|
||||||
if (preg_match('/B/',$boxorder)) $nbboxonright++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else dol_print_error($db);
|
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (";
|
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
||||||
$sql.= "box_id, position, box_order, fk_user, entity";
|
$resql = $db->query($sql);
|
||||||
$sql.= ") values (";
|
if (! $resql)
|
||||||
$sql.= GETPOST("boxid","int").", ".GETPOST("pos","alpha").", '".(($nbboxonleft > $nbboxonright) ? 'B01' : 'A01')."', ".$fk_user.", ".$conf->entity;
|
{
|
||||||
$sql.= ")";
|
setEventMessage($db->lasterror(), 'errors');
|
||||||
|
$error++;
|
||||||
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
}
|
||||||
$resql = $db->query($sql);
|
}
|
||||||
if (! $resql)
|
}
|
||||||
{
|
}
|
||||||
setEventMessage($db->lasterror(), 'errors');
|
}
|
||||||
$error++;
|
}
|
||||||
}
|
if (! $error)
|
||||||
}
|
{
|
||||||
}
|
$db->commit();
|
||||||
|
$action='';
|
||||||
if (! $error)
|
}
|
||||||
{
|
else
|
||||||
header("Location: boxes.php");
|
{
|
||||||
$db->commit();
|
$db->rollback();
|
||||||
exit;
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
@ -317,14 +319,18 @@ if ($resql)
|
|||||||
$boxtoadd=InfoBox::listBoxes($db,'available',-1,null,$actives);
|
$boxtoadd=InfoBox::listBoxes($db,'available',-1,null,$actives);
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
print "\n\n".'<!-- Boxes Available -->'."\n";
|
||||||
print_titre($langs->trans("BoxesAvailable"));
|
print_titre($langs->trans("BoxesAvailable"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||||
|
print '<input type="hidden" name="action" value="add">'."\n";
|
||||||
|
print '<table class="noborder" width="100%">'."\n";
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
print '<td>'.$langs->trans("SourceFile").'</td>';
|
print '<td>'.$langs->trans("SourceFile").'</td>';
|
||||||
print '<td width="160">'.$langs->trans("ActivateOn").'</td>';
|
print '<td class="center" width="160">'.$langs->trans("ActivateOn").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
foreach($boxtoadd as $box)
|
foreach($boxtoadd as $box)
|
||||||
@ -341,12 +347,10 @@ foreach($boxtoadd as $box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
|
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<tr '.$bc[$var].'>'."\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<tr '.$bc[$var].'>';
|
|
||||||
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||||
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
||||||
print '</td>';
|
print '</td>'."\n";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
||||||
{
|
{
|
||||||
@ -354,22 +358,25 @@ foreach($boxtoadd as $box)
|
|||||||
print $langs->trans("WarningUsingThisBoxSlowDown");
|
print $langs->trans("WarningUsingThisBoxSlowDown");
|
||||||
}
|
}
|
||||||
else print ($box->note?$box->note:' ');
|
else print ($box->note?$box->note:' ');
|
||||||
print '</td>';
|
print '</td>'."\n";
|
||||||
print '<td>' . $box->sourcefile . '</td>';
|
print '<td>' . $box->sourcefile . '</td>'."\n";
|
||||||
|
|
||||||
// Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position
|
// Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position
|
||||||
print '<td>';
|
print '<td class="center">';
|
||||||
print $form->selectarray("pos",$pos_name,0,0,0,0,'',1);
|
print $form->selectarray("boxid[".$box->box_id."][pos]",$pos_name,0,0,0,0,'',1)."\n";
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
|
||||||
print '<input type="hidden" name="boxid" value="'.$box->box_id.'">';
|
print '<input type="checkbox" class="flat" name="boxid['.$box->box_id.'][active]">'."\n";
|
||||||
print ' <input type="submit" class="button" name="button" value="'.$langs->trans("Activate").'">';
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>'."\n";
|
||||||
print '</form>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>'."\n";
|
||||||
|
print '<br><div class="right">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Activate").'">';
|
||||||
|
print '</div>'."\n";
|
||||||
|
print '</form>';
|
||||||
|
print "\n".'<!-- End Boxes Available -->'."\n";
|
||||||
|
|
||||||
|
|
||||||
// Activated boxes
|
// Activated boxes
|
||||||
@ -421,8 +428,8 @@ foreach($boxactivated as $key => $box)
|
|||||||
$hasprevious=($key != 0);
|
$hasprevious=($key != 0);
|
||||||
print '<td align="center">'.($key+1).'</td>';
|
print '<td align="center">'.($key+1).'</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a> ':'');
|
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a> ':'');
|
||||||
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
|
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="boxes.php?rowid='.$box->rowid.'&action=delete">'.img_delete().'</a>';
|
print '<a href="boxes.php?rowid='.$box->rowid.'&action=delete">'.img_delete().'</a>';
|
||||||
@ -436,13 +443,14 @@ print '</table><br>';
|
|||||||
|
|
||||||
// Other parameters
|
// Other parameters
|
||||||
|
|
||||||
|
print "\n\n".'<!-- Other Const -->'."\n";
|
||||||
print_titre($langs->trans("Other"));
|
print_titre($langs->trans("Other"));
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
|
|
||||||
$var=false;
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="addconst">';
|
print '<input type="hidden" name="action" value="addconst">';
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
|
$var=false;
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre">'.$langs->trans("Parameter").'</td>';
|
print '<td class="liste_titre">'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td class="liste_titre">'.$langs->trans("Value").'</td>';
|
print '<td class="liste_titre">'.$langs->trans("Value").'</td>';
|
||||||
@ -459,9 +467,10 @@ print '<td align="right">';
|
|||||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button">';
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</form>';
|
||||||
|
print "\n".'<!-- End Other Const -->'."\n";
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -38,6 +38,7 @@ if (!$user->admin)
|
|||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
$langs->load("orders");
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|||||||
@ -3603,7 +3603,7 @@ abstract class CommonObject
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$out .= '</td>'."\n";
|
$out .= '</td>';
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= '</tr>';
|
if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= '</tr>';
|
||||||
else $out .= '</tr>';
|
else $out .= '</tr>';
|
||||||
@ -3611,7 +3611,6 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$out .= "\n";
|
$out .= "\n";
|
||||||
$out .= '<!-- /showOptionalsInput --> ';
|
|
||||||
$out .= '
|
$out .= '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
@ -3640,7 +3639,8 @@ abstract class CommonObject
|
|||||||
|
|
||||||
setListDependencies();
|
setListDependencies();
|
||||||
});
|
});
|
||||||
</script>';
|
</script>'."\n";
|
||||||
|
$out .= '<!-- /showOptionalsInput --> '."\n";
|
||||||
}
|
}
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2978,12 +2978,13 @@ class Form
|
|||||||
// Show JQuery confirm box. Note that global var $useglobalvars is used inside this template
|
// Show JQuery confirm box. Note that global var $useglobalvars is used inside this template
|
||||||
$formconfirm.= '<div id="'.$dialogconfirm.'" title="'.dol_escape_htmltag($title).'" style="display: none;">';
|
$formconfirm.= '<div id="'.$dialogconfirm.'" title="'.dol_escape_htmltag($title).'" style="display: none;">';
|
||||||
if (! empty($more)) {
|
if (! empty($more)) {
|
||||||
$formconfirm.= '<p>'.$more.'</p>';
|
$formconfirm.= '<div>'.$more.'</div>';
|
||||||
}
|
}
|
||||||
$formconfirm.= img_help('','').' '.$question;
|
$formconfirm.= img_help('','').' '.$question;
|
||||||
$formconfirm.= '</div>';
|
$formconfirm.= '</div>'."\n";
|
||||||
|
|
||||||
$formconfirm.= '<script type="text/javascript">';
|
$formconfirm.= "\n<!-- begin ajax form_confirm page=".$page." -->\n";
|
||||||
|
$formconfirm.= '<script type="text/javascript">'."\n";
|
||||||
$formconfirm.='
|
$formconfirm.='
|
||||||
$(function() {
|
$(function() {
|
||||||
$( "#'.$dialogconfirm.'" ).dialog({
|
$( "#'.$dialogconfirm.'" ).dialog({
|
||||||
@ -3050,13 +3051,14 @@ class Form
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
$formconfirm.= "<!-- end ajax form_confirm -->\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$formconfirm.= "\n<!-- begin form_confirm page=".$page." -->\n";
|
$formconfirm.= "\n<!-- begin form_confirm page=".$page." -->\n";
|
||||||
|
|
||||||
$formconfirm.= '<form method="POST" action="'.$page.'" class="notoptoleftroright">'."\n";
|
$formconfirm.= '<form method="POST" action="'.$page.'" class="notoptoleftroright">'."\n";
|
||||||
$formconfirm.= '<input type="hidden" name="action" value="'.$action.'">';
|
$formconfirm.= '<input type="hidden" name="action" value="'.$action.'">'."\n";
|
||||||
$formconfirm.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
$formconfirm.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||||
|
|
||||||
$formconfirm.= '<table width="100%" class="valid">'."\n";
|
$formconfirm.= '<table width="100%" class="valid">'."\n";
|
||||||
|
|||||||
@ -49,7 +49,6 @@ $(document).ready(function () {
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<div class="login_vertical_align">
|
<div class="login_vertical_align">
|
||||||
|
|
||||||
|
|
||||||
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
|
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||||
@ -110,7 +109,7 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
if ($captcha) {
|
if ($captcha) {
|
||||||
// TODO: provide accessible captha variants
|
// TODO: provide accessible captha variants
|
||||||
?>
|
?>
|
||||||
<!-- Captcha -->
|
<!-- Captcha -->
|
||||||
<tr><td valign="middle" class="loginfield nowrap"><label for="securitycode"><b><?php echo $langs->trans('SecurityCode'); ?></b></label></td>
|
<tr><td valign="middle" class="loginfield nowrap"><label for="securitycode"><b><?php echo $langs->trans('SecurityCode'); ?></b></label></td>
|
||||||
<td valign="top" class="nowrap none" align="left">
|
<td valign="top" class="nowrap none" align="left">
|
||||||
|
|
||||||
@ -191,18 +190,14 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if (! empty($_SESSION['dol_loginmesg']))
|
<?php if (! empty($_SESSION['dol_loginmesg']))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -216,21 +211,17 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
|
|||||||
<?php if ($main_home)
|
<?php if ($main_home)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="login_main_home center" style="max-width: 80%">
|
<!-- main_home message -->
|
||||||
<?php echo $main_home; ?>
|
<div class="login_main_home center" style="max-width: 80%"><?php echo $main_home; ?></div>
|
||||||
</div><br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- authentication mode = <?php echo $main_authentication ?> -->
|
<!-- authentication mode = <?php echo $main_authentication ?> -->
|
||||||
<!-- cookie name used for this session = <?php echo $session_name ?> -->
|
<!-- cookie name used for this session = <?php echo $session_name ?> -->
|
||||||
<!-- urlfrom in this session = <?php echo isset($_SESSION["urlfrom"])?$_SESSION["urlfrom"]:''; ?> -->
|
<!-- urlfrom in this session = <?php echo isset($_SESSION["urlfrom"])?$_SESSION["urlfrom"]:''; ?> -->
|
||||||
|
|
||||||
<!-- Common footer is not used for login page, this is same than footer but inside login tpl -->
|
<!-- Common footer is not used for login page, this is same than footer but inside login tpl -->
|
||||||
|
|
||||||
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
|
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Google Analytics (need Google module)
|
// Google Analytics (need Google module)
|
||||||
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||||
@ -276,10 +267,8 @@ if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -45,7 +45,7 @@ if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
|
|||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
<td align="center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
<td align="center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td><?php $coldisplay++; ?><div id="<?php echo $line->rowid; ?>"></div>
|
<td><?php $coldisplay++; ?><div id="row-<?php echo $line->id; ?>"></div>
|
||||||
<?php if (($line->info_bits & 2) == 2) { ?>
|
<?php if (($line->info_bits & 2) == 2) { ?>
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid; ?>">
|
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid; ?>">
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -1534,8 +1534,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
// Instantiate hooks of thirdparty module
|
// Instantiate hooks of thirdparty module
|
||||||
$hookmanager->initHooks(array('searchform','leftblock'));
|
$hookmanager->initHooks(array('searchform','leftblock'));
|
||||||
|
|
||||||
if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<!-- Begin left layout -->'."\n".'<div class="ui-layout-west">'."\n";
|
||||||
else print '<div id="id-left"> <!-- Begin id-left -->';
|
else print "\n".'<!-- Begin id-left -->'."\n".'<div id="id-left">'."\n";
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
@ -1543,33 +1543,33 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname', 'T');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname', 'T', 'searchleft');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire)
|
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname', '', 'searchleft');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
||||||
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleft');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled)
|
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled)
|
||||||
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER))
|
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER))
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier', '', 'searchleft');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
|
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
|
||||||
{
|
{
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M', 'searchleft');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute hook printSearchForm
|
// Execute hook printSearchForm
|
||||||
@ -1806,9 +1806,10 @@ function getHelpParamFor($helppagename,$langs)
|
|||||||
* @param string $htmlmodesearch Value to set into parameter "mode_search" ('soc','contact','products','member',...)
|
* @param string $htmlmodesearch Value to set into parameter "mode_search" ('soc','contact','products','member',...)
|
||||||
* @param string $htmlinputname Field Name input form
|
* @param string $htmlinputname Field Name input form
|
||||||
* @param string $accesskey Accesskey
|
* @param string $accesskey Accesskey
|
||||||
|
* @param string $idname Complement for id to avoid multiple same id in the page
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinputname,$accesskey='')
|
function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinputname,$accesskey='', $idname='')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
@ -1828,7 +1829,7 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput
|
|||||||
$ret.=($accesskey?' accesskey="'.$accesskey.'"':'');
|
$ret.=($accesskey?' accesskey="'.$accesskey.'"':'');
|
||||||
if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
|
if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
|
||||||
else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
|
else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"';
|
||||||
$ret.=' name="'.$htmlinputname.'" id="'.$htmlinputname.'" size="10" />';
|
$ret.=' name="'.$htmlinputname.'" id="'.$idname.$htmlinputname.'" size="10" />';
|
||||||
$ret.='<input type="submit" class="button" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px" value="'.$langs->trans("Go").'">';
|
$ret.='<input type="submit" class="button" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px" value="'.$langs->trans("Go").'">';
|
||||||
$ret.="</form>\n";
|
$ret.="</form>\n";
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|||||||
@ -1547,7 +1547,9 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="'.(2+(($showphoto||$showbarcode)?1:0)).'">'.(dol_textishtml($object->note)?$object->note:dol_nl2br($object->note,1,true)).'</td></tr>';
|
print '<!-- show Note --> '."\n";
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="'.(2+(($showphoto||$showbarcode)?1:0)).'">'.(dol_textishtml($object->note)?$object->note:dol_nl2br($object->note,1,true)).'</td></tr>'."\n";
|
||||||
|
print '<!-- End show Note --> '."\n";
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user