28require_once
"../../main.inc.php";
36require_once DOL_DOCUMENT_ROOT .
"/core/lib/admin.lib.php";
37require_once DOL_DOCUMENT_ROOT .
"/webportal/lib/webportal.lib.php";
40$langs->loadLangs(array(
"admin",
"hrm",
"other",
"website"));
43$hookmanager->initHooks(array(
'webportalsetup',
'globalsetup'));
46$action =
GETPOST(
'action',
'aZ09');
47$backtopage =
GETPOST(
'backtopage',
'alpha');
66$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
73if (preg_match(
'/^(set|del)_([A-Z_]+)$/', $action, $regs)) {
74 if ($regs[1] ==
'set') {
81if ($action ==
'updatecss') {
82 $csscontent =
GETPOST(
'WEBPORTAL_CUSTOM_CSS',
'restricthtml');
85 dolibarr_set_const($db,
"WEBPORTAL_CUSTOM_CSS", $csscontent,
'chaine', 0,
'', $conf->entity);
89 if (
GETPOST(
'dol_resetcache')) {
99$title =
"WebPortalSetup";
101$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
105 $langs->trans($title),
111 '/includes/ace/src/ace.js',
112 '/includes/ace/src/ext-statusbar.js',
113 '/includes/ace/src/ext-language_tools.js',
119$linkback =
'<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT .
'/admin/modules.php?restore_lastsearch_values=1') .
'">' . $langs->trans(
"BackToModuleList") .
'</a>';
128echo
'<span class="opacitymedium">' . $langs->trans(
"WebPortalCSS") .
'</span><br><br>';
131require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
133print
'<form enctype="multipart/form-data" method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
135print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
136print
'<input type="hidden" name="action" value="updatecss">';
141print
'<div class="div-table-responsive-no-min">';
142print
'<table summary="edit" class="noborder centpercent editmode tableforfield">';
144print
'<tr class="liste_titre">';
145print
'<td colspan="2">';
149$doleditor =
new DolEditor(
'WEBPORTAL_CUSTOM_CSS', $customcssValue,
'80%', 400,
'Basic',
'In',
true,
false,
'ace', 10,
'90%');
150$doleditor->Create(0,
'',
true,
'css',
'css');
151print
'</td></tr>' .
"\n";
153print
'</table>' .
"\n";
156print
'<div class="center">';
157print
'<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans(
"Save") .
'">';
if(! $sortfield) if(! $sortorder) $object
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
Class to manage a WYSIWYG editor.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
webportalAdminPrepareHead()
Prepare admin pages header.