summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1661a16)
raw | patch | inline | side by side (parent: 1661a16)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Apr 2007 06:12:38 +0000 (06:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Apr 2007 06:12:38 +0000 (06:12 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5961 594d385d-05f5-0310-b6e9-bd551577e9d8
setup/class_setup.inc | patch | blob | history | |
setup/class_setupStep5.inc | patch | blob | history | |
setup/class_setupStep6.inc | patch | blob | history | |
setup/class_setupStep6a.inc | [new file with mode: 0644] | patch | blob |
setup/setup_step6a.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/setup/class_setup.inc b/setup/class_setup.inc
index c2223069d374f6aec54cdd4d2476803da4f4f0a2..987fa0f21dabcd0947abe4aa18553e07e222ad3b 100644 (file)
--- a/setup/class_setup.inc
+++ b/setup/class_setup.inc
class setup
{
- var $i_steps = 8; // Number of setup steps
+ var $i_steps = 9; // Number of setup steps
var $i_current= 1; // Current step
var $i_last = 1; // Last setup step;
var $o_steps = array();
$this->o_steps[4] = new setup_step_4();
$this->o_steps[5] = new setup_step_5();
$this->o_steps[6] = new setup_step_6();
- $this->o_steps[7] = new setup_step_7();
- $this->o_steps[8] = new setup_step_8();
+ $this->o_steps[7] = new setup_step_6a();
+ $this->o_steps[8] = new setup_step_7();
+ $this->o_steps[9] = new setup_step_8();
foreach($this->o_steps as $key => $step){
$this->o_steps[$key]->parent = $this;
index 7cad07cc03b8ad73ed26ca5ecdd46c42156e2388..bff22d5a30815ffb431bb5f94cb3d05bef4d0124 100644 (file)
function setup_step_5()
{
- $this->s_title = _("GOsa settings 1/2");
- $this->s_title_long = _("GOsa generic settings, page 1/2");
+ $this->s_title = _("GOsa settings 1/3");
+ $this->s_title_long = _("GOsa generic settings, page 1/3");
$this->s_info = _("This dialog allows you to setup GOsa behaviour");
$tmp = @passwordMethod::get_available_methods_if_not_loaded();
index d5afff820a9e34988cbaf6276cd92c4c3ad58504..2f978e1464477d4ea08ab2a46eab94ecdfd3e807 100644 (file)
function setup_step_6()
{
- $this->s_title = _("GOsa settings 2/2");
- $this->s_title_long = _("GOsa generic settings, page 2/2");
+ $this->s_title = _("GOsa settings 2/3");
+ $this->s_title_long = _("GOsa generic settings, page 2/3");
$this->s_info = _("This dialog allows you to setup GOsa behaviour");
}
diff --git a/setup/class_setupStep6a.inc b/setup/class_setupStep6a.inc
--- /dev/null
@@ -0,0 +1,143 @@
+<?php
+
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2007 Fabian Hickert
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+
+class setup_step_6a extends setup_step
+{
+ var $optional = array(
+ "enableCopyPaste" => false,
+ "forceglobals" => false,
+ "forcessl" => false,
+ "warnssl" => false,
+ "ppd_path" => "/var/spool/ppd/",
+ "ppd_path_active" => FALSE,
+ "kde_applications_menu" => "",
+ "kde_applications_menu_active" => FALSE,
+ "compile" => "/var/spool/gosa",
+ "debuglevel" => 0,
+ "session_lifetime" => 7200,
+ "max_ldap_query_time" => "5.0",
+ "max_ldap_query_time_active" => FALSE,
+ "smbhash" => 'SMBHASH');
+
+
+ function setup_step_6a()
+ {
+ $this->s_title = _("GOsa settings 3/3");
+ $this->s_title_long = _("GOsa generic settings, page 3/3");
+ $this->s_info = _("This dialog allows you to setup GOsa behaviour");
+ }
+
+
+ function execute()
+ {
+ $smarty = get_smarty();
+ $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
+
+ $smarty->assign("optional", $this->optional);
+
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr,$this->$attr);
+ }
+
+ $smarty->assign("warnings" ,$this->check());
+ $smarty->assign("warnings_cnt" ,count($this->check()));
+
+ return($smarty -> fetch (get_template_path("../setup/setup_step6a.tpl")));
+ }
+
+
+ function save_object()
+ {
+ if(isset($_POST['step6a_posted'])){
+
+ /* Get attributes */
+ foreach($this->attributes as $attr){
+ if(isset($_POST[$attr])){
+ $this->$attr = validate($_POST[$attr]);
+ }
+ }
+
+ foreach(array("enableCopyPaste","forceglobals","forcessl","warnssl","compile","debuglevel","session_lifetime","smbhash") as $name){
+ if(isset($_POST[$name])){
+ $this->optional[$name] = $_POST[$name];
+ }
+ }
+
+ if(isset($_POST['ppd_path_active'])){
+ $this->optional['ppd_path_active'] = TRUE;
+ if(isset($_POST['ppd_path'])){
+ $this->optional['ppd_path'] = $_POST['ppd_path'];
+ }
+ }else{
+ $this->optional['ppd_path_active'] = FALSE;
+ }
+
+ if(isset($_POST['kde_applications_menu_active'])){
+ $this->optional['kde_applications_menu_active'] = TRUE;
+ if(isset($_POST['kde_applications_menu'])){
+ $this->optional['kde_applications_menu'] = $_POST['kde_applications_menu'];
+ }
+ }else{
+ $this->optional['kde_applications_menu_active'] = FALSE;
+ }
+
+ if(isset($_POST['max_ldap_query_time_active'])){
+ $this->optional['max_ldap_query_time_active'] = TRUE;
+ if(isset($_POST['max_ldap_query_time'])){
+ $this->optional['max_ldap_query_time'] = $_POST['max_ldap_query_time'];
+ }
+ }else{
+ $this->optional['max_ldap_query_time_active'] = FALSE;
+ }
+
+ }
+
+ $tmp = $this->check();
+ if(count($tmp) == 0){
+ $this->is_completed = TRUE;
+ }else{
+ $this->is_completed = FALSE;
+ }
+ }
+
+
+ function check()
+ {
+ $message = array();
+ return($message);
+ }
+
+
+ /* Attributes that are interesting for configuration generation */
+ function get_attributes()
+ {
+ $tmp = setup_step::get_attributes();
+ foreach(array("optional") as $attr){
+ $tmp[$attr]= $this->$attr;
+ }
+ return($tmp);
+ }
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/setup/setup_step6a.tpl b/setup/setup_step6a.tpl
--- /dev/null
+++ b/setup/setup_step6a.tpl
@@ -0,0 +1,209 @@
+
+{if $warnings_cnt}
+<b><font style='color:red' >Errors:</font></b>
+{foreach from=$warnings item=val key=key}
+ <br>
+ <font style='color:red' >{$val}</font>
+{/foreach}
+{/if}
+
+ <div style='float:left; width:600px;'>
+ <br>
+ <b>{t}Optional settings{/t}</b>
+ </div>
+
+
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Enable Copy & Paste{/t}
+ </div>
+ <div class='step4_value'>
+
+ <select name="enableCopyPaste" size="1" title="">
+ {html_options options=$bool selected=$optional.enableCopyPaste}
+ </select>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Force globals{/t}
+ </div>
+ <div class='step4_value'>
+
+ <select name="forceglobals" size="1" title="">
+ {html_options options=$bool selected=$optional.forceglobals}
+ </select>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Force SSL{/t}
+ </div>
+ <div class='step4_value'>
+
+ <select name="forcessl" size="1" title="">
+ {html_options options=$bool selected=$optional.forcessl}
+ </select>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Warn SSL{/t}
+ </div>
+ <div class='step4_value'>
+
+ <select name="warnssl" size="1" title="">
+ {html_options options=$bool selected=$optional.warnssl}
+ </select>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}PPd path{/t}
+ </div>
+ <div class='step4_value'>
+ {if $optional.ppd_path_active == FALSE}
+ <input type='checkbox' value='1' name='ppd_path_active'
+ onClick='changeState("ppd_path");'>
+ <input style='width:90%' id='ppd_path' name='ppd_path' type='text' value='{$optional.ppd_path}' disabled>
+ {else}
+ <input type='checkbox' value='1' name='ppd_path_active' checked>
+ <input style='width:90%' id='ppd_path' name='ppd_path' type='text' value='{$optional.ppd_path}' >
+ {/if}
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Kde applications menu{/t}
+ </div>
+ <div class='step4_value'>
+ {if $optional.kde_applications_menu_active == FALSE}
+ <input type='checkbox' value='1' name='kde_applications_menu_active'
+ onClick='changeState("kde_applications_menu");'>
+ <input style='width:90%' id='kde_applications_menu' name='kde_applications_menu'
+ type='text' value='{$optional.kde_applications_menu}' disabled>
+ {else}
+ <input type='checkbox' value='1' name='kde_applications_menu_active' checked>
+ <input style='width:90%' id='kde_applications_menu' name='kde_applications_menu'
+ type='text' value='{$optional.kde_applications_menu}' >
+ {/if}
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Smarty compile directory{/t}
+ </div>
+ <div class='step4_value'>
+ <input style='width:90%' id='compile' name='compile'
+ type='text' value='{$optional.compile}'>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}SMB hash{/t}
+ </div>
+ <div class='step4_value'>
+ <input style='width:90%' id='smbhash' name='smbhash'
+ type='text' value='{$optional.smbhash}'>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Session lifetime{/t}
+ </div>
+ <div class='step4_value'>
+ <input style='width:90%' id='session_lifetime' name='session_lifetime'
+ type='text' value='{$optional.session_lifetime}'>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Maximal ldap query time{/t}
+ </div>
+ <div class='step4_value'>
+ {if $optional.max_ldap_query_time_active == FALSE}
+ <input type='checkbox' value='1' name='max_ldap_query_time_active'
+ onClick='changeState("max_ldap_query_time");'>
+ <input style='width:90%' id='max_ldap_query_time' name='max_ldap_query_time'
+ type='text' value='{$optional.max_ldap_query_time}' disabled>
+ {else}
+ <input type='checkbox' value='1' name='max_ldap_query_time_active' checked>
+ <input style='width:90%' id='max_ldap_query_time' name='max_ldap_query_time'
+ type='text' value='{$optional.max_ldap_query_time}' >
+ {/if}
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+ <div class='step4_container'>
+ <div class='step4_name'>
+ {t}Debuglevel{/t}
+ </div>
+ <div class='step4_value'>
+ <select name='debuglevel'>
+ {if $optional.debuglevel == 0}
+ <option value='0' selected>0 {t}Disabled{/t}</option>
+ <option value='1'>1 {t}Enabled{/t}</option>
+ {else}
+ <option value='0'>0 {t}Disabled{/t}</option>
+ <option value='1' selected>1 {t}Enabled{/t}</option>
+ {/if}
+ </select>
+ </div>
+ <div class='step4_status'>
+ {t}Infos in FAQ{/t}
+ <img class='center' src='images/info_small.png' title='{t}Please read the FAQ for more informations{/t}'>
+ </div>
+ </div>
+
+
+<input type='hidden' value='1' name='step6a_posted'>