Commit bba5a3b4 authored by cfoe's avatar cfoe

added first revision of theme settings in admin module

parent 3735535e
......@@ -252,30 +252,6 @@ $form["tabs"]['domains'] = array (
)
);
/* TODO_ BEGIN: Branding
$form["tabs"]['domains'] = array (
'title' => "Branding",
'width' => 70,
'template' => "templates/system_config_branding_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'logo' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'themes/default/images/header_logo.png',
'value' => ''
),
##################################
# ENDE Datatable fields
##################################
)
);
END: Branding */
$form["tabs"]['misc'] = array (
'title' => "Misc",
'width' => 70,
......
......@@ -59,15 +59,15 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$form["title"] = "tpl_default_admin_head_txt";
$form["description"] = "tpl_default_admin_desc_txt";
$form["name"] = "tpl_default_admin";
$form["action"] = "tpl_default_admin.php";
$form["db_table"] = "server_php";
$form["db_table_idx"] = "server_php_id";
$form["title"] = "tpl_default-v2_head_txt";
$form["description"] = "tpl_default-v2_desc_txt";
$form["name"] = "tpl_default-v2";
$form["action"] = "tpl_default-v2.php";
$form["db_table"] = "default-v2";
$form["db_table_idx"] = "var_id";
$form["db_history"] = "yes";
$form["tab_default"] = "php_name";
$form["list_default"] = "server_php_list.php";
$form["tab_default"] = "basic";
$form["list_default"] = "system_config_edit.php";
$form["auth"] = 'yes';
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
......@@ -76,42 +76,28 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['php_name'] = array (
'title' => "Name",
$form["tabs"]['basic'] = array (
'title' => "Basic Settings",
'width' => 80,
'template' => "templates/server_php_name_edit.htm",
'template' => "templates/tpl_default-v2_basic.htm",
'fields' => array (
##################################
# Beginn Datenbankfelder
##################################
'server_id' => array (
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
'keyfield'=> 'server_id',
'valuefield'=> 'server_name'
),
'value' => ''
),
'client_id' => array (
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
'keyfield'=> 'client_id',
'valuefield'=> 'name'
),
'value' => array(0 => ' ')
'username' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => '',
'default' => 'global',
'value' => 'global',
'separator' => '',
'width' => '40',
'maxlength' => '64'
),
'name' => array (
'logo_url' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'server_php_name_error_empty'),
),
'validators' => '',
'default' => '',
'value' => '',
'separator' => '',
......@@ -124,71 +110,4 @@ $form["tabs"]['php_name'] = array (
)
);
$form["tabs"]['php_fastcgi'] = array(
'title' => "FastCGI Settings",
'width' => 80,
'template' => "templates/server_php_fastcgi_edit.htm",
'fields' => array(
##################################
# Begin Datatable fields
##################################
'php_fastcgi_binary' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'php_fastcgi_ini_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['php_fpm'] = array(
'title' => "PHP-FPM Settings",
'width' => 80,
'template' => "templates/server_php_fpm_edit.htm",
'fields' => array(
##################################
# Begin Datatable fields
##################################
'php_fpm_init_script' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'php_fpm_ini_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'php_fpm_pool_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
......@@ -59,15 +59,15 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$form["title"] = "tpl_default-v2_admin_head_txt";
$form["description"] = "tpl_default-v2_admin_desc_txt";
$form["name"] = "tpl_default-v2_admin";
$form["action"] = "tpl_default-v2_admin.php";
$form["db_table"] = "server_php";
$form["db_table_idx"] = "server_php_id";
$form["title"] = "tpl_default_head_txt";
$form["description"] = "tpl_default_desc_txt";
$form["name"] = "tpl_default";
$form["action"] = "tpl_default.php";
$form["db_table"] = "default";
$form["db_table_idx"] = "var_id";
$form["db_history"] = "yes";
$form["tab_default"] = "php_name";
$form["list_default"] = "server_php_list.php";
$form["tab_default"] = "basic";
$form["list_default"] = "system_config_edit.php";
$form["auth"] = 'yes';
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
......@@ -76,42 +76,28 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update,
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['php_name'] = array (
'title' => "Name",
$form["tabs"]['basic'] = array (
'title' => "Basic Settings",
'width' => 80,
'template' => "templates/server_php_name_edit.htm",
'template' => "templates/tpl_default_basic.htm",
'fields' => array (
##################################
# Beginn Datenbankfelder
##################################
'server_id' => array (
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
'keyfield'=> 'server_id',
'valuefield'=> 'server_name'
),
'value' => ''
),
'client_id' => array (
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
'keyfield'=> 'client_id',
'valuefield'=> 'name'
),
'value' => array(0 => ' ')
'username' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => '',
'default' => 'global',
'value' => 'global',
'separator' => '',
'width' => '40',
'maxlength' => '64'
),
'name' => array (
'logo_url' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'server_php_name_error_empty'),
),
'validators' => '',
'default' => '',
'value' => '',
'separator' => '',
......@@ -124,71 +110,4 @@ $form["tabs"]['php_name'] = array (
)
);
$form["tabs"]['php_fastcgi'] = array(
'title' => "FastCGI Settings",
'width' => 80,
'template' => "templates/server_php_fastcgi_edit.htm",
'fields' => array(
##################################
# Begin Datatable fields
##################################
'php_fastcgi_binary' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'php_fastcgi_ini_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['php_fpm'] = array(
'title' => "PHP-FPM Settings",
'width' => 80,
'template' => "templates/server_php_fpm_edit.htm",
'fields' => array(
##################################
# Begin Datatable fields
##################################
'php_fpm_init_script' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'php_fpm_ini_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
'php_fpm_pool_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '40',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
......@@ -2,6 +2,6 @@
$items[] = array( 'title' => 'Default-v2 Theme',
'target' => 'content',
'link' => 'admin/tpl_default-v2_admin.php',
'html_id' => 'tpl_default-v2_admin');
'link' => 'admin/tpl_default-v2.php',
'html_id' => 'tpl_default-v2');
?>
......@@ -2,6 +2,6 @@
$items[] = array( 'title' => 'Default Theme',
'target' => 'content',
'link' => 'admin/tpl_default_admin.php',
'html_id' => 'tpl_default_admin');
'link' => 'admin/tpl_default.php',
'html_id' => 'tpl_default');
?>
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<div class="panel panel_system_config">
<div class="pnl_formsarea">
<fieldset class="inlineLabels"><legend>Misc</legend>
<div class="ctrlHolder">
<label for="dashboard_atom_url_admin">{tmpl_var name='dashboard_atom_url_admin_txt'}</label>
<input name="dashboard_atom_url_admin" id="dashboard_atom_url_admin" value="{tmpl_var name='dashboard_atom_url_admin'}" size="" maxlength="" type="text" class="textInput" />
</div>
<div class="ctrlHolder">
<label for="dashboard_atom_url_reseller">{tmpl_var name='dashboard_atom_url_reseller_txt'}</label>
<input name="dashboard_atom_url_reseller" id="dashboard_atom_url_reseller" value="{tmpl_var name='dashboard_atom_url_reseller'}" size="" maxlength="" type="text" class="textInput" />
</div>
<div class="ctrlHolder">
<label for="dashboard_atom_url_client">{tmpl_var name='dashboard_atom_url_client_txt'}</label>
<input name="dashboard_atom_url_client" id="dashboard_atom_url_client" value="{tmpl_var name='dashboard_atom_url_client'}" size="" maxlength="" type="text" class="textInput" />
</div>
<div class="ctrlHolder">
<label for="monitor_key">{tmpl_var name='monitor_key_txt'}</label>
<input name="monitor_key" id="monitor_key" value="{tmpl_var name='monitor_key'}" size="" maxlength="" type="text" class="textInput" />
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='maintenance_mode_txt'}</p>
<div class="multiField">
{tmpl_var name='maintenance_mode'}
</div>
</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','admin/system_config_edit.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('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
</div>
\ No newline at end of file
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<h2><tmpl_var name="tpl_default-v2_head_txt"></h2>
<p><tmpl_var name="tpl_default-v2_desc_txt"></p>
<div class="panel panel_tools_interface">
<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>
<label for="logo_url">{tmpl_var name='logo_url_txt'}Logo URL</label>
<input name="logo_url" id="logo_url" value="{tmpl_var name='logo_url'}" size="" maxlength="" type="text" class="textInput" /> 152x46px
</div>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<input type="hidden" name="username" value="global">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','tools/interface_settings.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>
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/tpl_default-v2.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('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<h2><tmpl_var name="tpl_default_head_txt"></h2>
<p><tmpl_var name="tpl_default_desc_txt"></p>
<div class="panel panel_tools_interface">
<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>
<label for="logo_url">{tmpl_var name='logo_url_txt'}Logo URL</label>
<input name="logo_url" id="logo_url" value="{tmpl_var name='logo_url'}" size="" maxlength="" type="text" class="textInput" /> 152x46px
</div>
</fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<input type="hidden" name="username" value="global">
<div class="buttonHolder buttons">
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','tools/interface_settings.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>
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/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('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
</div>
</div>
......
......@@ -32,7 +32,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Begin Form configuration
******************************************/
$tform_def_file = "form/tpl_default_admin.tform.php";
$tform_def_file = "form/tpl_default-v2.tform.php";
/******************************************
* End Form configuration
......@@ -50,21 +50,21 @@ $app->load('tform_actions');
class page_action extends tform_actions {
function onBeforeUpdate() {
global $app, $conf;
//* Check if the server has been changed
// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) {
$rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id);
if($rec['server_id'] != $this->dataRecord["server_id"]) {
//* Add a error message and switch back to old server
$app->tform->errorMessage .= $app->lng('The Server can not be changed.');
$this->dataRecord["server_id"] = $rec['server_id'];
}
unset($rec);
}
}
// function onBeforeUpdate() {
// global $app, $conf;
//
// //* Check if the server has been changed
// // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
// if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) {
// $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id);
// if($rec['server_id'] != $this->dataRecord["server_id"]) {
// //* Add a error message and switch back to old server
// $app->tform->errorMessage .= $app->lng('The Server can not be changed.');
// $this->dataRecord["server_id"] = $rec['server_id'];
// }
// unset($rec);
// }
// }
}
$page = new page_action;
......
......@@ -32,7 +32,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Begin Form configuration
******************************************/
$tform_def_file = "form/tpl_default-v2_admin.tform.php";
$tform_def_file = "form/tpl_default.tform.php";
/******************************************
* End Form configuration
......@@ -50,21 +50,21 @@ $app->load('tform_actions');
class page_action extends tform_actions {
function onBeforeUpdate() {
global $app, $conf;
//* Check if the server has been changed
// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) {
$rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id);
if($rec['server_id'] != $this->dataRecord["server_id"]) {
//* Add a error message and switch back to old server
$app->tform->errorMessage .= $app->lng('The Server can not be changed.');
$this->dataRecord["server_id"] = $rec['server_id'];
}
unset($rec);
}
}
// function onBeforeUpdate() {
// global $app, $conf;
//
// //* Check if the server has been changed
// // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
// if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) {
// $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id);
// if($rec['server_id'] != $this->dataRecord["server_id"]) {
// //* Add a error message and switch back to old server
// $app->tform->errorMessage .= $app->lng('The Server can not be changed.');
// $this->dataRecord["server_id"] = $rec['server_id'];
// }
// unset($rec);
// }
// }
}
$page = new page_action;
......
......@@ -28,4 +28,5 @@ resources @ https://github.com/foe-services/ispc-resources
- all used icons as layers and sprite as .psd: https://github.com/downloads/foe-services/ispc-larry/ispc-default_psd.zip
- added sprites for (nearly) all used icons where suitable
- added flags for country text in lists
- added some list column widths
\ No newline at end of file
- added some list column widths
- limited height (500px) for the globalsearch results
\ No newline at end of file
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<h2><tmpl_var name="tpl_default-v2_head_txt"></h2>
<p><tmpl_var name="tpl_default-v2_desc_txt"></p>
<div class="panel panel_tools_interface">
<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>
<label for="logo_url">{tmpl_var name='logo_url_txt'}Logo URL</label>
<input name="logo_url" id="logo_url" value="{tmpl_var name='logo_url'}" size="" maxlength="" type="text" class="textInput" /> 152x46px