Commit e2a29a64 authored by cfoe's avatar cfoe
Browse files

deactivated settings page for default theme because of the lack of settings for the end-user

parent 0257dd73
<?php
$items[] = array( 'title' => 'Default Theme',
'target' => 'content',
'link' => 'tools/tpl_default.php',
'html_id' => 'tpl_default');
// No settings yet
//$items[] = array( 'title' => 'Default Theme',
// 'target' => 'content',
// 'link' => 'tools/tpl_default.php',
// 'html_id' => 'tpl_default');
?>
<?php
$wb['tpl_default_head_txt'] = 'Default Theme Einstellungen';
$wb['tpl_default_desc_txt'] = 'Passe default-theme-spezifische Optionen an';
$wb['language_txt'] = 'Sprache';
$wb['startmodule_txt'] = 'Startmodul';
$wb['app_theme_txt'] = 'Design';
$wb["no_settings_txt"] = 'Es gibt keine Einstellmöglichkeiten für das default Theme.';
$wb['btn_start_txt'] = 'Speichern';
$wb['btn_cancel_txt'] = 'Zurück';
?>
<?php
$wb["tpl_default_head_txt"] = 'Default Theme settings';
$wb["tpl_default_desc_txt"] = 'Modify default-theme specific options';
$wb["language_txt"] = 'Language';
$wb["startmodule_txt"] = 'Startmodule';
$wb["app_theme_txt"] = 'Design';
$wb["list_head_txt"] = 'Default Theme settings';
$wb["list_desc_txt"] = 'Modify default-theme specific options';
$wb["no_settings_txt"] = 'There are no settings for the default theme.';
$wb['btn_start_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Back';
?>
\ No newline at end of file
......@@ -6,30 +6,14 @@
<div class="pnl_formsarea">
<fieldset class="inlineLabels">
<div class="ctrlHolder">
<label for="startmodule">{tmpl_var name='startmodule_txt'}</label>
<select name="startmodule" id="startmodule" class="selectInput formLengthHalf">
{tmpl_var name='startmodule'}
</select>
</div>
<div class="ctrlHolder">
<label for="language">{tmpl_var name='language_txt'}</label>
<select name="language" id="language" class="selectInput flags">
{tmpl_var name='language'}
</select>
</div>
<!-- TODO: If user theme change is activated -->
<div class="ctrlHolder">
<label for="app_theme">{tmpl_var name='app_theme_txt'}</label>
<select name="app_theme" id="app_theme" class="selectInput formLengthHalf">
{tmpl_var name='app_theme'}
</select>
<p><tmpl_var name="no_settings_txt"></p>
</div>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','tools/tpl_default.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
<!-- <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','tools/tpl_default.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>-->
<button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('tools/index.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -28,15 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$tform_def_file = "form/tpl_default.tform.php";
/******************************************
* End Form configuration
******************************************/
global $app, $conf;
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
......@@ -44,65 +36,17 @@ require_once('../../lib/app.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('tools');
// Loading classes
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
class page_action extends tform_actions {
function onLoad() {
global $app, $conf, $tform_def_file;
// Loading template classes and initialize template
if(!is_object($app->tpl)) $app->uses('tpl');
if(!is_object($app->tform)) $app->uses('tform');
$app->uses('tpl');
$app->tpl->newTemplate("tabbed_form.tpl.htm");
$app->tpl->newTemplate('listpage.tpl.htm');
$app->tpl->setInclude('content_tpl', 'templates/tpl_default.htm');
// Load table definition from file
$app->tform->loadFormDef($tform_def_file);
// Importing ID
$this->id = $_SESSION['s']['user']['userid'];
$_POST['id'] = $_SESSION['s']['user']['userid'];
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_tpl_default.lng';
include($lng_file);
if(count($_POST) > 1) {
$this->dataRecord = $_POST;
$this->onSubmit();
} else {
$this->onShow();
}
}
function onBeforeInsert() {
global $app, $conf;
if(!in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) {
$app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
}
}
function onInsert() {
die('No inserts allowed.');
}
function onBeforeUpdate() {
global $app, $conf;
if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.';
$_SESSION['s']['user']['language'] = $_POST['language'];
$_SESSION['s']['language'] = $_POST['language'];
if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) {
$app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
}
}
}
$app->tpl->setVar($wb);
$page = new page_action;
$page->onLoad();
$app->tpl_defaults();
$app->tpl->pparse();
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment