26 require
'../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30 require_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(
57 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
63 $page_name =
'ZapierForDolibarrSetup';
68 $linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
70 print
load_fiche_titre($langs->trans($page_name), $linkback,
'object_zapier');
77 if ($action ==
'edit') {
78 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
79 print
'<input type="hidden" name="token" value="'.newToken().
'">';
80 print
'<input type="hidden" name="action" value="update">';
82 print
'<table class="noborder centpercent">';
83 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
85 foreach ($arrayofparameters as $key => $val) {
86 print
'<tr class="oddeven"><td>';
87 print
$form->textwithpicto($langs->trans($key), $langs->trans($key.
'Tooltip'));
88 print
'</td><td><input name="'.$key.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.
getDolGlobalString($key).
'"></td></tr>';
92 print
'<br><div class="center">';
93 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
99 if (!empty($arrayofparameters)) {
100 print
'<table class="noborder centpercent">';
101 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
103 foreach ($arrayofparameters as $key => $val) {
104 print
'<tr class="oddeven"><td>';
105 print
$form->textwithpicto($langs->trans($key), $langs->trans($key.
'Tooltip'));
106 print
'</td><td>'.getDolGlobalString($key).
'</td></tr>';
111 print
'<div class="tabsAction">';
112 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>';
116 echo
'<br><br><span class="opacitymediumdisabled">'.$langs->trans(
"ZapierSetupPage").
'</span><br><br>';
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $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='')
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.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) 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.