26require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT .
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT .
'/zapier/lib/zapier.lib.php';
42$langs->loadLangs(array(
'admin',
'zapier'));
50$action =
GETPOST(
'action',
'aZ09');
51$backtopage =
GETPOST(
'backtopage',
'alpha');
53$arrayofparameters = array(
58if (!isModEnabled(
'zapier')) {
61if (empty($user->admin)) {
70include DOL_DOCUMENT_ROOT .
'/core/actions_setmoduleoptions.inc.php';
76$page_name =
'ZapierForDolibarrSetup';
77$help_url =
'EN:Module_Zapier';
78llxHeader(
'', $langs->trans($page_name), $help_url,
'', 0, 0,
'',
'',
'',
'mod-zapier page-admin_setup');
81$linkback =
'<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT .
'/admin/modules.php?restore_lastsearch_values=1') .
'">' . $langs->trans(
"BackToModuleList") .
'</a>';
83print
load_fiche_titre($langs->trans($page_name), $linkback,
'object_zapier');
89if (!empty($arrayofparameters)) {
90 if ($action ==
'edit') {
91 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
92 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
93 print
'<input type="hidden" name="action" value="update">';
95 print
'<table class="noborder centpercent">';
96 print
'<tr class="liste_titre"><td class="titlefield">' . $langs->trans(
"Parameter") .
'</td><td>' . $langs->trans(
"Value") .
'</td></tr>';
98 foreach ($arrayofparameters as $key => $val) {
99 print
'<tr class="oddeven"><td>';
100 print $form->textwithpicto($langs->trans($key), $langs->trans($key .
'Tooltip'));
101 print
'</td><td><input name="' . $key .
'" class="flat ' . (empty($val[
'css']) ?
'minwidth200' : $val[
'css']) .
'" value="' .
getDolGlobalString($key) .
'"></td></tr>';
105 print
'<br><div class="center">';
106 print
'<input class="button button-save" type="submit" value="' . $langs->trans(
"Save") .
'">';
112 print
'<table class="noborder centpercent">';
113 print
'<tr class="liste_titre"><td class="titlefield">' . $langs->trans(
"Parameter") .
'</td><td>' . $langs->trans(
"Value") .
'</td></tr>';
115 foreach ($arrayofparameters as $key => $val) {
116 print
'<tr class="oddeven"><td>';
117 print $form->textwithpicto($langs->trans($key), $langs->trans($key .
'Tooltip'));
123 print
'<div class="tabsAction">';
124 print
'<a class="butAction" href="' . $_SERVER[
"PHP_SELF"] .
'?action=edit&token=' .
newToken() .
'">' . $langs->trans(
"Modify") .
'</a>';
129 echo
'<br><br><span class="opacitymediumdisabled">' . $langs->trans(
"ZapierSetupPage") .
'</span><br><br>';
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
zapierAdminPrepareHead()
Prepare admin pages header.