26require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT .
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT .
'/zapier/lib/zapier.lib.php';
33$langs->loadLangs(array(
'admin',
'zapier'));
41$action =
GETPOST(
'action',
'aZ09');
42$backtopage =
GETPOST(
'backtopage',
'alpha');
44$arrayofparameters = array(
49if (!isModEnabled(
'zapier')) {
52if (empty($user->admin)) {
61include DOL_DOCUMENT_ROOT .
'/core/actions_setmoduleoptions.inc.php';
67$page_name =
'ZapierForDolibarrSetup';
68$help_url =
'EN:Module_Zapier';
69llxHeader(
'', $langs->trans($page_name), $help_url);
72$linkback =
'<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT .
'/admin/modules.php?restore_lastsearch_values=1') .
'">' . $langs->trans(
"BackToModuleList") .
'</a>';
74print
load_fiche_titre($langs->trans($page_name), $linkback,
'object_zapier');
80if (!empty($arrayofparameters)) {
81 if ($action ==
'edit') {
82 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
83 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
84 print
'<input type="hidden" name="action" value="update">';
86 print
'<table class="noborder centpercent">';
87 print
'<tr class="liste_titre"><td class="titlefield">' . $langs->trans(
"Parameter") .
'</td><td>' . $langs->trans(
"Value") .
'</td></tr>';
89 foreach ($arrayofparameters as $key => $val) {
90 print
'<tr class="oddeven"><td>';
91 print $form->textwithpicto($langs->trans($key), $langs->trans($key .
'Tooltip'));
92 print
'</td><td><input name="' . $key .
'" class="flat ' . (empty($val[
'css']) ?
'minwidth200' : $val[
'css']) .
'" value="' .
getDolGlobalString($key) .
'"></td></tr>';
96 print
'<br><div class="center">';
97 print
'<input class="button button-save" type="submit" value="' . $langs->trans(
"Save") .
'">';
103 print
'<table class="noborder centpercent">';
104 print
'<tr class="liste_titre"><td class="titlefield">' . $langs->trans(
"Parameter") .
'</td><td>' . $langs->trans(
"Value") .
'</td></tr>';
106 foreach ($arrayofparameters as $key => $val) {
107 print
'<tr class="oddeven"><td>';
108 print $form->textwithpicto($langs->trans($key), $langs->trans($key .
'Tooltip'));
114 print
'<div class="tabsAction">';
115 print
'<a class="butAction" href="' . $_SERVER[
"PHP_SELF"] .
'?action=edit&token=' .
newToken() .
'">' . $langs->trans(
"Modify") .
'</a>';
120 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()
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 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.