27require_once
"../../main.inc.php";
28require_once DOL_DOCUMENT_ROOT .
"/core/lib/admin.lib.php";
29require_once DOL_DOCUMENT_ROOT .
"/webportal/lib/webportal.lib.php";
32$langs->loadLangs(array(
"admin",
"webportal",
"website"));
35$hookmanager->initHooks(array(
'webportalthemesetup',
'globalsetup'));
38$action =
GETPOST(
'action',
'aZ09');
39$backtopage =
GETPOST(
'backtopage',
'alpha');
40$modulepart =
GETPOST(
'modulepart',
'aZ09');
42$value =
GETPOST(
'value',
'alpha');
43$label =
GETPOST(
'label',
'alpha');
44$scandir =
GETPOST(
'scan_dir',
'alpha');
57if (!class_exists(
'FormSetup')) {
58 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formsetup.class.php';
63require_once __DIR__ .
'/../class/webPortalTheme.class.php';
67$item = $formSetup->newItem(
'WEBPORTAL_PRIMARY_COLOR');
69$item->defaultFieldValue = $webPortalTheme->primaryColorHex;
73$item = $formSetup->newItem(
'WEBPORTAL_LOGIN_LOGO_URL');
74$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
76$item = $formSetup->newItem(
'WEBPORTAL_MENU_LOGO_URL');
77$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
82$item = $formSetup->newItem(
'WEBPORTAL_LOGIN_BACKGROUND');
83$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
85$item = $formSetup->newItem(
'WEBPORTAL_BANNER_BACKGROUND');
86$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
89$item = $formSetup->newItem(
'WEBPORTAL_BANNER_BACKGROUND_IS_DARK')->setAsYesNo();
91$setupnotempty += count($formSetup->items);
99include DOL_DOCUMENT_ROOT .
'/core/actions_setmoduleoptions.inc.php';
102if (empty($action) || $action ==
'update') {
111$form =
new Form($db);
114$title =
"WebPortalSetup";
116llxHeader(
'', $langs->trans($title), $help_url);
119$linkback =
'<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT .
'/admin/modules.php?restore_lastsearch_values=1') .
'">' . $langs->trans(
"BackToModuleList") .
'</a>';
125print
dol_get_fiche_head($head,
'themesettings', $langs->trans($title), -1,
"webportal");
130if ($action ==
'edit') {
131 print $formSetup->generateOutput(
true);
133} elseif (!empty($formSetup->items)) {
134 print $formSetup->generateOutput();
135 print
'<div class="tabsAction">';
136 print
'<a class="butAction" href="' . $_SERVER[
"PHP_SELF"] .
'?action=edit&token=' .
newToken() .
'">' . $langs->trans(
"Modify") .
'</a>';
139 print
'<br>' . $langs->trans(
"NothingToSetup");
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
webportalAdminPrepareHead()
Prepare admin pages header.