summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 096bd40)
raw | patch | inline | side by side (parent: 096bd40)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Oct 2008 13:41:06 +0000 (13:41 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Oct 2008 13:41:06 +0000 (13:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12620 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc | patch | blob | history | |
gosa-plugins/goto/admin/ogroups/goto/termgroup.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc b/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc
index 497a818453fe1736609281ec16347b5ba3aca0c5..7febba388d9efe13479059d2602518d37787aa60 100644 (file)
var $gotoMode = "locked";
var $gotoSyslogServer = "";
var $gotoNtpServer = array();
- var $gotoNtpServers = array();
+ var $gotoTerminalPath = array();
+ var $gotoSwapServer = array();
var $modes = array();
var $inheritTimeServer = true;
var $is_account = true;
# "sysinfo" => "sysinfo"
);
- var $attributes = array("gotoMode","gotoSyslogServer", "gotoNtpServer");
+ var $attributes = array("gotoMode","gotoSyslogServer", "gotoNtpServer", "gotoTerminalPath", "gotoSwapServer");
var $objectclasses = array("gotoWorkstationTemplate");
var $CopyPasteVars = array("gotoNtpServers","modes","inheritTimeServer","members");
var $view_logged = FALSE;
+ var $nfsservers = array();
+ var $swapservers = array();
+ var $member_of_ogroup= false;
function termgroup (&$config, $dn= NULL, $parent= NULL)
}
}
+ /* Get Share servers */
+ $tmp2 = array();
+ $tmp2['!']= _("Local swap");
+ foreach($this->config->data['SERVERS']['NBD'] as $server){
+ if($server != "default"){
+ $tmp2[$server]= $server;
+ }else{
+ if($this->member_of_ogroup){
+ $tmp2[$server]="["._("inherited")."]";
+ }
+ }
+ }
+ $this->swapservers= $tmp2;
+
+ $tmp2 = array();
+ foreach($this->config->data['SERVERS']['NFS'] as $server){
+ if($server != "default"){
+ $tmp2[$server]= $server;
+ }else{
+ if($this->member_of_ogroup){
+ $tmp2[$server]="["._("inherited")."]";
+ }
+ }
+ }
+ $this->nfsservers= $tmp2;
+
/* Set inherit checkbox state */
if(in_array("default",$this->gotoNtpServer)){
$this->inheritTimeServer = true;
/* Set government mode */
$smarty= get_smarty();
+ if (isset($this->parent->by_name['termstartup'])){
+ $smarty->assign("is_termgroup", "1");
+ } else {
+ $smarty->assign("is_termgroup", "0");
+ }
+
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translated) {
$smarty->assign($name."ACL",$this->getacl($name));
}
$smarty->assign("gotoNtpServers",$tmp);
+
+ $smarty->assign("nfsservers", $this->nfsservers);
+ $smarty->assign("swapservers", $this->swapservers);
+
$smarty->assign("syslogservers", $this->config->data['SERVERS']['SYSLOG']);
$smarty->assign("gotoSyslogServer_select", $this->gotoSyslogServer);
+ /* Variables */
+ foreach(array("gotoTerminalPath", "gotoSwapServer") as $val){
+ $smarty->assign($val."_select", $this->$val);
+ }
+
+
/* Show main page */
return ($smarty->fetch (get_template_path('termgroup.tpl', TRUE, dirname(__FILE__))));
}
"gotoMode" => _("Mode"),
"gotoSyslogServer" => _("Syslog server"),
"FAIstate" => _("Action flag"),
- "gotoNtpServer" => _("Ntp server"))
+ "gotoNtpServer" => _("Ntp server"),
+ "gotoTerminalPath" => _("Root server"),
+ "gotoSwapServer" => _("Swap server"))
));
}
diff --git a/gosa-plugins/goto/admin/ogroups/goto/termgroup.tpl b/gosa-plugins/goto/admin/ogroups/goto/termgroup.tpl
index 64c41588ac06331b15e47095745bb66f26eda283..af2d0a5d7484722fca129037fa7546633c838b27 100644 (file)
{/render}
</td>
</tr>
- </table>
+ {if $is_termgroup}
+ <tr>
+ <td><LABEL for="gotoTerminalPath">{t}Root server{/t}</LABEL></td>
+ <td>
+ {render acl=$gotoTerminalPathACL}
+ <select name="gotoTerminalPath" id="gotoTerminalPath" title="{t}Select NFS root filesystem to use{/t}">
+ {html_options options=$nfsservers selected=$gotoTerminalPath_select}
+ </select>
+ {/render}
+ </td>
+ </tr>
+ <tr>
+ <td><LABEL for="gotoSwapServer">{t}Swap server{/t}</LABEL></td>
+ <td>
+ {render acl=$gotoSwapServerACL}
+ <select name="gotoSwapServer" id="gotoSwapServer" title="{t}Choose NFS filesystem to place swap files on{/t}">
+ {html_options options=$swapservers selected=$gotoSwapServer_select}
+ </select>
+ {/render}
+ </td>
+ </tr>
+ {/if}
+ </table>
</td>
</tr>
<tr>