New: Add parameter $conf->box_max_lines
This commit is contained in:
parent
9023aaafaf
commit
59404b727a
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||||
|
include_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@ -39,6 +40,10 @@ $boxes = array();
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
if ((isset($_POST["action"]) && $_POST["action"] == 'addconst'))
|
||||||
|
{
|
||||||
|
dolibarr_set_const($db, "MAIN_BOXES_MAXLINES",$_POST["MAIN_BOXES_MAXLINES"]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'add')
|
if ($_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
@ -373,6 +378,26 @@ if ($resql)
|
|||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
|
|
||||||
|
# Affiche ligne d'ajout
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
|
$var=false;
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
print '<input type="hidden" name="action" value="addconst">';
|
||||||
|
print "<tr $bc[$var] class=value><td>";
|
||||||
|
print $langs->trans("MaxNbOfLinesForBoxes")."</td>\n";
|
||||||
|
print '<td>';
|
||||||
|
print '<input type="text" class="flat" size="6" name="MAIN_BOXES_MAXLINES" value="'.$conf->global->MAIN_BOXES_MAXLINES.'">';
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button"><br>';
|
||||||
|
print "</td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|||||||
@ -15,15 +15,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/admin/const.php
|
\file htdocs/admin/const.php
|
||||||
\ingroup setup
|
\ingroup setup
|
||||||
\brief Page d'administration/configuration des constantes autres
|
\brief Page d'administration/configuration des constantes autres
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|||||||
@ -364,6 +364,10 @@ class Conf
|
|||||||
// securite
|
// securite
|
||||||
if (empty($this->global->USER_PASSWORD_GENERATED)) $this->global->USER_PASSWORD_GENERATED='standard';
|
if (empty($this->global->USER_PASSWORD_GENERATED)) $this->global->USER_PASSWORD_GENERATED='standard';
|
||||||
|
|
||||||
|
// conf->box_max_lines
|
||||||
|
$this->box_max_lines=5;
|
||||||
|
if (isset($conf->global->MAIN_BOXES_MAXLINES)) $this->box_max_lines=$conf->global->MAIN_BOXES_MAXLINES;
|
||||||
|
|
||||||
// conf->use_preview_tabs
|
// conf->use_preview_tabs
|
||||||
$this->use_preview_tabs=0;
|
$this->use_preview_tabs=0;
|
||||||
if (isset($this->global->MAIN_USE_PREVIEW_TABS)) $this->use_preview_tabs=$this->global->MAIN_USE_PREVIEW_TABS;
|
if (isset($this->global->MAIN_USE_PREVIEW_TABS)) $this->use_preview_tabs=$this->global->MAIN_USE_PREVIEW_TABS;
|
||||||
|
|||||||
@ -16,15 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/includes/boxes/box_clients.php
|
\file htdocs/includes/boxes/box_clients.php
|
||||||
\ingroup societes
|
\ingroup societes
|
||||||
\brief Module de génération de l'affichage de la box clients
|
\brief Module de génération de l'affichage de la box clients
|
||||||
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user