From 0151c6fca7b1c5fb0a5ec16daa40433bfca9d6b7 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 2 Apr 2007 13:28:28 +0000 Subject: [PATCH] Updated navigation. Posts weren't captured when using the navigation. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5953 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setup.inc | 88 +++++++++++++++++++++++----------- setup/class_setupStep7.inc | 5 +- setup/setup_frame.tpl | 1 + setup/setup_step7.tpl | 96 ++++++++++++++++++++++---------------- 4 files changed, 124 insertions(+), 66 deletions(-) diff --git a/setup/class_setup.inc b/setup/class_setup.inc index af70d9b8d..636d63955 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -84,7 +84,7 @@ class setup } /* Check if step was selected */ - if(isset($_GET['step']) || isset($_POST['next']) || isset($_POST['last'])){ + if(isset($_GET['step']) || isset($_POST['next']) || isset($_POST['last']) || isset($_POST['setup_goto_step'])){ /* check if current setup step is completed now and activate the next step if possible */ @@ -97,19 +97,29 @@ class setup $this->disable_steps_from($i+1); } } + } + if(isset($_GET['step'])){ + $step = $_GET['step']; + }elseif(isset($_POST['next'])){ + $step = $this->i_current + 1; + }elseif(isset($_POST['last'])){ + $step = $this->i_current - 1; + } + + if(isset($_POST['setup_goto_step'])){ + $step= $_POST['setup_goto_step']; + } - if(isset($_GET['step'])){ - $step = $_GET['step']; - }elseif(isset($_POST['next'])){ - $step = $this->i_current + 1; - }elseif(isset($_POST['last'])){ - $step = $this->i_current - 1; + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^step_[0-9]*$/",$name) && $once ){ + $step = preg_replace("/^step_/","",$name); } + } - if($this->selectable_step($step)){ - $this->i_last = $this->i_current; - $this->i_current = $step; - } + if($this->selectable_step($step)){ + $this->i_last = $this->i_current; + $this->i_current = $step; } } @@ -123,7 +133,6 @@ class setup } if($found){ - echo $key." "; $this->o_steps[$key]->set_enabled(false); $this->o_steps[$key]->set_completed(false); } @@ -142,24 +151,51 @@ class setup $b_active = $step -> is_active(); $b_enabled = $step -> is_enabled(); - $str .="
"; - if($b_enabled){ - if($b_active){ - $str .= ""; - $str .= ""; - $str .= ""; - $str .= "
\n"; + $_SESSION['js'] = 0; + if($_SESSION['js']){ + + $str .="
"; + if($b_enabled){ + if($b_active){ + $str .= ""; + }else{ + $str .= ""; + } }else{ - $str .= ""; - $str .= ""; - $str .= "
\n"; + $str .= ""; } + $str .= "
" ; }else{ - $str .= ""; + $str .="
"; + if($b_enabled){ + if($b_active){ + $str .= ""; + }else{ + $str .= ""; + } + }else{ + $str .= ""; + } + $str .= "
" ; } - $str .= "
" ; } return($str); } diff --git a/setup/class_setupStep7.inc b/setup/class_setupStep7.inc index 71bd17eff..f1360c0bd 100644 --- a/setup/class_setupStep7.inc +++ b/setup/class_setupStep7.inc @@ -25,8 +25,9 @@ class setup_step_7 extends setup_step var $checked = array(); var $not_checked = array(); var $schema_readable = FALSE; - var $attributes = array(); + var $attributes = array("enable_schema_check"); var $display_type = "failed"; + var $enable_schema_check = TRUE; function setup_step_7() { @@ -53,8 +54,10 @@ class setup_step_7 extends setup_step } $smarty = get_smarty(); + $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes"))); $smarty->assign("display_type",$this->display_type); $smarty->assign("schema_readable",$this->schema_readable); + $smarty->assign("enable_schema_check",$this->enable_schema_check); $smarty->assign("checks",$this->checked); $smarty->assign("not_checked",$this->not_checked); $smarty->assign("failed_checks",$failed_checks); diff --git a/setup/setup_frame.tpl b/setup/setup_frame.tpl index 5338dcad0..b5866db65 100644 --- a/setup/setup_frame.tpl +++ b/setup/setup_frame.tpl @@ -33,6 +33,7 @@ + diff --git a/setup/setup_step7.tpl b/setup/setup_step7.tpl index f7c829e4e..2105ab37f 100644 --- a/setup/setup_step7.tpl +++ b/setup/setup_step7.tpl @@ -1,49 +1,67 @@ +
+
+ {t}Validate schema when login into GOsa?{/t} +
-{t}Only display failed tests{/t}
-{t}Display checked object classes{/t}
-{t}Display all objectClasses also not checked but available classes{/t} +
+
+ {t}Enable schema validation{/t} +
+
+ +
+
+ {t}Infos in FAQ{/t}  + +
+
+
+ {if $failed_checks == 0} +

{t}Schema check was completely successful{/t}

+ {else} +

{t}The schema check returned the following results{/t}

+ {/if} -{if $failed_checks == 0} -

{t}Schema check was completely successful{/t}

-{else} -

{t}The schema check returned the following results{/t}

-{/if} + {t}Only display failed tests{/t}
+ {t}Display checked object classes{/t}
+ {t}Display all objectClasses also not checked but available classes{/t}
-{foreach from=$checks item=val key=key} - {if ( $display_type == "failed" && !$checks[$key].STATUS) || - $display_type == "checked" || - $display_type == "all"} + {foreach from=$checks item=val key=key} + {if ( $display_type == "failed" && !$checks[$key].STATUS) || + $display_type == "checked" || + $display_type == "all"} -
- {$key} - {$checks[$key].INFO} -
- - {if !$checks[$key].STATUS} - {if $checks[$key].IS_MUST_HAVE} - {$checks[$key].MSG} - {else} - {$checks[$key].MSG} +
+ {$key} + {$checks[$key].INFO} +
+ {if !$checks[$key].STATUS} + {if $checks[$key].IS_MUST_HAVE} + {$checks[$key].MSG} + {else} + {$checks[$key].MSG} + {/if} + {else} + {$checks[$key].MSG} + {/if} {/if} - {else} - {$checks[$key].MSG} - {/if} -
- {/if} -{/foreach} -
-{if $display_type == "all"} -
-

{t}All available objectClasses{/t}

- {foreach from=$not_checked item=val key=key} - {$key}   {$val}
- {/foreach} + {/foreach}
-{/if} + {if $display_type == "all"} +
+

{t}All available objectClasses{/t}

+ {foreach from=$not_checked item=val key=key} + {$key}   {$val}
+ {/foreach} +
+ {/if} +
-- 2.30.2