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";
40$langs->loadLangs(array(
"admin",
"webportal",
"website"));
43$hookmanager->initHooks(array(
'webportalthemesetup',
'globalsetup'));
46$action =
GETPOST(
'action',
'aZ09');
47$backtopage =
GETPOST(
'backtopage',
'alpha');
48$modulepart =
GETPOST(
'modulepart',
'aZ09');
50$value =
GETPOST(
'value',
'alpha');
51$label =
GETPOST(
'label',
'alpha');
52$scandir =
GETPOST(
'scan_dir',
'alpha');
65if (!class_exists(
'FormSetup')) {
66 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formsetup.class.php';
71require_once __DIR__ .
'/../class/webPortalTheme.class.php';
75$item = $formSetup->newItem(
'WEBPORTAL_PRIMARY_COLOR');
77$item->defaultFieldValue = $webPortalTheme->primaryColorHex;
81$item = $formSetup->newItem(
'WEBPORTAL_LOGIN_LOGO_URL');
82$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
84$item = $formSetup->newItem(
'WEBPORTAL_MENU_LOGO_URL');
85$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
90$item = $formSetup->newItem(
'WEBPORTAL_LOGIN_BACKGROUND');
91$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
93$item = $formSetup->newItem(
'WEBPORTAL_BANNER_BACKGROUND');
94$item->fieldAttr = array(
'type'=>
'url',
'size'=> 50,
'placeholder'=>
'https://');
97$item = $formSetup->newItem(
'WEBPORTAL_BANNER_BACKGROUND_IS_DARK')->setAsYesNo();
99$setupnotempty += count($formSetup->items);
107include DOL_DOCUMENT_ROOT .
'/core/actions_setmoduleoptions.inc.php';
110if (empty($action) || $action ==
'update') {
119$form =
new Form($db);
122$title =
"WebPortalSetup";
124llxHeader(
'', $langs->trans($title), $help_url);
127$linkback =
'<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT .
'/admin/modules.php?restore_lastsearch_values=1') .
'">' . $langs->trans(
"BackToModuleList") .
'</a>';
133print
dol_get_fiche_head($head,
'themesettings', $langs->trans($title), -1,
"webportal");
138if ($action ==
'edit') {
139 print $formSetup->generateOutput(
true);
141} elseif (!empty($formSetup->items)) {
142 print $formSetup->generateOutput();
143 print
'<div class="tabsAction">';
144 print
'<a class="butAction" href="' . $_SERVER[
"PHP_SELF"] .
'?action=edit&token=' .
newToken() .
'">' . $langs->trans(
"Modify") .
'</a>';
147 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.