summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f05ef0e)
raw | patch | inline | side by side (parent: f05ef0e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Oct 2008 07:08:10 +0000 (07:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Oct 2008 07:08:10 +0000 (07:08 +0000) |
-Updated fixed message if no ppdPath is configured.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12757 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12757 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/ppd/printerPPDDialog.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc b/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc
index 244129c6f861cbb66d926e72c24e3878fe8e0414..b9ffea9037e098a1a4a05431c66be9d6f057f33a 100644 (file)
$this->pathToPPD = "";
}
+ /* Check if ppdPath is set in gosa.conf.
+ */
+ if(empty($this->pathToPPD)){
+ msg_dialog::display(_("Configuration error"), msgPool::invalidConfigurationAttribute("ppdPath"), ERROR_DIALOG);
+ }
+
/* It seams that we have an existing PPD path, so go on */
if(!((!is_dir($this->pathToPPD))||(empty($this->pathToPPD)))){
$smarty= get_smarty();
$smarty->assign("ppdString", _("Can't get ppd informations."));
$smarty->assign("showOptions", "");
+ $smarty->assign("path_valid", TRUE);
+
+ if(empty($this->ppdPath)){
+
+ /* Print out template */
+ $smarty->assign("path_valid", FALSE);
+ $display.= $smarty->fetch(get_template_path('printerPPDDialog.tpl', TRUE,dirname(__FILE__)));
+ return($display);
+ }
/* Check these paths */
$paths = array($this->pathToPPD, $this->pathToPPD.$this->pathToModified);
diff --git a/gosa-plugins/goto/admin/systems/ppd/printerPPDDialog.tpl b/gosa-plugins/goto/admin/systems/ppd/printerPPDDialog.tpl
index c80d6c308defb0185df2dc318981e55b76498b86..8cafc3b26323dc540a825f1da90a2d6b2b0c028d 100644 (file)
<h2><img alt="P" class="center" src="plugins/systems/images/select_printer.png" align="middle"> {t}Printer driver{/t}</h2>
-<table summary="" width="100%">
- <tr>
- <td width="50%" style="vertical-align:top">
- {t}Model{/t}: <i>{$ppdString}</i>
- <input type="submit" name="SelectPPD" value="{t}Select{/t}">
- </td>
- <td style="border-left: 1px solid rgb(160, 160, 160);padding-left:10px;">
- {t}New driver{/t}
- <input type="file" value="" name="NewPPDFile">
- <input type="submit" name="SubmitNewPPDFile" value="{t}Upload{/t}">
- </td>
- </tr>
-</table>
-{if $showOptions eq 1}
-<p class="seperator"> </p>
-<h2><img alt="L" class="center" src="images/lists/on.png" align="middle"> {t}Options{/t}</h2>
-{$properties}
+{if !$path_valid}
+<p>
+ <b>{msgPool type=invalidConfigurationAttribute param=ppdPath}</b>
+</p>
+{else}
+ <table summary="" width="100%">
+ <tr>
+ <td width="50%" style="vertical-align:top">
+ {t}Model{/t}: <i>{$ppdString}</i>
+ <input type="submit" name="SelectPPD" value="{t}Select{/t}">
+ </td>
+ <td style="border-left: 1px solid rgb(160, 160, 160);padding-left:10px;">
+ {t}New driver{/t}
+ <input type="file" value="" name="NewPPDFile">
+ <input type="submit" name="SubmitNewPPDFile" value="{t}Upload{/t}">
+ </td>
+ </tr>
+ </table>
+ {if $showOptions eq 1}
+ <p class="seperator"> </p>
+ <h2><img alt="L" class="center" src="images/lists/on.png" align="middle"> {t}Options{/t}</h2>
+ {$properties}
+ {/if}
{/if}
<p class="plugbottom">
<input type="hidden" name="PPDDisSubmitted" value="1">
+ {if $path_valid}
<input type="submit" name="SavePPD" value="{msgPool type=applyButton}">
+ {/if}
<input type="submit" name="ClosePPD" value="{msgPool type=cancelButton}">
</p>