summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d43dd32)
raw | patch | inline | side by side (parent: d43dd32)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 28 Oct 2005 07:34:39 +0000 (07:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 28 Oct 2005 07:34:39 +0000 (07:34 +0000) |
Save PPD when printer is saved.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1714 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1714 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index b883023405c5654d2f4e6d670fbe3dc4ae460b9e..1e66617693e9ad6fab2a6872fd45951dae6ca5a5 100644 (file)
var $AdminMemberKeys =array();
var $is_terminalBased = false;
+
+ var $PPDdialogToSave = NULL;
var $member =array();
var $strings = "";
}
if(isset($_POST['EditDriver'])){
- $this->dialog = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
+ if($this->PPDdialogToSave){
+ $this->dialog = $this->PPDdialogToSave;
+ }else{
+ $this->dialog = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
+ }
}
if(isset($_POST['PrinterCancel'])){
}
if(isset($_POST['RemoveDriver'])){
-
$this->gotoPrinterPPD = array();
+ $this->PPDdialogToSave = NULL;
}
if(isset($_POST['SavePPD'])){
$this->gotoPrinterPPD = array();
$this->gotoPrinterPPD = $this->dialog->save();
+ $this->PPDdialogToSave = $this->dialog;
unset($this->dialog);
$this->dialog=NULL;
}
if (!$this->is_account){
return;
}
-
+
+ if($this->PPDdialogToSave){
+ $this->PPDdialogToSave->save_ppd();
+ }
+
$dn= $this->dn;
plugin::save();
$ldap= $this->config->get_ldap_link();
diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc
index f3675f554977e2691ba099d73a9b0f958a5ca644..b5547fff8d403e7e6deff08c8ed2867bbac5d670 100644 (file)
}
}
+
+ function save_ppd(){
+ $this->ppdManager->saveProperties($this->selectedPPD['link'],$this->ppdConfig);
+ }
/* Save to LDAP */
function save()
{
/* return the selected PPD, and in future the selected options too */
- $this->ppdManager->saveProperties($this->selectedPPD['link'],$this->ppdConfig);
return($this->selectedPPD['link']);
}
/* Add attributes of the current category */
foreach($obj as $attr => $settings){
-
+
+
/* Skip all entries beginning with _ */
if($attr[0] == "_") continue;
/* Get all values */
foreach( $settings as $vname => $value){
if($vname[0] != "_"){
- $values[$vname]= $vname;
+ $values[$vname]= $value;
}
}
diff --git a/plugins/admin/systems/printerPPDDialog.tpl b/plugins/admin/systems/printerPPDDialog.tpl
index 5b8a8a5f878bd6aa6ecef2b799047bdb6af2fbaf..9a68fc43ba5c10bc3c3a8cb2e4eb1d149328cdbf 100644 (file)
<br>
<h2><img src="images/house.png"> {t}Options{/t}</h2>
{$properties}
-<p class="seperator"> </p>
-<br>
-<input type="hidden" name="PPDDisSubmitted" value="1">
-<input type="submit" name="SavePPD" value="{t}Save{/t}">
-<input type="submit" name="ClosePPD" value="{t}Close{/t}">
+<p class="plugbottom">
+ <input type="hidden" name="PPDDisSubmitted" value="1">
+ <input type="submit" name="SavePPD" value="{t}Use{/t}">
+ <input type="submit" name="ClosePPD" value="{t}Close{/t}">
+</p>
diff --git a/plugins/admin/systems/printerPPDSelectionDialog.tpl b/plugins/admin/systems/printerPPDSelectionDialog.tpl
index 5b913ccac1780ef41d4b611a628ed89318a13d9d..defe4ea643b62eb0eed1a4c970162065a632a37d 100644 (file)
</tr>
</table>
{$apply}
+
+ </div>
+ <br>
+ <br>
+ <div class="contentboxh" style="height:20px;">
+ <p class="contentboxh" style="font-size:12px">
+ <img src="{$launchimage}" align="right" alt="[U]">
+ <b>{t}Upload new PPD file{/t}</b>
+ </p>
+ </div>
+ <div class="contentboxb">
+ <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+ <tr>
+ <td >
+ <img alt="" src="{$tree_image}" align=middle>
+ {t}Select the PPD file you want to upload.{/t}
+ </td>
+ </tr>
+ </table>
+ <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+ <tr>
+ <td >
+ <input type="file" value="" name="PPDUpload">
+ </td>
+ </tr>
+ </table>
+ <div align="right">
+ <table summary="" style="border-top: 1px solid rgb(176, 176, 176); background: rgb(238, 238, 238) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;" width="100%"><tbody><tr><td align="right" width="100%">
+ <input type="submit" value="{t}Upload{/t}"></td></tr></tbody></table>
+ </div>
</div>
</td>
</tr>
</table>
<p class="plugbottom">
-<input type="submit" name="SavePPDSelection" value="{t}Use{/t}">
+<input type="submit" name="SavePPDSelection" value="{t}Select{/t}">
<input type="submit" name="ClosePPDSelection" value="{t}Close{/t}">
</p>