summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c843c04)
raw | patch | inline | side by side (parent: c843c04)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Aug 2005 12:37:29 +0000 (12:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Aug 2005 12:37:29 +0000 (12:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1217 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/class_hotplugDialog.inc | [new file with mode: 0644] | patch | blob |
plugins/personal/environment/class_kioskManagementDialog.inc | [new file with mode: 0644] | patch | blob |
plugins/personal/environment/class_selectPrinterDialog.inc | [new file with mode: 0644] | patch | blob |
plugins/personal/environment/environment.tpl | patch | blob | history | |
plugins/personal/environment/hotplugDialog.tpl | [new file with mode: 0644] | patch | blob |
plugins/personal/environment/hotplugDialogNew.tpl | [new file with mode: 0644] | patch | blob |
plugins/personal/environment/kioskManagement.tpl | [new file with mode: 0644] | patch | blob |
plugins/personal/environment/selectPrinterDialog.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 7ea78499c7a14d44383ae868bd0032fb824294f5..9751bede44350996afa6ef6e3c5af90e66b4f9f5 100644 (file)
var $ignore_account = FALSE;
var $plHeadline = "Environment";
var $plDescription = "This does something";
- var $in_dialog = false; // Indicates that we are currently editing in an seperate dialog
+ var $dialog = false; // Indicates that we are currently editing in an seperate dialog
/* Attribute definition
*/
- /* profile managment */
+ /* profile management */
var $useProfile = false; // Specifies if we want to use a Server
- var $goProfileServer = ""; // Specifies the selected profile server
- var $goProfileServers = array();// Specifies all available and selectable servers
+ var $gotoProfileServer = ""; // Specifies the selected profile server
+ var $gotoProfileServers = array();// Specifies all available and selectable servers
var $gotoProfileFlags = ""; // Flags enabled ? only used to set ACL and save
var $gotoProfileFlag_C = ""; // Flag is set to C if we have the profile caching fucntion enabled
var $gotoXResolution = ""; // The selected resolution eg: 1024x768
var $gotoXResolutions = array();// Contains all available resolutions for this account
var $gotoProfileFlag_L = ""; // Flag is set to L to enable runtime resolution change
+ var $gotoProfileQuota = ""; // User Quota Settings
- /* Login script section*/
- var $gotoLoginScripts = array();// Contains all available Login Scripts
- var $gotoLoginScript = ""; // The selected Login Script
+ /* Logon script section*/
+ var $gotoLogonScripts = array();// Contains all available Logon Scripts
+ var $gotoLogonScript = ""; // The selected Logon Script
/* Printer */
var $gotoPrinters = array();// All available Printer
/* Share */
var $gotoShares = array();// Currently Share Option
var $gotoShare = ""; // currently selected Share Option
- var $gotoShareSelections= array();// Available Shares for this account
+ var $gotoShareSelections= array();// Available Shares for this account in Listbox format
+ var $gotoAvailableShares= array();// Available Shares for this account
/* Kiosk profile */
var $gotoKioskProfile = ""; // The selected Kiosk Profile
/* general settings */
// Sets the attributes which will kept on page reload, which will be saved, ...
- var $attributes = array("useProfile","goProfileServer","goProfileServers","gotoProfileFlags","gotoProfileFlag_C",
- "gotoXResolution","gotoXResolutions","gotoProfileFlag_L",
- "gotoLoginScripts","gotoLoginScript",
+ var $attributes = array("uid","useProfile","gotoProfileServer","gotoProfileServers","gotoProfileFlags","gotoProfileFlag_C",
+ "gotoXResolution","gotoXResolutions","gotoProfileFlag_L","gotoProfileQuota",
+ "gotoLogonScripts","gotoLogonScript",
"gotoPrinters","gotoPrinter",
"gotoShares","gotoShare","gotoShareSelections",
"gotoKioskProfile","gotoKioskProfiles",
"gotoHotplugDevice","gotoHotplugDevices");
- var $objectclasses = array("whatever"); // Specifies the objectClass which contains the attributes edited here
-
+ var $objectclasses = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here
+ function environment ($config, $dn= NULL)
+ {
+ plugin::plugin ($config, $dn);
+ /* Get all Printer assignments */
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gotoPrinter)(gotoUserPrinter=".$this->uid."))",array("*"));
+ while($printer = $ldap->fetch()){
+ $this->gotoPrinters[$printer['cn'][0]]=$printer;
+ $this->gotoPrinters[$printer['cn'][0]]['mode']="user";
+ }
+ $ldap->search("(&(objectClass=gotoPrinter)(gotoAdminPrinter=".$this->uid."))",array("*"));
+ while($printer = $ldap->fetch()){
+ $this->gotoPrinters[$printer['cn'][0]]=$printer;
+ $this->gotoPrinters[$printer['cn'][0]]['mode']="admin";
+ }
+
+ /* prepare hotplugs */
+ if((isset($this->attrs['gotoHotplugDevice']))&&(is_array($this->attrs['gotoHotplugDevice']))){
+ unset($this->attrs['gotoHotplugDevice']['count']);
+ foreach($this->attrs['gotoHotplugDevice'] as $device){
+ $tmp = $tmp2 = array();
+ $tmp = split("\|",$device);
+ $tmp2['name'] = $tmp[0];
+ $tmp2['description'] = $tmp[1];
+ $tmp2['id'] = $tmp[2];
+ $this->gotoHotplugDevices[$tmp[0]]=$tmp2;
+ }
+ }
+
+ /* Prepare Shares */
+ if((isset($this->attrs['gotoShare']))&&(is_array($this->attrs['gotoShare']))){
+ unset($this->attrs['gotoShare']['count']);
+ foreach($this->attrs['gotoShare'] as $share){
+ $tmp = $tmp2 = array();
+ $tmp = split("\|",$share);
+ $tmp2['name'] =$tmp[0];
+ $tmp2['mountPoint']=$tmp[1];
+ $this->gotoShares[$tmp[0]]=$tmp2;
+ }
+ }
+ for($i = 0 ; $i < strlen($this->gotoProfileFlags) ; $i ++){
+ $chr = $this->gotoProfileFlags[$i];
+ $name = "gotoProfileFlag_".$chr;
+ $this->$name=$chr;
+ }
+ if((!empty($this->gotoProfileServer))||($this->gotoProfileFlag_C=="C")){
+ $this->useProfile = true;
+ }else{
+ $this->useProfile = false;
+ }
- function environment ($config, $dn= NULL)
- {
- plugin::plugin ($config, $dn);
}
function execute()
/* Fill templating stuff */
$smarty= get_smarty();
$display= "";
-
/* Is accout enabled | are we editing from usermenu or admin menu
- All these tab managment is done here
+ All these tab management is done here
*/
// 1. Account disabled . Editing from usermenu
}
}
+
+ /* HANDLE Profile Settings here
+ * Assign available Quota and resolution settings
+ * Get all available profile server
+ * Get cache checkbox
+ * Assign this all to Smarty
+ */
+
+ if(empty($this->useProfile)){
+ $smarty->assign("gotoProfileACL","disabled");
+ $smarty->assign("useProfileCHK","");
+ }else{
+ $smarty->assign("gotoProfileACL","");
+ $smarty->assign("useProfileCHK"," checked ");
+ }
+
+ $this->gotoXResolutions = array("640x480","800x600","1024x768","1280x768","1280x1024");
+ $this->gotoProfileServers = array("none","none1");
+
+ $smarty->assign("gotoXResolutions",$this->gotoXResolutions);
+ $smarty->assign("gotoProfileServers",$this->gotoProfileServers);
+
+ /* Handle kiosk profiles
+ * Read available from filesystem
+ * Open management if post is transmitted
+ */
+ $tmp = new kioskManagementDialog($this->config,$this->dn);
+ $list = $tmp->getKioskProfiles();
+
+ $smarty->assign("gotoKioskProfiles",$list);
+ $smarty->assign("gotoKioskProfileKeys",array_flip($list));
+
+ /* Open Management Dialog */
+ if(isset($_POST['KioskManagementDialog'])){
+ $this->dialog = new kioskManagementDialog($this->config,$this->dn);
+ $this->is_dialog = true;
+ }
+
+ /* Save */
+ if(isset($_POST['KioskClose'])){
+ unset($this->dialog);
+ $this->dialog=NULL;
+ $this->is_dialog = false;
+ }
+
+ /* Logonscript Management
+ * Get available LogonScripts (possibly grey out (or mark) these script that are defined for the group)
+ * Perform add Delete edit Posts
+ */
+
+ $this->gotoLogonScripts = array("asdf"=>"one","aaaa"=>"two","121"=>"3");
+
+ $smarty->assign("gotoLogonScripts",$this->gotoLogonScripts);
+ $smarty->assign("gotoLogonScriptKeys",array_flip($this->gotoLogonScripts));
+
+ /* Check Edit Del New Posts for a selected LogonScript */
+ if(isset($_POST['gotoLogonScriptNew'])||isset($_POST['gotoLogonScriptEdit'])||isset($_POST['gotoLogonScriptDel'])){
+
+ /* New Logon Script: Open an edit dialog, we don't need a $_POST['gotoLogonScript'] here.
+ * In this case we create a new Logon Script.
+ */
+ if(isset($_POST['gotoLogonScriptNew'])){
+ print "Adding ".$is_entry;
+ }
+
+ /* If we receive a Delete request and there is a Script selected in the selectbox, delete this one.
+ * We only can delete if there is an entry selected.
+ */
+ if((isset($_POST['gotoLogonScriptDel']))&&(isset($_POST['gotoLogonScript']))){
+ $is_entry = $this->gotoLogonScripts[$_POST['gotoLogonScript']];
+ print "Deleting ".$is_entry;
+ }
+
+ /* In this case we want to edit an existing entry, we open a new Dialog to allow editing.
+ * There must be an entry selected to perform edit request.
+ */
+ if((isset($_POST['gotoLogonScriptEdit']))&&(isset($_POST['gotoLogonScript']))){
+ $is_entry = $this->gotoLogonScripts[$_POST['gotoLogonScript']];
+ print "Editing ".$is_entry;
+ }
+ }
+
+ /* In this section server shares will be defined
+ * A user can select one of the given shares and a mount point
+ * and attach this combination to his setup.
+ */
+
+ $this->gotoShareSelections = $this->getShareList(true);
+ $this->gotoAvailableShares = $this->getShareList(false);
+
+ $smarty->assign("gotoShareSelections", $this->gotoShareSelections);
+ $smarty->assign("gotoShareSelectionKeys", array_flip($this->gotoShareSelections));
+
+ /* if $_POST['gotoShareAdd'] is set, we will try to add a new entry
+ * This entry will be, a combination of mountPoint and sharedefinitions
+ */
+ if(isset($_POST['gotoShareAdd'])){
+ /* We assign a share to this user, if we don't know where to mount the share */
+ if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))){
+ print_red("You must specify a valid mount point.");
+ }else{
+ $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
+ $s_mount = $_POST['gotoShareMountPoint'];
+
+ /* Preparing the new assignment */
+ $this->gotoShares[$a_share['name']]=$a_share;
+ $this->gotoShares[$a_share['name']]['mountPoint']=$s_mount;
+ }
+ }
+
+ /* if the Post gotoShareDel is set, someone asked GOsa to delete the selected entry (if there is one selected)
+ * If there is no defined share selected, we will abort the deletion without any message
+ */
+ if((isset($_POST['gotoShareDel']))&&(isset($_POST['gotoShare']))){
+ unset($this->gotoShares[$_POST['gotoShare']]);
+ }
+
+ $smarty->assign("gotoShares",$this->printOutAssignedShares());
+ $smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares()));
+
+ /* Hotplug devices will be handled here
+ * There are 3 possible methods for this feature
+ * Create a new Hotplug, A Dialog will open where you can specify some hotplug information
+ * Delete will erase an entry, the entry must be selcted in the ListBox first
+ * Editing an entry will open a dialog where the informations about the selcted entry can be changed
+ */
+
+ /* If there is a new entry wanted, open a new entry by initilising the dialog */
+ if(isset($_POST['gotoHotplugDeviceNew'])){
+ $this->dialog = new hotplugDialog($this->config,$this->dn);
+ $this->is_dialog = true;
+ }
+
+ /* We have to delete the selected hotplug from the list*/
+ if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice']))){
+ unset($this->gotoHotplugDevices[$_POST['gotoHotplugDevice']]);
+ }
+
+ /* There are already defined hotplugs from other users we could use */
+ if(isset($_POST['gotoHotplugDeviceUse'])){
+ $this->dialog = new hotplugDialog($this->config,$this->dn,true);
+ $this->is_dialog = true;
+ }
+
+ /* Dialog Aborted */
+ if(isset($_POST['HotPlugCancel'])){
+ unset($this->dialog);
+ $this->dialog= NULL;
+ $this->is_dialog = false;
+ }
+
+ /* Dialod saved */
+ if(isset($_POST['HotPlugSave'])){
+ $this->dialog->save_object();
+ if(count($this->dialog->check())!=0){
+ foreach($this->dialog->check() as $msg){
+ print_red($msg);
+ }
+ }else{
+ $this->dialog->save_object();
+ $a_tmp = $this->dialog->save();
+ if(is_array($a_tmp)){
+ $this->gotoHotplugDevices[$a_tmp['name']]= $a_tmp;
+ }
+ unset($this->dialog);
+ $this->dialog= NULL;
+ $this->is_dialog = false;
+ }
+ }
+
+ $smarty->assign("gotoHotplugDevices",$this->printOutHotPlugDevices());
+ $smarty->assign("gotoHotplugDeviceKeys",array_flip($this->printOutHotPlugDevices()));
+
+ /* Printer Assignment will managed below
+ * A printer can be assigned in two different ways and two different types
+ * There are 2 types of users assigned to a printer : user and admin
+ * They only differ in the member attribute they will be assigned to. user: gotoUserPrinter admin: gotoadminPrinter
+ * The different types of assigning a user are : 1 assigning a user to a printer 2. assigning a group to a printer
+ */
+
+ /* First handle Add Post. Open a dialog that allows us to select a printer or two */
+ if(isset($_POST['gotoPrinterAdd'])){
+ $this->is_dialog=true;
+ $this->dialog = new selectPrinterDialog($this->config,$this->dn);
+ }
+
+ if(isset($_POST['PrinterCancel'])){
+ $this->is_dialog=false;
+ unset($this->dialog);
+ $this->dialog=NULL;
+ }
+
+ if(isset($_POST['PrinterSave'])){
+ if(count($this->dialog->check())!=0){
+ $tmp = $this->dialog->check();
+ foreach($tmp as $msg){
+ print_red($msg);
+ }
+ }else{
+ $this->dialog->save_object();
+ $tmp = $this->dialog->save();
+ $tmp2= $this->dialog->getPrinter(true);
+ $this->gotoPrinters[$tmp]=$tmp2[$tmp];
+ $this->gotoPrinters[$tmp]['mode']="user";
+ $this->is_dialog=false;
+ unset($this->dialog);
+ $this->dialog =NULL;
+ }
+ }
+
+ if((isset($_POST['gotoPrinterDel']))&&(isset($_POST['gotoPrinter']))&&(!empty($_POST['gotoPrinter']))){
+ $printer = $_POST['gotoPrinter'];
+ unset($this->gotoPrinters[$printer]);
+ }
+
+ if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinter']))&&(!empty($_POST['gotoPrinter']))){
+ $printer = $_POST['gotoPrinter'];
+ if($this->gotoPrinters[$printer]['mode']=="user"){
+ $this->gotoPrinters[$printer]['mode']="admin";
+ }else{
+ $this->gotoPrinters[$printer]['mode']="user";
+ }
+ }
+
+ $smarty->assign("gotoPrinters",$this->printOutPrinterDevices());
+ $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices()));
+
+ /* General behavior */
+ if((isset($this->dialog))&&($this->dialog!=NULL)&&(!empty($this->dialog))){
+ $this->dialog->save_object();
+ return ($this->dialog->execute());
+ }
/* Als smarty vars are set. Get smarty template and generate output */
$display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
+
return($display);
}
function remove_from_parent()
{
- /* This cannot be removed... */
+ /* only if it was an account*/
+ if (!$this->initially_was_account){
+ return;
+ }
+
+ /* include global link_info */
+ $ldap= $this->config->get_ldap_link();
+
+ /* Remove and write to LDAP */
+ plugin::remove_from_parent();
+
+ /* Don't save our template variables */
+ $skip = array("useProfile","uid","gotoProfileServers","gotoProfileFlag_C","gotoXResolutions","gotoProfileFlag_L",
+ "gotoLogonScripts","gotoPrinters","gotoShares","gotoShareSelections","gotoKioskProfiles","gotoHotplugDevices",
+ "gotoPrinter");
+ /* Skip all these attributes */
+ foreach($skip as $del){
+ unset($this->attrs[$del]);
+ }
+
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save");
+
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+
+ show_ldap_error($ldap->get_error());
+
+ /* Optionally execute a command after we're done */
+ $this->handle_post_events("remove");
}
/* Save data to object */
function save_object()
{
- plugin::save_object();
+ /* Get all Posted vars
+ * Setup checkboxes
+ */
+
+ if(isset($_POST['iamposted'])){
+ plugin::save_object();
+ foreach($this->attributes as $s_attr){
+ if(in_array($s_attr,array("gotoShares","gotoHotplugDevices","gotoPrinters"))) continue;
+ if(isset($_POST[$s_attr])){
+ $this->$s_attr = $_POST[$s_attr];
+ }else{
+ $this->$s_attr = false;
+ }
+ }
+ }
}
function check()
{
$message= array();
-
return ($message);
}
function save()
{
plugin::save();
+ $ldap= $this->config->get_ldap_link();
- /* Optionally execute a command after we're done */
- #$this->handle_post_events($mode);
+ $realyUsedAttrs= array();
+
+ /* Save already used objectClasses */
+ $ocs = $this->attrs['objectClass'];
+ unset($ocs['count']);
+ $this->attrs = array();
+ $this->attrs['objectClass']= $ocs;
+ foreach($this->objectclasses as $objc){
+ if(!in_array($objc,$this->attrs['objectClass'])){
+ $this->attrs['objectClass'][]=$objc;
+ }
+ }
+
+
+ /* Save usersettings to Printer */
+ foreach($this->gotoPrinters as $printer) {
+ $ldap->cd($printer['dn']);
+ $ldap->cat($printer['dn']);
+ $attrs= $ldap->fetch();
+ $attrs_used = array();
+ foreach($attrs as $key=>$val){
+ if((!is_numeric($key))&&($key!="count")){
+ if(is_array($val)&&isset($val['count'])){
+ unset($val['count']);
+ }
+ $attrs_used[$key]=$val;
+ }
+ }
+ $attrs= $attrs_used;
+
+ /* Filter entries */
+
+ if($printer['mode'] == "user"){
+ $attribute = "gotoUserPrinter";
+ $attribute2 = "gotoAdminPrinter";
+ }else{
+ $attribute = "gotoAdminPrinter";
+ $attribute2 = "gotoUserPrinter";
+ }
+
+ /* If this user is already assigned to $attribute2
+ * delete user from $attribute2, to be albe to attach him to $attribute
+ * A user can't be admin and normal user for one printer
+ */
+ if(!isset($printer[$attribute2])){
+ $printer[$attribute2]=array();
+ }else{
+ if(in_array($this->uid,$printer[$attribute2])){
+ $tmp = array_flip($attrs[$attribute2]);
+ unset($tmp[$this->uid]);
+ $attrs[$attribute2]=$tmp;
+ }
+ /* If Last entry removed, clear attribute*/
+ if(empty($attrs[$attribute2])){
+ $attrs[$attribute2]=array();
+ }
+ }
+
+ /* Attach user to the $attribute, if he is'nt already attached
+ */
+ if(!isset($attrs[$attribute])){
+ $attrs[$attribute]=array($this->uid);
+ }else{
+ unset($attrs[$attribute]['count']);
+ if(!in_array($this->uid,$attrs[$attribute])){
+ $attrs[$attribute][]=$this->uid;
+ }
+ }
+ $ldap->cd($attrs['dn']);
+ unset($attrs['dn']);
+ $ldap->modify($attrs);
+ if($ldap->get_error()!="Success"){
+ print_red($ldap->get_error());
+ }
+ }
+
+ /* Prepare HotPlug devices */
+ $this->attrs['gotoHotplugDevice'] = array();
+ foreach($this->gotoHotplugDevices as $name => $device){
+ $this->attrs['gotoHotplugDevice'][] = $device['name']."|".$device['description']."|".$device['id'];
+ }
+
+ /* Prepare Shares */
+ $this->attrs['gotoShare']=array();
+ foreach($this->gotoShares as $name => $share){
+ $this->attrs['gotoShare'][] = $share['name']."|".$share['mountPoint'];
+ }
+
+ if(!empty($this->gotoKioskProfile)){
+ $this->attrs['gotoKioskProfile']= $this->gotoKioskProfile;
+ }else{
+ $this->attrs['gotoKioskProfile']= array();
+ }
+
+ $saveThis = array("gotoKioskProfile","gotoProfileQuota","gotoXResolution","gotoProfileServer");
+
+ foreach($saveThis as $tosave){
+ if(!empty($this->$tosave)){
+ $this->attrs[$tosave]=$this->$tosave;
+ }else{
+ $this->attrs[$tosave]=array();
+ }
+ }
+
+ /* Prepare Flags */
+ $this->attrs['gotoProfileFlags'] = array($this->gotoProfileFlag_C.$this->gotoProfileFlag_L);
+ if(empty($this->attrs['gotoProfileFlags'][0])){
+ $this->attrs['gotoProfileFlags']=array();
+ }
+
+ if($this->useProfile == false){
+ $this->attrs['gotoProfileFlags'] = preg_replace("/C/i","",$this->attrs['gotoProfileFlags']);
+ $this->attrs['gotoProfileServer']= array();
+ }
+
+ $ldap->cat ($this->dn);
+ if ($ldap->fetch()){
+ $mode= "modify";
+ } else {
+ $mode= "add";
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
+ }
+
+ $ldap->cd($this->dn);
+ $ldap->$mode($this->attrs);
+ if($ldap->get_error()!="Success"){
+ print_red($ldap->get_error());
+ }
+ $this->handle_post_events($mode);
}
+
+
+
+/* This function returns all available Shares defined in this ldap
+ * There are two ways to call this function, if listboxEntry is true
+ * only name and path are attached to the array, in it is false, the whole
+ * entry will be parsed an atached to the result.
+ */
+ function getShareList($listboxEntry = false)
+ {
+ $ldap= $this->config->get_ldap_link();
+ $a_res = $ldap->search("(objectClass=goShareServer)",array("goExportEntry"));
+ $return= array();
+ while($entry = $ldap->fetch($a_res)){
+ $shareAttrs = split("\|",$entry['goExportEntry'][0]);
+ if($listboxEntry) {
+ $return[$shareAttrs[0]] = $shareAttrs[0]." - ".$shareAttrs[3];
+ }else{
+ $return[$shareAttrs[0]]['name'] = $shareAttrs[0];
+ $return[$shareAttrs[0]]['description'] = $shareAttrs[1];
+ $return[$shareAttrs[0]]['type'] = $shareAttrs[2];
+ $return[$shareAttrs[0]]['charset'] = $shareAttrs[3];
+ $return[$shareAttrs[0]]['path'] = $shareAttrs[4];
+ $return[$shareAttrs[0]]['option'] = $shareAttrs[5];
+ }
+ }
+ return($return);
+ }
+
+
+/* Generate ListBox frindly output for the defined shares
+ * Possibly Add or remove an attribute here,
+ */
+ function printOutAssignedShares()
+ {
+ $a_return = array();
+ if(is_array($this->gotoShares)){
+ foreach($this->gotoShares as $share){
+ $a_return[$share['name']]= $share['name']." ".$share['mountPoint'];
+ }
+ }
+ return($a_return);
+ }
+
+/* Generate ListBox frindly output for the definedhotplugs
+ * Possibly Add or remove an attribute here,
+ */
+function printOutHotPlugDevices()
+ {
+ $a_return= array();
+ if(is_array($this->gotoHotplugDevices)){
+ foreach($this->gotoHotplugDevices as $key=>$device){
+ $a_return[$key] = $device['name']." - ".$device['id'];
+ }
+ }
+ return($a_return);
+ }
+
+/* Generates ListBox frienly output of used printer devices
+ * Append ' - admin' if printer is used in admin mode
+ */
+function printOutPrinterDevices()
+ {
+ $a_return = array();
+ if(is_array($this->gotoPrinters)){
+ foreach($this->gotoPrinters as $printer){
+ if($printer['mode'] == "admin"){
+ $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Admin");
+ }else{
+ $a_return[$printer['cn'][0]]= $printer['cn'][0];
+ }
+ }
+ }
+ return($a_return);
+ }
+
+
+
+
+
}
+
+
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc
--- /dev/null
@@ -0,0 +1,143 @@
+<?php
+
+class hotplugDialog extends plugin
+{
+ /* CLI vars */
+ var $cli_summary = "Manage server basic objects";
+ var $cli_description = "Some longer text\nfor help";
+ var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
+
+ /* attribute list for save action */
+ var $ignore_account = TRUE;
+ var $attributes = array("HOT_name","HOT_description","HOT_id");
+ var $objectclasses = array("whatever");
+ var $use_existing = false;
+
+ var $HOT_name = "";
+ var $HOT_description = "";
+ var $HOT_id = "";
+
+ var $hotplugDevices = "";
+ var $hotplugDeviceList = array();
+
+ function hotplugDialog ($config, $dn= NULL,$use_existing=false )
+ {
+ $this->use_existing = $use_existing;
+ plugin::plugin ($config, $dn);
+ }
+
+ function execute()
+ {
+ /* Fill templating stuff */
+ $smarty= get_smarty();
+ $display= "";
+
+ foreach($this->attributes as $s_attr){
+ $smarty->assign($s_attr,$this->$s_attr);
+ }
+
+ if($this->use_existing){
+ $this->hotplugDevices = $this->getHotplugs();
+ $smarty->assign("hotplugDevices",$this->hotplugDevices);
+ $smarty->assign("hotplugDeviceKeys",array_flip($this->hotplugDevices));
+ $display.= $smarty->fetch(get_template_path('hotplugDialog.tpl', TRUE,dirname(__FILE__)));
+ }else{
+ $display.= $smarty->fetch(get_template_path('hotplugDialogNew.tpl', TRUE,dirname(__FILE__)));
+ }
+ return($display);
+ }
+
+ function remove_from_parent()
+ {
+ /* This cannot be removed... */
+ }
+
+
+ /* Save data to object */
+ function save_object()
+ {
+ if(isset($_POST['dialogissubmitted'])){
+ foreach($this->attributes as $s_attr){
+ if(isset($_POST[$s_attr])){
+ $this->$s_attr = $_POST[$s_attr];
+ }else{
+ $this->$s_attr = false;
+ }
+ }
+ plugin::save_object();
+ }
+ }
+
+
+ /* Check supplied data */
+ function check()
+ {
+ $message= array();
+ if(!$this->use_existing){
+ if((empty($this->HOT_name))||(preg_match("/[^a-z0-9]/i",$this->HOT_name))){
+ $message[]=_("Please specify a valid name.");
+ }
+ if((empty($this->HOT_description))||(preg_match("/[^a-z0-9!\"?.,;:-_\(\) ]/i",$this->HOT_description))){
+ $message[]=_("Please specify a valid description.");
+ }
+ if((empty($this->HOT_id))){
+ $message[]=_("Please specify a valid id.");
+ }
+ }else{
+ if((!isset($_POST['hotplugName']))||(empty($_POST['hotplugName']))){
+ $message[] = _("Please select an entry or press cancel.");
+ }
+ }
+
+ return ($message);
+ }
+
+
+ /* Save to LDAP */
+ function save()
+ {
+ /* return generated entry from input fields*/
+ if(!$this->use_existing){
+ $a_return=array();
+ $a_return['name']= $this->HOT_name;
+ $a_return['description']= $this->HOT_description;
+ $a_return['id']= $this->HOT_id;
+ return($a_return);
+ }else{
+ //return selected entry from select box
+ $entry = $this->hotplugDeviceList[$_POST['hotplugName']];
+ return $entry;
+ }
+ }
+
+ function getHotplugs(){
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+
+ $ldap->search("(objectClass=gotoEnvironment)",array("gotoHotplugDevice"));
+
+ $a_return = array();
+ $this->hotplugDeviceList = array();
+ while($attr = $ldap->fetch()){
+ if(isset($attr['gotoHotplugDevice'])){
+ unset($attr['gotoHotplugDevice']['count']);
+ foreach($attr['gotoHotplugDevice'] as $device){
+ $tmp =$tmp2= array();
+ $tmp = split("\|",$device);
+ $a_return[$tmp[0]]= $tmp[0]." [".$tmp[1]."] ".$tmp[2];
+
+ $tmp2['name'] = $tmp[0];
+ $tmp2['description'] = $tmp[1];
+ $tmp2['id'] = $tmp[2];
+
+ $this->hotplugDeviceList[$tmp[0]]=$tmp2;
+ }
+ }
+ }
+ return($a_return);
+ }
+
+}
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+
+class kioskManagementDialog extends plugin
+{
+ /* CLI vars */
+ var $cli_summary = "Manage server basic objects";
+ var $cli_description = "Some longer text\nfor help";
+ var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
+
+ /* attribute list for save action */
+ var $ignore_account = TRUE;
+ var $attributes = array();
+ var $objectclasses = array("whatever");
+ var $use_existing = false;
+
+ var $baseDir = "../kioskProfiles/";
+ var $filePrefix = ".kioskProfile";
+
+ function kioskManagementDialog ($config, $dn= NULL,$use_existing=false )
+ {
+ $this->use_existing = $use_existing;
+ plugin::plugin ($config, $dn);
+ }
+
+ function execute()
+ {
+ /* Fill templating stuff */
+ $smarty= get_smarty();
+ $display= "";
+
+ /* Add new kiosk profile
+ * Save the new Profile with filePrefix ($this->filePrefix)
+ * in profile directory ($this->baseDir);
+ */
+ if((isset($_POST['profileAdd']))&&(isset($_FILES['newProfile']))){
+ $file = $_FILES['newProfile'];
+ if(!file_exists($this->baseDir.$file['name'])){
+ $name = preg_replace("/\..*$/","",$file['name']).$this->filePrefix;
+ $str = file_get_contents($file['tmp_name']);
+ $fp = fopen($this->baseDir.$name,"w+");
+ fwrite($fp,$str,strlen($str));
+ fclose($fp);
+ }
+ }
+
+ /* Delete profile
+ * Delete selected file form $this->baseDir
+ */
+ if((isset($_POST['profileDel']))&&(isset($_POST['gotoKioskProfile']))){
+ $filename = $this->baseDir.$_POST['gotoKioskProfile'].$this->filePrefix;
+
+ $res = @unlink($filename);
+ if(!$res){
+ if(!is_writeable($filename)){
+ print_red(_("Can't delete '".$filename."' permission denied."));
+ }
+ if(!file_exists($filename)){
+ print_red(_("Can't delete '".$filename."' file don't exists."));
+ }
+
+ }
+ }
+
+ /*Assign all existing profiles to smarty*/
+ $smarty->assign("gotoKioskProfiles",$this->getKioskProfiles());
+ $smarty->assign("gotoKioskProfileKeys",array_flip($this->getKioskProfiles()));
+
+ $display.= $smarty->fetch(get_template_path('kioskManagement.tpl', TRUE,dirname(__FILE__)));
+ return($display);
+ }
+
+ function getKioskProfiles()
+ {
+ $dir = opendir($this->baseDir);
+ $a_return = array();
+ while($file = readdir($dir)){
+ if(preg_match("/".$this->filePrefix."$/i",$file)){
+ $name = preg_replace("/".$this->filePrefix."$/i","",$file);;
+ $a_return[$name] = $name;
+ }
+ }
+ return($a_return);
+ }
+
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/plugins/personal/environment/class_selectPrinterDialog.inc b/plugins/personal/environment/class_selectPrinterDialog.inc
--- /dev/null
@@ -0,0 +1,100 @@
+<?php
+
+class selectPrinterDialog extends plugin
+{
+ /* CLI vars */
+ var $cli_summary = "Manage server basic objects";
+ var $cli_description = "Some longer text\nfor help";
+ var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
+
+ /* attribute list for save action */
+ var $ignore_account = TRUE;
+ var $attributes = array();
+ var $objectclasses = array("whatever");
+ var $use_existing = false;
+ var $regex = "*";
+ var $depselect = "/";
+ var $deplist = "/";
+
+ function selectPrinterDialog ($config, $dn= NULL,$use_existing=false )
+ {
+ $this->use_existing = $use_existing;
+ plugin::plugin ($config, $dn);
+ $this->depselect = $this->config->current['BASE'];
+ }
+
+ function execute()
+ {
+ /* Fill templating stuff */
+ $smarty= get_smarty();
+ $display= "";
+
+ if(isset($_POST['dialogissubmitted'])){
+ $this->regex=$_POST['regexPrinter'];
+ $this->depselect = $_POST['depselectPrinter'];
+ }
+
+ if((isset($_GET['search']))&&(!empty($_GET['search']))){
+ $this->regex=$_GET['search']."*";
+ $this->regex=preg_replace("/\*\*/","*",$this->regex);
+ }
+
+ $this->deplist=array_flip($this->config->departments);
+
+ $smarty->assign("regexPrinter" ,$this->regex);
+ $smarty->assign("deplistPrinter" ,$this->deplist);
+ $smarty->assign("depselectPrinter",$this->depselect);
+ $smarty->assign("gotoPrinters",$this->getPrinter());
+ $smarty->assign("gotoPrinterKeys",array_flip($this->getPrinter()));
+ $smarty->assign("apply", apply_filter());
+ $smarty->assign("alphabet", generate_alphabet());
+ $smarty->assign("search_image", get_template_path('images/search.png'));
+ $smarty->assign("tree_image", get_template_path('images/tree.png'));
+ $smarty->assign("infoimage", get_template_path('images/info.png'));
+ $smarty->assign("launchimage", get_template_path('images/launch.png'));
+ $smarty->assign("deplist", $this->config->idepartments);
+
+ $display.= $smarty->fetch(get_template_path('selectPrinterDialog.tpl', TRUE,dirname(__FILE__)));
+ return($display);
+ }
+
+ function check(){
+ $message=array();
+ if(empty($_POST['gotoPrinter'])){
+ $message[] = _("Please select a printer or press cancel.");
+ }
+ return $message;
+ }
+
+ /* Save to LDAP */
+ function save()
+ {
+ return($_POST['gotoPrinter']);
+ }
+
+ /* This function generates the Printerlist
+ * All printers are returned that match regex and and depselect
+ */
+ function getPrinter($detailed = false)
+ {
+ $a_return=array();
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->depselect);
+ $ldap->search("(&(objectClass=gotoPrinter)(cn=".$this->regex."))",array("*"));
+ while($printer = $ldap->fetch()){
+ if($detailed ==true){
+ $a_return[$printer['cn'][0]] = $printer;
+ }else{
+ $a_return[$printer['cn'][0]] = $printer['cn'][0]." - ".$printer['description'][0];
+ }
+ }
+ return($a_return);
+ }
+}
+
+
+
+
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl
index ee7d78b0608599c4cf07ed09193fd38d06a8ec06..ee4acbce0b2232962ae321e175bcae73a64a2e72 100644 (file)
<img alt="" src="images/stop.png" align="middle">
{t}The environment extension is currently disabled.{/t}
{else}
+<input type="hidden" name="iamposted" value="1">
<table summary="" width="100%">
<tr>
<td valign="top" width="50%">
{t}Profil server{/t}
</td>
<td>
- <select style="width:350px;" name="goProfileServer">
- {html_options values=$goProfileServers output=$goProfileServer}
+ <select style="width:350px;" name="gotoProfileServer" {$gotoProfileACL}>
+ {html_options values=$gotoProfileServers output=$gotoProfileServers selected=$gotoProfileServer}
<option disabled> </option>
</select>
</td>
{t}Use local caching{/t}
</td>
<td>
- <input type="checkbox" name="gotoProfileFlag_C" value="C" {$gotoProfileFlagsACL} {$gotoProfileFlag_CCHK}>
+ <input type="checkbox" name="gotoProfileFlag_C" value="C" {$gotoProfileACL} {$gotoProfileFlag_CCHK}>
</td>
</tr>
</table>
<td>{t}Quota{/t}
</td>
<td>
- <input type="text" name="gotoIDon'tKnow">
+ <input type="text" name="gotoProfileQuota" value="{$gotoProfileQuota}">
</td>
</tr>
<tr>
</td>
<td>
<select name="gotoXResolution" {$gotoXResolutionACL}>
- {html_options values=$gotoXResolutions output=$gotoXResolutions}
+ {html_options values=$gotoXResolutions output=$gotoXResolutions selected=$gotoXResolution}
<option disabled> </option>
</select>
</td>
</tr>
<tr>
<td>
- <input type="checkbox" name="gotoProfileFlag_L" {$gotoProfileFlagsACL} {$gotoProfileFlag_LCHK}>
+ <input type="checkbox" name="gotoProfileFlag_L" value="L" {$gotoProfileFlagsACL} {$gotoProfileFlag_LCHK}>
</td>
<td>
{t}Resolution changeable on runtime {/t}
</td>
<td>
<select name="gotoKioskProfile" {$gotoKioskProfileACL}>
- {html_options values=$gotoKioskProfiles output=$gotoKioskProfiles}
+ {html_options values=$gotoKioskProfiles output=$gotoKioskProfiles selected=$gotoKioskProfile}
<option disabled> </option>
</td>
</tr>
</tr>
</table>
<p class="seperator"> </p>
- <h2><img alt="" src="images/banana.png" align="middle"> {t}Login scripts{/t}</h2>
+ <h2><img alt="" src="images/banana.png" align="middle"> {t}Logon scripts{/t}</h2>
<table summary="">
<tr>
<td>
- <select style="width:350px;" name="gotoLoginScript" multiple size=4 {$gotoLoginScriptACL}>
- {html_options values=$gotoLoginScripts output=$gotoLoginScripts}
+ <select style="width:350px;" name="gotoLogonScript" multiple size=4 {$gotoLogonScriptACL}>
+ {html_options values=$gotoLogonScriptKeys output=$gotoLogonScripts }
<option disabled> </option>
</select>
<br>
- <input type="submit" {gotoLoginScriptACL} name="gotoLoginScriptNew" value="{t}Add{/t}">
- <input type="submit" {gotoLoginScriptACL} name="gotoLoginScriptDel" value="{t}Delete{/t}">
- <input type="submit" {gotoLoginScriptACL} name="gotoLoginScriptEditl" value="{t}Edit{/t}">
+ <input type="submit" {gotoLogonScriptACL} name="gotoLogonScriptNew" value="{t}Add{/t}">
+ <input type="submit" {gotoLogonScriptACL} name="gotoLogonScriptDel" value="{t}Delete{/t}">
+ <input type="submit" {gotoLogonScriptACL} name="gotoLogonScriptEdit" value="{t}Edit{/t}">
</td>
</tr>
</table>
<tr>
<td>
<select style="width:350px;" name="gotoShare" multiple size=4 {$gotoShareACL}>
- {html_options values=$gotoShares output=$gotoShares}
+ {html_options values=$gotoShareKeys output=$gotoShares}
<option disabled> </option>
</select>
<br>
<select name="gotoShareSelection" {$gotoShareACL}>
- {html_options values=$gotoShareSelections output=$gotoShareSelections}
+ {html_options values=$gotoShareSelectionKeys output=$gotoShareSelections}
<option disabled> </option>
</select>
<input type="text" {$gotoShareACL} name="gotoShareMountPoint" value="">
<tr>
<td>
<select name="gotoHotplugDevice" {$gotoHotplugDeviceACL} size=4 style="width:350px;">
- {html_options values=$gotoHotplugDevices output=$gotoHotplugDevices}
+ {html_options values=$gotoHotplugDeviceKeys output=$gotoHotplugDevices}
<option disabled> </option>
</td>
</tr>
<tr>
<td>
<select style="width:350px;" name="gotoPrinter" multiple size=4 {$gotoPrinterACL}>
- {html_options values=$gotoPrinters output=$gotoPrinters}
+ {html_options values=$gotoPrinterKeys output=$gotoPrinters}
<option disabled> </option>
</select>
<br>
- <input type="submit" {$gotoLoginScriptACL} name="gotoLoginScriptNew" value="{t}Add{/t}">
- <input type="submit" {$gotoLoginScriptACL} name="gotoLoginScriptDel" value="{t}Delete{/t}">
- <input type="submit" {$gotoLoginScriptACL} name="gotoLoginScriptEditl" value="{t}Admin Toggle{/t}">
+ <input type="submit" {$gotoPrinterACL} name="gotoPrinterAdd" value="{t}Add{/t}">
+ <input type="submit" {$gotoPrinterACL} name="gotoPrinterDel" value="{t}Delete{/t}">
+ <input type="submit" {$gotoPrinterACL} name="gotoPrinterEdit" value="{t}Admin Toggle{/t}">
</td>
</tr>
</table>
diff --git a/plugins/personal/environment/hotplugDialog.tpl b/plugins/personal/environment/hotplugDialog.tpl
--- /dev/null
@@ -0,0 +1,20 @@
+<h2><img alt="" src="images/house.png" align="middle"> {t}Select hotplug entry{/t}</h2>
+
+ <input type="hidden" name="dialogissubmitted" value="1">
+
+ <table summary="">
+ <tr>
+ <td width="50%">
+ <select style="width:350px;" size=20 name="hotplugName">
+ {html_options values=$hotplugDeviceKeys output=$hotplugDevices}
+ <option disabled> </option>
+ </select><br>
+ </td>
+ </tr>
+ </table>
+
+ <p align="right">
+ <input type="submit" name="HotPlugSave" value="{t}Use{/t}">
+ <input type="submit" name="HotPlugCancel" value="{t}Cancel{/t}">
+ </p>
+
diff --git a/plugins/personal/environment/hotplugDialogNew.tpl b/plugins/personal/environment/hotplugDialogNew.tpl
--- /dev/null
@@ -0,0 +1,31 @@
+<h2><img alt="" src="images/house.png" align="middle"> {t}Create new hotplug entry{/t}</h2>
+
+ <input type="hidden" name="dialogissubmitted" value="1">
+
+ <table>
+ <tr>
+ <td>{t}Name{/t}
+ </td>
+ <td>
+ <input type="text" value="{$HOT_name}" name="HOT_name">
+ </td>
+ </tr>
+ <tr>
+ <td>{t}Description{/t}
+ </td>
+ <td>
+ <input type="text" value="{$HOT_description}" name="HOT_description">
+ </td>
+ </tr>
+ <tr>
+ <td>{t}ID{/t}
+ </td>
+ <td>
+ <input type="text" value="{$HOT_id}" name="HOT_id">
+ </td>
+ </tr>
+ </table>
+ <p align="right">
+ <input type="submit" name="HotPlugSave" value="{t}save{/t}">
+ <input type="submit" name="HotPlugCancel" value="{t}Cancel{/t}">
+ </p>
diff --git a/plugins/personal/environment/kioskManagement.tpl b/plugins/personal/environment/kioskManagement.tpl
--- /dev/null
@@ -0,0 +1,24 @@
+<h2><img alt="" src="images/house.png" align="middle"> {t}Kiosk profile management{/t}</h2>
+
+ <input type="hidden" name="dialogissubmitted" value="1">
+
+ <table summary="">
+ <tr>
+ <td>
+ <select style="width:350px;" size=8 name="gotoKioskProfile" {$gotoKioskProfileACL}>
+ {html_options values=$gotoKioskProfileKeys output=$gotoKioskProfiles}
+ <option disabled> </option>
+ </select><br>
+ <input type="file" name="newProfile" value="">
+ <input type="submit" name="profileAdd" value="{t}Add{/t}">
+ <input type="submit" name="profileDel" value="{t}Remove{/t}">
+ </td>
+ <td>
+ </td>
+ </tr>
+ </table>
+
+ <p align="right">
+ <input type="submit" name="KioskClose" value="{t}Close{/t}">
+ </p>
+
diff --git a/plugins/personal/environment/selectPrinterDialog.tpl b/plugins/personal/environment/selectPrinterDialog.tpl
--- /dev/null
@@ -0,0 +1,68 @@
+<h2><img alt="" src="images/house.png" align="middle"> {t}Select hotplug entry{/t}</h2>
+
+ <input type="hidden" name="dialogissubmitted" value="1">
+
+ <table summary="">
+ <tr>
+ <td width="50%">
+ <select style="width:350px;" size=20 name="gotoPrinter">
+ {html_options values=$gotoPrinterKeys output=$gotoPrinters}
+ <option disabled> </option>
+ </select><br>
+ </td>
+ <td>
+ <div class="contentboxh">
+ <p class="contentboxh"><img src="{$infoimage}" align="right" alt="[i]">{t}Information{/t}</p>
+ </div>
+ <div class="contentboxb">
+ <p class="contentboxb">
+ {t}This menu allows you to create, edit and delete selected users.
+ Having a great number of users, you may want to use the range selectors on top of the user list.{/t}
+ </p>
+ </div>
+ <br>
+
+ <div class="contentboxh">
+ <p class="contentboxh"><img src="{$launchimage}" align="right" alt="[F]">{t}Filters{/t}</p>
+ </div>
+ <div class="contentboxb">
+ <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+ <tr>
+ <td width="50%">
+ <img alt="" src="{$tree_image}" align=middle> {t}Display groups of department{/t}
+ </td>
+ <td>
+ <select name="depselectPrinter" size=1 onChange="mainform.submit()" title="{t}Choose the department the search will be based on{/t}">
+ {html_options options=$deplistPrinter selected=$depselectPrinter}
+ </select>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="contentboxb">
+ <table summary="" style="width:100%;border-top:1px solid #B0B0B0;">
+ {$alphabet}
+ </table>
+ <table summary="" width="100%" style="border-top:1px solid #B0B0B0;">
+ <tr>
+ <td>
+ <LABEL for='filter'><img alt="Search" src="{$search_image}" align="middle" title="{t}Display users matching{/t}">
+ </LABEL>
+ </td>
+ <td width="99%">
+ <input id='filter' style='width:99%' type='text' name='regexPrinter' maxlength='20' value='{$regexPrinter}'
+ title='{t}Regular expression for matching user names{/t}' onChange="mainform.submit()">
+ </td>
+ </tr>
+ </table>
+ {$apply}
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ <p align="right">
+ <input type="submit" name="PrinterSave" value="{t}Use{/t}">
+ <input type="submit" name="PrinterCancel" value="{t}Cancel{/t}">
+ </p>
+