From 7dea80f1255cc7217a99e69f46ab7adff6c036dd Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 26 Aug 2005 11:57:23 +0000 Subject: [PATCH] Added Import button git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1231 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../environment/class_environment.inc | 4 ++- .../class_logonManagementDialog.inc | 34 ++++++++++++------- .../personal/environment/logonManagement.tpl | 16 +++++++++ 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 248595e9b..365ccc980 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -114,6 +114,7 @@ class environment extends plugin $tmp2['LogonLast'] = ""; } $tmp2['LogonData'] = base64_decode($tmp[3]); + $tmp2['LogonDescription'] = $tmp[4]; $this->gotoLogonScripts[$tmp[0]]=$tmp2; } } @@ -730,7 +731,8 @@ class environment extends plugin $this->attrs['gotoLogonScript'][] = $script['LogonName']."|". $script['LogonOverload'].$script['LogonLast']."|". $script['LogonPriority']."|". - base64_encode($script['LogonData']); + base64_encode($script['LogonData'])."|". + $script['LogonDescription']; } /* Prepare Shares */ diff --git a/plugins/personal/environment/class_logonManagementDialog.inc b/plugins/personal/environment/class_logonManagementDialog.inc index 0587f834b..b2bdea79c 100644 --- a/plugins/personal/environment/class_logonManagementDialog.inc +++ b/plugins/personal/environment/class_logonManagementDialog.inc @@ -8,15 +8,17 @@ class logonManagementDialog extends plugin /* attribute list for save action */ var $ignore_account = TRUE; - var $attributes = array("LogonName","LogonPriority","LogonLast","LogonOverload","LogonData"); + var $attributes = array("LogonName","LogonPriority","LogonLast","LogonOverload","LogonData","LogonDescription"); var $objectclasses = array("whatever"); var $use_existing = false; - var $LogonName =""; // Name for the LogonScript - var $LogonPriority =""; // Priority defines the order in which the scripts will be processed - var $LogonLast =""; // Is this script marked as the last, all following scripts will be skipped - var $LogonOverload =""; // If Overload is activated this script is overlaodable by a group script with same prio - var $LogonData =""; // The script itself + var $LogonName =""; // Name for the LogonScript + var $LogonPriority =""; // Priority defines the order in which the scripts will be processed + var $LogonLast =""; // Is this script marked as the last, all following scripts will be skipped + var $LogonOverload =""; // If Overload is activated this script is overlaodable by a group script with same prio + var $LogonData =""; // The script itself + var $LogonDescription =""; + var $nameIsEditable = true; var $real_LogonName = ""; @@ -26,13 +28,14 @@ class logonManagementDialog extends plugin plugin::plugin ($config, $dn); if($data){ - $this->LogonName = $data['LogonName']; - $this->LogonPriority = $data['LogonPriority']; - $this->LogonOverload = $data['LogonOverload']; - $this->LogonLast = $data['LogonLast']; - $this->LogonData = $data['LogonData']; - $this->nameIsEditable = false; - $this->real_LogonName = $data['LogonName']; + $this->LogonName = $data['LogonName']; + $this->LogonPriority = $data['LogonPriority']; + $this->LogonOverload = $data['LogonOverload']; + $this->LogonLast = $data['LogonLast']; + $this->LogonData = $data['LogonData']; + $this->LogonDescription = $data['LogonDescription']; + $this->nameIsEditable = false; + $this->real_LogonName = $data['LogonName']; } } @@ -41,6 +44,11 @@ class logonManagementDialog extends plugin $smarty= get_smarty(); $display= ""; + if((isset($_POST['StartImport']))&&(isset($_FILES['importFile']))){ + $this->LogonData = file_get_contents($_FILES['importFile']['tmp_name']); + @unlink($_FILES['importFile']['tmp_name']); + } + foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); if($this->$attr){ diff --git a/plugins/personal/environment/logonManagement.tpl b/plugins/personal/environment/logonManagement.tpl index acae9af5d..209ef5c7e 100644 --- a/plugins/personal/environment/logonManagement.tpl +++ b/plugins/personal/environment/logonManagement.tpl @@ -13,6 +13,13 @@ + + {t}Description{/t} + + + + + {t}Priority{/t} @@ -40,6 +47,15 @@ {t}Overloadable{/t} + + + {t}Import{/t} + + + + + + -- 2.30.2