27require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/ajax.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/resource.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/resource/class/html.formresource.class.php';
44$langs->loadLangs(array(
"admin",
"resource"));
51$action =
GETPOST(
'action',
'aZ09');
58if ($action ==
'updateoptions') {
59 if (
GETPOST(
'activate_RESOURCE_USE_SEARCH_TO_SELECT') !=
'') {
72llxHeader(
'', $langs->trans(
'ResourceSetup'),
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-resource');
76$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
78print
load_fiche_titre($langs->trans(
'ResourceSetup'), $linkback,
'title_setup');
82print
dol_get_fiche_head($head,
'general', $langs->trans(
"ResourceSingular"), -1,
'action');
84print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
85print
'<input type="hidden" name="token" value="'.newToken().
'">';
86print
'<input type="hidden" name="action" value="updateoptions">';
88print
'<div class="div-table-responsive-no-min">';
89print
'<table class="noborder centpercent">';
90print
'<tr class="liste_titre">';
91print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
92print
'<td class="right"></td>'.
"\n";
97print
'<tr class="oddeven">';
98print
'<td width="80%">'.$langs->trans(
"UseSearchToSelectResource").
'</td>';
99if (empty(
$conf->use_javascript_ajax)) {
100 print
'<td class="nowrap right" colspan="2">';
101 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
104 print
'<td width="60" class="right">';
107 $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
108 $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
109 $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
111 print $form->selectarray(
"activate_RESOURCE_USE_SEARCH_TO_SELECT", $arrval,
getDolGlobalInt(
'RESOURCE_USE_SEARCH_TO_SELECT'));
113 print
'<td class="right">';
114 print
'<input type="submit" class="button small" name="RESOURCE_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
120print
'<tr class="oddeven">';
121print
'<td>'.$langs->trans(
'EnableResourceUsedInEventCheck').
'</td>';
122print
'<td class="right">';
123echo ajax_constantonoff(
'RESOURCE_USED_IN_EVENT_CHECK');
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
resource_admin_prepare_head()
Prepare head for admin tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.