Ejemplo n.º 1
0
    $oDefinitionsLessEditor = new oktDefinitionsLessEditor($okt);
    $aCurrentDefinitionsLess = $oDefinitionsLessEditor->getValuesFromFile($sDefinitionsLessFilename);
}
/* Traitements
----------------------------------------------------------*/
# enregistrement notes
if (!empty($_POST['save_notes'])) {
    if ($bHasDevNotes) {
        file_put_contents($sDevNotesFilename, $_POST['notes_content']);
    }
    http::redirect('configuration.php?action=theme&theme_id=' . $sThemeId);
}
# enregistrement definitions less
if (!empty($_POST['save_def_less'])) {
    if ($bHasDefinitionsLess) {
        $oDefinitionsLessEditor->writeFileFromPost($sDefinitionsLessFilename);
    }
    http::redirect('configuration.php?action=theme&theme_id=' . $sThemeId);
}
/* Affichage
----------------------------------------------------------*/
# Onglets
$okt->page->tabs();
# Color picker et autres joyeusetés
if ($bHasDefinitionsLess) {
    $oDefinitionsLessEditor->setFormAssets($okt->page, $sThemeId);
}
# infos page
$okt->page->addGlobalTitle(__('c_a_themes_management'), 'configuration.php?action=themes');
$okt->page->addGlobalTitle($aThemeInfos['name']);
# CSS
Ejemplo n.º 2
0
if (!defined('OKT_INSTAL_PROCESS')) {
    die;
}
/* Initialisations
------------------------------------------------------------*/
# Inclusion du prepend
require_once __DIR__ . '/../../../oktInc/prepend.php';
# Locales
l10n::set(OKT_INSTAL_DIR . '/inc/locales/' . $_SESSION['okt_install_language'] . '/install');
l10n::set(OKT_LOCALES_PATH . '/' . $_SESSION['okt_install_language'] . '/admin.modules');
$oDefinitionsLessEditor = new oktDefinitionsLessEditor($okt);
/* Traitements
------------------------------------------------------------*/
# formulaire envoyé
if (!empty($_POST['sended'])) {
    $oDefinitionsLessEditor->writeFileFromPost(OKT_THEMES_PATH . '/' . $_SESSION['okt_install_theme'] . '/css/definitions.less');
    http::redirect('index.php?step=' . $stepper->getNextStep());
}
/* Affichage
------------------------------------------------------------*/
# Color picker et autres joyeusetés
$oDefinitionsLessEditor->setFormAssets($oHtmlPage, $_SESSION['okt_install_theme']);
# En-tête
$title = __('i_colors_title');
require OKT_INSTAL_DIR . '/header.php';
?>


<form action="index.php" method="post">
	<?php 
echo $oDefinitionsLessEditor->getHtmlFields();