Code

Added copy & paste for profiles
[gosa.git] / setup / class_setupStep_License.inc
index 39f6577b4bd98d4052b0bf3f308c26d40969d0c9..d46768ca6895321808c6a1f2cdc66cafbadfbb91 100644 (file)
@@ -24,6 +24,10 @@ 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()
   {
@@ -50,8 +54,8 @@ class Step_License extends setup_step
   function update_strings()
   {
     $this->s_title      = _("License");
-    $this->s_title_long = _("GNU / GPL-License");
-    $this->s_info       = _("GNU / GPL-License");
+    $this->s_title_long = _("License");
+    $this->s_info       = _("Terms and conditions for usage");
   }
 
  
@@ -62,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")));
   }
@@ -69,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;