Skip to content

Commit e2a29a6

Browse files
author
cfoe
committed
deactivated settings page for default theme because of the lack of settings for the end-user
1 parent 0257dd7 commit e2a29a6

File tree

5 files changed

+24
-95
lines changed

5 files changed

+24
-95
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22

3-
$items[] = array( 'title' => 'Default Theme',
4-
'target' => 'content',
5-
'link' => 'tools/tpl_default.php',
6-
'html_id' => 'tpl_default');
3+
// No settings yet
4+
//$items[] = array( 'title' => 'Default Theme',
5+
// 'target' => 'content',
6+
// 'link' => 'tools/tpl_default.php',
7+
// 'html_id' => 'tpl_default');
78
?>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
$wb['tpl_default_head_txt'] = 'Default Theme Einstellungen';
33
$wb['tpl_default_desc_txt'] = 'Passe default-theme-spezifische Optionen an';
4-
$wb['language_txt'] = 'Sprache';
5-
$wb['startmodule_txt'] = 'Startmodul';
6-
$wb['app_theme_txt'] = 'Design';
4+
$wb["no_settings_txt"] = 'Es gibt keine Einstellmöglichkeiten für das default Theme.';
5+
$wb['btn_start_txt'] = 'Speichern';
6+
$wb['btn_cancel_txt'] = 'Zurück';
77
?>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
2-
$wb["tpl_default_head_txt"] = 'Default Theme settings';
3-
$wb["tpl_default_desc_txt"] = 'Modify default-theme specific options';
4-
$wb["language_txt"] = 'Language';
5-
$wb["startmodule_txt"] = 'Startmodule';
6-
$wb["app_theme_txt"] = 'Design';
2+
$wb["list_head_txt"] = 'Default Theme settings';
3+
$wb["list_desc_txt"] = 'Modify default-theme specific options';
4+
$wb["no_settings_txt"] = 'There are no settings for the default theme.';
5+
$wb['btn_start_txt'] = 'Save';
6+
$wb['btn_cancel_txt'] = 'Back';
77
?>

interface/web/tools/templates/tpl_default.htm

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,14 @@ <h2><tmpl_var name="list_head_txt"></h2>
66
<div class="pnl_formsarea">
77
<fieldset class="inlineLabels">
88
<div class="ctrlHolder">
9-
<label for="startmodule">{tmpl_var name='startmodule_txt'}</label>
10-
<select name="startmodule" id="startmodule" class="selectInput formLengthHalf">
11-
{tmpl_var name='startmodule'}
12-
</select>
13-
</div>
14-
<div class="ctrlHolder">
15-
<label for="language">{tmpl_var name='language_txt'}</label>
16-
<select name="language" id="language" class="selectInput flags">
17-
{tmpl_var name='language'}
18-
</select>
19-
</div>
20-
<!-- TODO: If user theme change is activated -->
21-
<div class="ctrlHolder">
22-
<label for="app_theme">{tmpl_var name='app_theme_txt'}</label>
23-
<select name="app_theme" id="app_theme" class="selectInput formLengthHalf">
24-
{tmpl_var name='app_theme'}
25-
</select>
9+
<p><tmpl_var name="no_settings_txt"></p>
2610
</div>
2711
</fieldset>
2812

2913
<input type="hidden" name="id" value="{tmpl_var name='id'}">
3014

3115
<div class="buttonHolder buttons">
32-
<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>
16+
<!-- <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>-->
3317
<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>
3418
</div>
3519
</div>

interface/web/tools/tpl_default.php

Lines changed: 9 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -28,81 +28,25 @@
2828
*/
2929

3030

31-
/******************************************
32-
* Begin Form configuration
33-
******************************************/
34-
35-
$tform_def_file = "form/tpl_default.tform.php";
36-
37-
/******************************************
38-
* End Form configuration
39-
******************************************/
31+
global $app, $conf;
4032

4133
require_once('../../lib/config.inc.php');
4234
require_once('../../lib/app.inc.php');
4335

4436
//* Check permissions for module
4537
$app->auth->check_module_permissions('tools');
4638

47-
// Loading classes
48-
$app->uses('tpl,tform,tform_actions');
49-
$app->load('tform_actions');
50-
51-
class page_action extends tform_actions {
52-
53-
function onLoad() {
54-
global $app, $conf, $tform_def_file;
55-
56-
// Loading template classes and initialize template
57-
if(!is_object($app->tpl)) $app->uses('tpl');
58-
if(!is_object($app->tform)) $app->uses('tform');
39+
$app->uses('tpl');
5940

60-
$app->tpl->newTemplate("tabbed_form.tpl.htm");
41+
$app->tpl->newTemplate('listpage.tpl.htm');
42+
$app->tpl->setInclude('content_tpl', 'templates/tpl_default.htm');
6143

62-
// Load table definition from file
63-
$app->tform->loadFormDef($tform_def_file);
64-
65-
// Importing ID
66-
$this->id = $_SESSION['s']['user']['userid'];
67-
$_POST['id'] = $_SESSION['s']['user']['userid'];
44+
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_tpl_default.lng';
45+
include($lng_file);
6846

69-
if(count($_POST) > 1) {
70-
$this->dataRecord = $_POST;
71-
$this->onSubmit();
72-
} else {
73-
$this->onShow();
74-
}
75-
}
76-
77-
function onBeforeInsert() {
78-
global $app, $conf;
79-
80-
if(!in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) {
81-
$app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
82-
}
83-
}
84-
85-
function onInsert() {
86-
die('No inserts allowed.');
87-
}
88-
89-
function onBeforeUpdate() {
90-
global $app, $conf;
91-
92-
if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.';
93-
94-
$_SESSION['s']['user']['language'] = $_POST['language'];
95-
$_SESSION['s']['language'] = $_POST['language'];
96-
97-
if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'],$this->dataRecord['modules'])) {
98-
$app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
99-
}
100-
}
101-
102-
103-
}
47+
$app->tpl->setVar($wb);
10448

105-
$page = new page_action;
106-
$page->onLoad();
49+
$app->tpl_defaults();
50+
$app->tpl->pparse();
10751

10852
?>

0 commit comments

Comments
 (0)