summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5dc60e0)
raw | patch | inline | side by side (parent: 5dc60e0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Aug 2005 10:14:05 +0000 (10:14 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Aug 2005 10:14:05 +0000 (10:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1269 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history | |
plugins/admin/systems/printer.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 18a8e1b9b3be50fc64b132bf422b44a1dac1201c..61a0e71e3c1b17fdaeeced50bccd68cbb8b2a300 100644 (file)
var $UserMember ="";
var $UserMembers =array();
var $UserMemberKeys =array();
-
+
var $AdminMember ="";
var $AdminMembers =array();
var $AdminMemberKeys =array();
var $dialog =NULL;
/* attribute list for save action */
- var $attributes = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","macAddress", "ipHostNumber");
+ var $attributes = array("cn", "description", "l", "labeledURI", "macAddress", "ipHostNumber","gotoPrinterPPD");
var $objectclasses = array("top", "gotoPrinter");
function printgeneric ($config, $dn= NULL)
function execute()
{
+
$smarty= get_smarty();
$display="";
/* Template management.
$this->dialog = new selectUserToPrinterDialog($this->config, get_userinfo(),"AddAdminGroup");
}
+ if(isset($_POST['EditDriver'])){
+ $this->dialog = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
+ }
+
if(isset($_POST['PrinterCancel'])){
unset($this->dialog);
$this->dialog= NULL;
}
+ if(isset($_POST['SavePPD'])){
+ if(count($this->dialog->check())){
+ foreach($this->dialog->check() as $msg){
+ print_red($msg);
+ }
+ }else{
+ $this->gotoPrinterPPD = array();
+ $this->gotoPrinterPPD = $this->dialog->save();
+ unset($this->dialog);
+ $this->dialog=NULL;
+ }
+
+ }
+
+ if(isset($_POST['ClosePPD'])){
+ unset($this->dialog);
+ $this->dialog=NULL;
+ }
+
if((isset($_POST['DelUser']))&&(isset($_POST['UserMember']))){
if(isset($this->member['AddUser'][$_POST['UserMember']])){
unset($this->member['AddUser'][$_POST['UserMember']]);
/* Don't show Asterisk for non-required attribute ipHostNumber and macAddress */
$smarty->assign("staticAddress", "");
- $smarty->assign("driverInfo", "Not implemented yet");
+
+
+ require_once ("class_ppdManager.inc");
+ $ppdManager= new ppdManager('/var/spool/ppd/');
+ if(!empty($this->gotoPrinterPPD)){
+ $smarty->assign("driverInfo", $ppdManager->loadDescription($this->gotoPrinterPPD));
+ }else{
+ $smarty->assign("driverInfo", _("Undefined"));
+ }
$list=$this->generateList();
$userlist = array_merge($list['AddUser'],$list['AddGroup']);
index 6893d3c776a5326db597eb2911068fe0bec41240..c04020c5f086d3652f00160f403a096e5cc545d4 100644 (file)
<tr>
<td style="vertical-align:top; width:50%;">
{if $is_terminal ne 'true'}
+ <h2>{t}General{/t}</h2>
<table summary="">
<tr>
<td><LABEL for="cn" >{t}Printer name{/t}</LABEL>{$must}</td>
<tr>
<td colspan="2">
{/if}
+ <h2>{t}Details{/t}</h2>
<table summary="">
<tr>
<td><LABEL for="l">{t}Location{/t}</LABEL></td>
<td><LABEL for="labeledURI">{t}Printer URL{/t}</LABEL></td>
<td><input id="labeledURI" name="labeledURI" size=25 maxlength=80 value="{$labeledURI}"></td>
</tr>
+ </table>
+ <table summary="">
<tr>
- <td>{t}Driver{/t}:<br>{$driverInfo}<input type="submit" name="EditDriver" value="{t}Edit{/t}"></td>
-
+ <td>
+ <br>
+ {t}PPD{/t} : {$driverInfo}<br><input type="submit" name="EditDriver" value="{t}Edit{/t}">
+ </td>
</tr>
</table>
</td>
<p class="plugbottom" style="margin-bottom:0px; padding:0px;"> </p>
-{t}Permissions{/t}
+<h2>{t}Permissions{/t}</h2>
<table summary="" width="100%">
<tr>
<td>
<tr>
<td>
{t}Following objects are assigned as user.{/t}<br>
- <select size="1" name="UserMember" title="{t}Users{/t}" style="width:350px;height:200px;" size=10 multiple>
+ <select size="1" name="UserMember" title="{t}Users{/t}" style="width:350px;height:120px;" multiple>
{html_options options=$UserMembers values=$UserMemberKeys}
</select><br>
<input type="submit" value="Add user" name="AddUser">
<tr>
<td>
{t}Following objects are assigned as admin.{/t}<br>
- <select size="1" name="AdminMember" title="{t}Admins{/t}" style="width:350px;height:200px;" size=10 multiple>
+ <select size="1" name="AdminMember" title="{t}Admins{/t}" style="width:350px;height:120px;" multiple>
{html_options options=$AdminMembers values=$AdminMemberKeys}
</select><br>
<input type="submit" value="Add admin user" name="AddAdminUser">