Merge branch 'develop' into Add_param_color_button_action
This commit is contained in:
commit
49efba7ded
@ -237,7 +237,7 @@ if ($action != 'export_csv') {
|
|||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
$button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||||
|
|
||||||
|
|||||||
@ -766,7 +766,7 @@ if (count($filter)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Button re-export
|
// Button re-export
|
||||||
if (!empty($conf->global->ACCOUNTING_REEXPORT)) {
|
if (!empty($conf->global->ACCOUNTING_REEXPORT)) {
|
||||||
|
|||||||
@ -473,7 +473,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected'));
|
||||||
|
|||||||
@ -473,7 +473,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtonsList', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
$newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param);
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss' => 'marginleftonly'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss' => 'marginleftonly'));
|
||||||
|
|||||||
@ -41,6 +41,8 @@ $langs->loadLangs(array('admin', 'other', 'agenda', 'users'));
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$param = GETPOST('param', 'alpha');
|
$param = GETPOST('param', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
|
|||||||
@ -36,6 +36,8 @@ $langs->loadLangs(array("admin", "other", "agenda"));
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$param = GETPOST('param', 'alpha');
|
$param = GETPOST('param', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$scandir = GETPOST('scandir', 'alpha');
|
$scandir = GETPOST('scandir', 'alpha');
|
||||||
|
|||||||
@ -36,6 +36,7 @@ if (!$user->admin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -36,6 +36,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'bom';
|
$type = 'bom';
|
||||||
|
|||||||
@ -46,6 +46,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'order';
|
$type = 'order';
|
||||||
|
|||||||
@ -37,6 +37,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'contract';
|
$type = 'contract';
|
||||||
|
|||||||
@ -43,6 +43,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'delivery';
|
$type = 'delivery';
|
||||||
|
|||||||
@ -41,6 +41,8 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'myobject';
|
$type = 'myobject';
|
||||||
|
|
||||||
|
|||||||
@ -43,6 +43,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'shipping';
|
$type = 'shipping';
|
||||||
|
|||||||
@ -43,6 +43,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'expensereport';
|
$type = 'expensereport';
|
||||||
|
|||||||
@ -42,6 +42,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'invoice';
|
$type = 'invoice';
|
||||||
|
|||||||
@ -51,6 +51,8 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'invoice';
|
$type = 'invoice';
|
||||||
|
|
||||||
|
|||||||
@ -43,6 +43,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'ficheinter';
|
$type = 'ficheinter';
|
||||||
|
|||||||
@ -39,6 +39,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'contract';
|
$type = 'contract';
|
||||||
|
|||||||
@ -50,6 +50,8 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'myobject';
|
$type = 'myobject';
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@ -37,8 +37,9 @@ $langs->loadLangs(array("admin", "knowledgemanagement"));
|
|||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'knowledgemanagement';
|
$type = 'knowledgemanagement';
|
||||||
|
|||||||
@ -37,6 +37,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'mrp';
|
$type = 'mrp';
|
||||||
|
|||||||
@ -43,6 +43,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'propal';
|
$type = 'propal';
|
||||||
|
|||||||
@ -36,6 +36,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'reception';
|
$type = 'reception';
|
||||||
|
|||||||
@ -43,6 +43,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$type = GETPOST('type', 'alpha');
|
$type = GETPOST('type', 'alpha');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
|
|||||||
@ -37,6 +37,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scandir', 'alpha');
|
$scandir = GETPOST('scandir', 'alpha');
|
||||||
$type = 'supplier_payment';
|
$type = 'supplier_payment';
|
||||||
|
|||||||
@ -38,6 +38,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
$type = 'supplier_proposal';
|
$type = 'supplier_proposal';
|
||||||
|
|||||||
@ -38,6 +38,8 @@ if (!$user->admin) {
|
|||||||
// Parameters
|
// Parameters
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scandir', 'alpha');
|
$scandir = GETPOST('scandir', 'alpha');
|
||||||
$type = 'ticket';
|
$type = 'ticket';
|
||||||
|
|||||||
@ -43,9 +43,11 @@ $extrafields = new ExtraFields($db);
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
|
|
||||||
$scandir = GETPOST('scandir', 'alpha');
|
$scandir = GETPOST('scandir', 'alpha');
|
||||||
$type = 'user';
|
$type = 'user';
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,8 @@ $extrafields = new ExtraFields($db);
|
|||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$type = 'group';
|
$type = 'group';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -36,6 +36,7 @@ $langs->loadLangs(array("admin", "workstation"));
|
|||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -2269,7 +2269,10 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public function setPaymentMethods($id)
|
public function setPaymentMethods($id)
|
||||||
{
|
{
|
||||||
|
$error = 0; $notrigger = 0;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::setPaymentMethods('.$id.')');
|
dol_syslog(get_class($this).'::setPaymentMethods('.$id.')');
|
||||||
|
|
||||||
if ($this->statut >= 0 || $this->element == 'societe') {
|
if ($this->statut >= 0 || $this->element == 'societe') {
|
||||||
// TODO uniformize field name
|
// TODO uniformize field name
|
||||||
$fieldname = 'fk_mode_reglement';
|
$fieldname = 'fk_mode_reglement';
|
||||||
@ -2296,6 +2299,15 @@ abstract class CommonObject
|
|||||||
if (get_class($this) == 'Fournisseur') {
|
if (get_class($this) == 'Fournisseur') {
|
||||||
$this->mode_reglement_supplier_id = $id;
|
$this->mode_reglement_supplier_id = $id;
|
||||||
}
|
}
|
||||||
|
// Triggers
|
||||||
|
if (!$error && !$notrigger) {
|
||||||
|
// Call triggers
|
||||||
|
$result = $this->call_trigger(strtoupper(get_class($this)).'_MODIFY', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
// End call triggers
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
dol_syslog(get_class($this).'::setPaymentMethods Error '.$this->db->error());
|
dol_syslog(get_class($this).'::setPaymentMethods Error '.$this->db->error());
|
||||||
|
|||||||
@ -783,7 +783,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
|||||||
// keep lines feed
|
// keep lines feed
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name <email>"
|
case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name <email>". Less secured than 'alphanohtml'
|
||||||
if (!is_array($out)) {
|
if (!is_array($out)) {
|
||||||
$out = trim($out);
|
$out = trim($out);
|
||||||
do {
|
do {
|
||||||
@ -1666,7 +1666,11 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
|||||||
$limittitle = 30;
|
$limittitle = 30;
|
||||||
$out .= '<a class="tabTitle">';
|
$out .= '<a class="tabTitle">';
|
||||||
if ($picto) {
|
if ($picto) {
|
||||||
$out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
|
$noprefix = $pictoisfullpath;
|
||||||
|
if (strpos($picto, 'fontawesome_') !== false) {
|
||||||
|
$noprefix = 1;
|
||||||
|
}
|
||||||
|
$out .= img_picto($title, ($noprefix ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
|
||||||
}
|
}
|
||||||
$out .= '<span class="tabTitleText">'.dol_escape_htmltag(dol_trunc($title, $limittitle)).'</span>';
|
$out .= '<span class="tabTitleText">'.dol_escape_htmltag(dol_trunc($title, $limittitle)).'</span>';
|
||||||
$out .= '</a>';
|
$out .= '</a>';
|
||||||
@ -2021,10 +2025,14 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
$width = 14;
|
$width = 14;
|
||||||
$cssclass = 'photorefcenter';
|
$cssclass = 'photorefcenter';
|
||||||
$picto = $object->picto;
|
$picto = $object->picto;
|
||||||
|
$prefix = 'object_';
|
||||||
if ($object->element == 'project' && !$object->public) {
|
if ($object->element == 'project' && !$object->public) {
|
||||||
$picto = 'project'; // instead of projectpub
|
$picto = 'project'; // instead of projectpub
|
||||||
}
|
}
|
||||||
$nophoto = img_picto('No photo', 'object_'.$picto);
|
if (strpos($picto, 'fontawesome_') !== false) {
|
||||||
|
$prefix = '';
|
||||||
|
}
|
||||||
|
$nophoto = img_picto('No photo', $prefix.$picto);
|
||||||
}
|
}
|
||||||
$morehtmlleft .= '<!-- No photo to show -->';
|
$morehtmlleft .= '<!-- No photo to show -->';
|
||||||
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
|
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
|
||||||
@ -3609,6 +3617,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
|
|||||||
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
|
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
|
||||||
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
|
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
|
||||||
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
||||||
|
* Example: fontawesome_envelope-open-text_fas_red_1em if you want to use fontaweseome icons: fontawesome_<icon-name>_<style>_<color>_<size> (only icon-name is mandatory)
|
||||||
* @param string $moreatt Add more attribute on img tag (For example 'class="pictofixedwidth"')
|
* @param string $moreatt Add more attribute on img tag (For example 'class="pictofixedwidth"')
|
||||||
* @param boolean|int $pictoisfullpath If true or 1, image path is a full path
|
* @param boolean|int $pictoisfullpath If true or 1, image path is a full path
|
||||||
* @param int $srconly Return only content of the src attribute of img.
|
* @param int $srconly Return only content of the src attribute of img.
|
||||||
@ -3640,6 +3649,40 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
||||||
|
|
||||||
|
if (strpos($pictowithouttext, 'fontawesome_') !== false) {
|
||||||
|
$pictowithouttext = explode('_', $pictowithouttext);
|
||||||
|
$marginleftonlyshort = 0;
|
||||||
|
|
||||||
|
$fakey = 'fa-'.$pictowithouttext[1];
|
||||||
|
$fa = $pictowithouttext[2] ? $pictowithouttext[2] : 'fa';
|
||||||
|
$facolor = $pictowithouttext[3] ? $pictowithouttext[3] : '';
|
||||||
|
$fasize = $pictowithouttext[4] ? $pictowithouttext[4] : '';
|
||||||
|
|
||||||
|
// This snippet only needed since function img_edit accepts only one additional parameter: no separate one for css only.
|
||||||
|
// class/style need to be extracted to avoid duplicate class/style validation errors when $moreatt is added to the end of the attributes.
|
||||||
|
$morestyle = '';
|
||||||
|
$reg = array();
|
||||||
|
if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) {
|
||||||
|
$morecss .= ($morecss ? ' ' : '').$reg[1];
|
||||||
|
$moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt);
|
||||||
|
}
|
||||||
|
if (preg_match('/style="([^"]+)"/', $moreatt, $reg)) {
|
||||||
|
$morestyle = $reg[1];
|
||||||
|
$moreatt = str_replace('style="'.$reg[1].'"', '', $moreatt);
|
||||||
|
}
|
||||||
|
$moreatt = trim($moreatt);
|
||||||
|
|
||||||
|
$enabledisablehtml = '<span class="'.$fa.' '.$fakey.($marginleftonlyshort ? ($marginleftonlyshort == 1 ? ' marginleftonlyshort' : ' marginleftonly') : '');
|
||||||
|
$enabledisablehtml .= ($morecss ? ' '.$morecss : '').'" style="'.($fasize ? ('font-size: '.$fasize.';') : '').($facolor ? (' color: '.$facolor.';') : '').($morestyle ? ' '.$morestyle : '').'"'.(($notitle || empty($titlealt)) ? '' : ' title="'.dol_escape_htmltag($titlealt).'"').($moreatt ? ' '.$moreatt : '').'>';
|
||||||
|
/*if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||||
|
$enabledisablehtml .= $titlealt;
|
||||||
|
}*/
|
||||||
|
$enabledisablehtml .= '</span>';
|
||||||
|
|
||||||
|
return $enabledisablehtml;
|
||||||
|
}
|
||||||
|
|
||||||
$pictowithouttext = str_replace('object_', '', $pictowithouttext);
|
$pictowithouttext = str_replace('object_', '', $pictowithouttext);
|
||||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||||
|
|||||||
@ -178,7 +178,10 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
|
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
|
||||||
// Show list of found files
|
// Show list of found files
|
||||||
foreach ($listoffiles as $file) {
|
foreach ($listoffiles as $file) {
|
||||||
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=proposals/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
|
$texte .= '- '.$file['name'];
|
||||||
|
$texte .= ' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=proposals/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
|
||||||
|
$texte .= ' <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=PROPALE_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
|
||||||
|
$texte .= '<br>';
|
||||||
}
|
}
|
||||||
$texte .= '</div>';
|
$texte .= '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -97,23 +97,20 @@ class Segment implements IteratorAggregate, Countable
|
|||||||
|
|
||||||
// Search all tags fou into condition to complete $tmpvars, so we will proceed all tests even if not defined
|
// Search all tags fou into condition to complete $tmpvars, so we will proceed all tests even if not defined
|
||||||
$reg='@\[!--\sIF\s([{}a-zA-Z0-9\.\,_]+)\s--\]@smU';
|
$reg='@\[!--\sIF\s([{}a-zA-Z0-9\.\,_]+)\s--\]@smU';
|
||||||
|
$matches = array();
|
||||||
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
||||||
//var_dump($tmpvars);exit;
|
//var_dump($tmpvars);exit;
|
||||||
foreach($matches as $match) // For each match, if there is no entry into this->vars, we add it
|
foreach ($matches as $match) { // For each match, if there is no entry into this->vars, we add it
|
||||||
{
|
if (! empty($match[1]) && ! isset($tmpvars[$match[1]])) {
|
||||||
if (! empty($match[1]) && ! isset($tmpvars[$match[1]]))
|
|
||||||
{
|
|
||||||
$tmpvars[$match[1]] = ''; // Not defined, so we set it to '', we just need entry into this->vars for next loop
|
$tmpvars[$match[1]] = ''; // Not defined, so we set it to '', we just need entry into this->vars for next loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conditionals substitution
|
// Conditionals substitution
|
||||||
// Note: must be done before static substitution, else the variable will be replaced by its value and the conditional won't work anymore
|
// Note: must be done before static substitution, else the variable will be replaced by its value and the conditional won't work anymore
|
||||||
foreach($tmpvars as $key => $value)
|
foreach ($tmpvars as $key => $value) {
|
||||||
{
|
|
||||||
// If value is true (not 0 nor false nor null nor empty string)
|
// If value is true (not 0 nor false nor null nor empty string)
|
||||||
if ($value)
|
if ($value) {
|
||||||
{
|
|
||||||
// Remove the IF tag
|
// Remove the IF tag
|
||||||
$this->xml = str_replace('[!-- IF '.$key.' --]', '', $this->xml);
|
$this->xml = str_replace('[!-- IF '.$key.' --]', '', $this->xml);
|
||||||
// Remove everything between the ELSE tag (if it exists) and the ENDIF tag
|
// Remove everything between the ELSE tag (if it exists) and the ENDIF tag
|
||||||
@ -121,8 +118,7 @@ class Segment implements IteratorAggregate, Countable
|
|||||||
$this->xml = preg_replace($reg, '', $this->xml);
|
$this->xml = preg_replace($reg, '', $this->xml);
|
||||||
}
|
}
|
||||||
// Else the value is false, then two cases: no ELSE and we're done, or there is at least one place where there is an ELSE clause, then we replace it
|
// Else the value is false, then two cases: no ELSE and we're done, or there is at least one place where there is an ELSE clause, then we replace it
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// Find all conditional blocks for this variable: from IF to ELSE and to ENDIF
|
// Find all conditional blocks for this variable: from IF to ELSE and to ENDIF
|
||||||
$reg = '@\[!--\sIF\s' . $key . '\s--\](.*)(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
$reg = '@\[!--\sIF\s' . $key . '\s--\](.*)(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
||||||
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
||||||
@ -227,16 +223,17 @@ class Segment implements IteratorAggregate, Countable
|
|||||||
*/
|
*/
|
||||||
public function setVars($key, $value, $encode = true, $charset = 'ISO-8859')
|
public function setVars($key, $value, $encode = true, $charset = 'ISO-8859')
|
||||||
{
|
{
|
||||||
if (strpos($this->xml, $this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT')) === false) {
|
$tag = $this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT');
|
||||||
|
|
||||||
|
if (strpos($this->xml, $tag) === false) {
|
||||||
//throw new SegmentException("var $key not found in {$this->getName()}");
|
//throw new SegmentException("var $key not found in {$this->getName()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag = $this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT');
|
|
||||||
|
|
||||||
$this->vars[$tag] = $this->odf->convertVarToOdf($value, $encode, $charset);
|
$this->vars[$tag] = $this->odf->convertVarToOdf($value, $encode, $charset);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign a template variable as a picture
|
* Assign a template variable as a picture
|
||||||
*
|
*
|
||||||
@ -308,4 +305,3 @@ IMG;
|
|||||||
return $this->xmlParsed;
|
return $this->xmlParsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,8 @@ class Odf
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assing a template variable
|
* Assing a template variable into ->vars.
|
||||||
|
* For example, key is {object_date} and value is '2021-01-01'
|
||||||
*
|
*
|
||||||
* @param string $key Name of the variable within the template
|
* @param string $key Name of the variable within the template
|
||||||
* @param string $value Replacement value
|
* @param string $value Replacement value
|
||||||
@ -134,6 +135,7 @@ class Odf
|
|||||||
public function setVars($key, $value, $encode = true, $charset = 'ISO-8859')
|
public function setVars($key, $value, $encode = true, $charset = 'ISO-8859')
|
||||||
{
|
{
|
||||||
$tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT'];
|
$tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT'];
|
||||||
|
|
||||||
// TODO Warning string may be:
|
// TODO Warning string may be:
|
||||||
// <text:span text:style-name="T13">{</text:span><text:span text:style-name="T12">aaa</text:span><text:span text:style-name="T13">}</text:span>
|
// <text:span text:style-name="T13">{</text:span><text:span text:style-name="T12">aaa</text:span><text:span text:style-name="T13">}</text:span>
|
||||||
// instead of {aaa} so we should enhance this function.
|
// instead of {aaa} so we should enhance this function.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user