From 65473a9425142fc0c00f346bd893c4333180ac9f Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Jul 2007 09:43:51 +0000 Subject: [PATCH] Added license agreement field git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6873 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setupStep_License.inc | 14 +++++++++++++- setup/setup_license.tpl | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/setup/class_setupStep_License.inc b/setup/class_setupStep_License.inc index 0ed29d92a..d46768ca6 100644 --- a/setup/class_setupStep_License.inc +++ b/setup/class_setupStep_License.inc @@ -25,6 +25,9 @@ class Step_License extends setup_step var $license_found = false; var $License = ""; var $header_image = "images/ldif.png"; + var $accepted = FALSE; + var $attributes = array("accepted"); + function Step_License() { @@ -63,6 +66,7 @@ class Step_License extends setup_step $smarty = get_smarty(); $smarty -> assign("License",nl2br($this->License)); $smarty -> assign("license_found",$this->license_found); + $smarty -> assign("accepted",$this->accepted); return($smarty -> fetch (get_template_path("../setup/setup_license.tpl"))); } @@ -70,7 +74,15 @@ class Step_License extends setup_step function save_object() { - if($this->license_found){ + if(isset($_POST['step_license'])){ + if(isset($_POST['accepted'])){ + $this->accepted = TRUE; + }else{ + $this->accepted = FALSE; + } + } + + if($this->license_found && $this->accepted){ $this->is_completed = true; }else{ $this->is_completed = false; diff --git a/setup/setup_license.tpl b/setup/setup_license.tpl index c0c189636..47e7937cc 100644 --- a/setup/setup_license.tpl +++ b/setup/setup_license.tpl @@ -3,5 +3,9 @@
{$License}
+ +
+ {t}I have read the license and accept it{/t}
+ -- 2.30.2