summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a65d85)
raw | patch | inline | side by side (parent: 3a65d85)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Sep 2006 06:37:25 +0000 (06:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Sep 2006 06:37:25 +0000 (06:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4564 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationService.inc | patch | blob | history | |
plugins/admin/systems/workstationService.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index dace6a70db4271815099acae74a9bdc38a0fded6..57f9ede7b0673bce6571e48715367fddadae9c8f 100644 (file)
/* Show main page */
$smarty= get_smarty();
+ /* Assign ACLs */
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translated){
+ $smarty->assign($name."ACL",$this->getacl($name));
+ }
+
+
/* Arrays */
foreach(array("XMethods", "XDrivers", "XResolutions", "XColordepths",
"XKbModels", "XKbVariants",
"gotoXKbVariant", "gotoXMouseType", "gotoXMouseport") as $val){
$smarty->assign($val."_select", $this->$val);
- $smarty->assign($val."ACL", chkacl($this->acl, $val));
}
/* Variables */
foreach(array("gotoXHsync", "gotoXVsync") as $val){
$smarty->assign($val, $this->$val);
- $smarty->assign($val."ACL", chkacl($this->acl, $val));
}
$smarty->assign("staticAddress", "");
/* Phone stuff */
$smarty->assign ("goFonHardware", $this->goFonHardware);
- $hl= "<select size=\"1\" name=\"goFonHardware\" title=\"".
- _("Choose the phone located at the current terminal")."\" ".
- chkacl($this->acl, "goFonHardware").">\n";
+
+ $perms = "";
+ if($this->acl_is_writeable("goFonHardware")){
+ $perms = " disabled ";
+ }
+
+ $hl= "<select size=\"1\" name=\"goFonHardware\" ".$perms." title=\"".
+ _("Choose the phone located at the current terminal")."\" >";
foreach ($this->hardware_list as $cn => $description){
if ($cn == $this->goFonHardware){
$selected= "selected";
$hl.= "</select>\n";
$smarty->assign ("hardware_list", $hl);
$smarty->assign ("gotoXMonitor", $this->gotoXMonitor);
- $smarty->assign("AutoSyncACL",chkacl($this->acl,"AutoSync"));
if($this->AutoSync){
$smarty->assign("AutoSyncCHK"," checked ");
/* Check vsync for correct usage */
$val= preg_replace ("/\s/", "", $this->gotoXVsync);
- if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)
- && chkacl ($this->acl, "gotoXVsync") == ""){
-
- $message[]= _("Please specify a valid VSync range.");
- } elseif (chkacl ($this->acl, "gotoXVsync") == ""){
- list($v1,$v2)= preg_split ("/[-+]/", $val);
- if ($v2 != ""){
- if ($v1 > $v2){
- $message[]= _("Please specify a valid VSync range.");
+
+ if($this->acl_is_writeable("gotoXVsync")){
+ if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
+ $message[]= _("Please specify a valid VSync range.");
+ } else{
+ list($v1,$v2)= preg_split ("/[-+]/", $val);
+ if ($v2 != ""){
+ if ($v1 > $v2){
+ $message[]= _("Please specify a valid VSync range.");
+ }
}
}
}
/* Check hsync for correct usage */
$val= preg_replace ("/\s/", "", $this->gotoXHsync);
- if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)
- && chkacl ($this->acl, "gotoXHsync") == ""){
-
- $message[]= _("Please specify a valid HSync range.");
- } elseif (chkacl ($this->acl, "gotoXHsync") == ""){
- list($v1,$v2)= preg_split ("/[-+]/", $val);
- if ($v2 != ""){
- if ($v1 > $v2){
- $message[]= _("Please specify a valid HSync range.");
+ if($this->acl_is_writeable("gotoXHsync")){
+ if (!preg_match ("/^\d+(\.\d+)?([-]\d+(\.\d+)?)?$/", $val)){
+ $message[]= _("Please specify a valid HSync range.");
+ } else{
+ list($v1,$v2)= preg_split ("/[-+]/", $val);
+ if ($v2 != ""){
+ if ($v1 > $v2){
+ $message[]= _("Please specify a valid HSync range.");
+ }
}
}
}
"gotoXColordepth" => _("Gfx color depth"),
"gotoXHsync" => _("Hsync"),
"gotoXVsync" => _("Vsync"),
+ "AutoSync" => _("Use DDC"),
"gotoScannerEnable" => _("Scanner enabled"),
"gotoXKbModel" => _("Keyboard model"),
"gotoXKbLayout" => _("Keyboard layout"),
diff --git a/plugins/admin/systems/workstationService.tpl b/plugins/admin/systems/workstationService.tpl
index b91d824fa6ac43bac6b1bc7f38f4981e5b159489..dafb6371847798c8f7295c7ec4e967cf90660f36 100644 (file)
<tr>
<td><LABEL for="gotoXKbModel">{t}Model{/t}</LABEL></td>
<td>
- <select id="gotoXKbModel" name="gotoXKbModel" title="{t}Choose keyboard model{/t}" {$gotoXKbModelACL}>
+
+{render acl=$gotoXKbModelACL}
+ <select id="gotoXKbModel" name="gotoXKbModel" title="{t}Choose keyboard model{/t}">
{html_options options=$XKbModels selected=$gotoXKbModel_select}
</select>
+{/render}
+
</td>
</tr>
<tr>
<td><LABEL for="gotoXKbLayout">{t}Layout{/t}</LABEL></td>
<td>
- <select id="gotoXKbLayout" name="gotoXKbLayout" title="{t}Choose keyboard layout{/t}" {$gotoXKbLayoutACL}>
+
+{render acl=$gotoXKbLayoutACL}
+ <select id="gotoXKbLayout" name="gotoXKbLayout" title="{t}Choose keyboard layout{/t}">
{html_options options=$XKbLayouts selected=$gotoXKbLayout_select}
</select>
+{/render}
+
</td>
</tr>
<tr>
<td><LABEL for="gotoXKbVariant">{t}Variant{/t}</LABEL></td>
<td>
- <select id="gotoXKbVariant" name="gotoXKbVariant" title="{t}Choose keyboard variant{/t}" {$gotoXKbVariantACL}>
+
+{render acl=$gotoXKbVariantACL}
+ <select id="gotoXKbVariant" name="gotoXKbVariant" title="{t}Choose keyboard variant{/t}">
{html_options options=$XKbVariants selected=$gotoXKbVariant_select}
</select>
+{/render}
+
</td>
</tr>
</table>
<tr>
<td><LABEL for="gotoXMouseType">{t}Type{/t}</LABEL></td>
<td>
- <select name="gotoXMouseType" id="gotoXMouseType" title="{t}Choose mouse type{/t}" {$gotoXMouseTypeACL}>
+
+{render acl=$gotoXMouseTypeACL}
+ <select name="gotoXMouseType" id="gotoXMouseType" title="{t}Choose mouse type{/t}">
{html_options options=$MouseTypes selected=$gotoXMouseType_select}
</select>
</td>
+{/render}
+
</tr>
<tr>
<td><LABEL for="gotoXMouseport">{t}Port{/t}</LABEL></td>
<td>
- <select id="gotoXMouseport" name="gotoXMouseport" title="{t}Choose mouse port{/t}" {$gotoXMouseportACL}>
+
+{render acl=$gotoXMouseportACL}
+ <select id="gotoXMouseport" name="gotoXMouseport" title="{t}Choose mouse port{/t}">
{html_options options=$MousePorts selected=$gotoXMouseport_select}
</select>
+{/render}
+
</td>
</tr>
</table>
<table style="width:100%" border=0 summary="">
<tr>
<td>{t}Telephone{/t}
+
+{render acl=$goFonHardwareACL}
{$hardware_list}
+{/render}
+
</td>
</tr>
</table>
<tr>
<td><LABEL for="gotoXDriver">{t}Driver{/t}</LABEL></td>
<td>
- <select id="gotoXDriver" name="gotoXDriver" title="{t}Choose graphic driver that is needed by the installed graphic board{/t}" {$gotoXDriverACL}>
+
+{render acl=$gotoXDriverACL}
+ <select id="gotoXDriver" name="gotoXDriver" title="{t}Choose graphic driver that is needed by the installed graphic board{/t}">
{html_options values=$XDrivers output=$XDrivers selected=$gotoXDriver_select}
</select>
+{/render}
+
</td>
</tr>
<tr>
<td><LABEL for="gotoXResolution">{t}Resolution{/t}</LABEL></td>
<td>
- <select id="gotoXResolution" name="gotoXResolution" title="{t}Choose screen resolution used in graphic mode{/t}" {$gotoXResolutionACL}>
+
+{render acl=$gotoXResolutionACL}
+ <select id="gotoXResolution" name="gotoXResolution" title="{t}Choose screen resolution used in graphic mode{/t}">
{html_options options=$XResolutions selected=$gotoXResolution_select}
</select>
+{/render}
+
</td>
</tr>
<tr>
<td><LABEL for="gotoXColordepth">{t}Color depth{/t}</LABEL></td>
<td>
- <select id="gotoXColordepth" name="gotoXColordepth" title="{t}Choose colordepth used in graphic mode{/t}" {$gotoXColordepthACL}>
+
+{render acl=$gotoXColordepthACL}
+ <select id="gotoXColordepth" name="gotoXColordepth" title="{t}Choose colordepth used in graphic mode{/t}">
{html_options options=$XColordepths selected=$gotoXColordepth_select}
</select>
+{/render}
+
</td>
</tr>
</table>
<td>{if $gotoXMonitor==""}{t}unknown{/t}{/if}{$gotoXMonitor}</td>
</tr>
<tr>
- <td><input type="checkbox" name="AutoSync" value="1" {$AutoSyncACL} {$AutoSyncCHK} onChange="changeState('gotoXHsync');changeState('gotoXVsync');"></td>
+ <td>
+
+{render acl=$AutoSyncACL}
+ <input type="checkbox" name="AutoSync" value="1" {$AutoSyncCHK} onChange="changeState('gotoXHsync');changeState('gotoXVsync');">
+{/render}
+
+ </td>
<td>{t}Use DDC for automatic detection{/t}</td>
</tr>
<tr>
<td><LABEL for="gotoXHsync">{t}HSync{/t}</LABEL></td>
- <td><input id="gotoXHsync" name="gotoXHsync" size=10 maxlength=60 {$gotoXHsyncACL} {$hiddenState}
- value="{$gotoXHsync}" title="{t}Horizontal refresh frequency for installed monitor{/t}"> kHz</td>
+ <td>
+
+{render acl=$gotoXHsyncACL}
+ <input id="gotoXHsync" name="gotoXHsync" size=10 maxlength=60 {$hiddenState}
+ value="{$gotoXHsync}" title="{t}Horizontal refresh frequency for installed monitor{/t}"> kHz
+{/render}
+
+ </td>
</tr>
<tr>
<td><LABEL for="gotoXVsync">{t}VSync{/t}</LABEL></td>
- <td><input id="gotoXVsync" name="gotoXVsync" size=10 maxlength=60 {$gotoXVsyncACL} {$hiddenState}
- value="{$gotoXVsync}" title="{t}Vertical refresh frequency for installed monitor{/t}"> Hz</td>
+ <td>
+
+{render acl=$gotoXVsyncACL}
+ <input id="gotoXVsync" name="gotoXVsync" size=10 maxlength=60 {$hiddenState}
+ value="{$gotoXVsync}" title="{t}Vertical refresh frequency for installed monitor{/t}"> Hz
+{/render}
+
+ </td>
</tr>
</table>
<h2><img class="center" alt="" align="middle" src="images/scanner.png"> {t}Scan device{/t}</h2>
- <input type=checkbox name="gotoScannerEnable" value="1" title="{t}Select to start SANE scan service on terminal{/t}" {$gotoScannerEnable} {$gotoScannerEnableACL}>
+
+{render acl=$gotoScannerEnableACL}
+ <input type=checkbox name="gotoScannerEnable" value="1" title="{t}Select to start SANE scan service on terminal{/t}" {$gotoScannerEnable}>
+{/render}
+
{t}Provide scan services{/t}
<br>
</td>