summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 173fd5a)
raw | patch | inline | side by side (parent: 173fd5a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Dec 2007 14:02:42 +0000 (14:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Dec 2007 14:02:42 +0000 (14:02 +0000) |
-Samba partily implemented
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8138 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8138 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/samba/class_sambaAccount.inc | patch | blob | history | |
gosa-core/plugins/personal/samba/samba3.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc
index bd71c8f7ae27eccddaee0e3891d5c1519dfc7e6e..61fc54a528bf0fa4f4d410a56d098fa6d317df41 100644 (file)
var $uid= "";
var $CopyPasteVars = array("kickoff_time_set","logoff_time_set","logon_time_set","mungedObject","orig_sambaDomainName");
+ var $multiple_support = TRUE;
+
function sambaAccount (&$config, $dn= NULL)
{
/* Load attributes depending on the samba version */
return ($display);
}
- /* Show tab dialog headers */
- $display= "";
- if ($this->parent !== NULL){
- if ($this->is_account){
- $display= $this->show_disable_header(_("Remove samba account"),
- _("This account has samba features enabled. You can disable them by clicking below."));
- } else {
- $obj= $this->parent->by_object['posixAccount'];
-
- /* Samba3 dependency on posix accounts are enabled
- in the moment, because I need to rely on unique
- uidNumbers. There'll be a better solution later
- on. */
- if ($obj->is_account){
+ $display ="";
+ if(!$this->multiple_support_active){
- $display= $this->show_enable_header(_("Create samba account"),
- _("This account has samba features disabled. You can enable them by clicking below."));
+ /* Show tab dialog headers */
+ $display= "";
+ if ($this->parent !== NULL){
+ if ($this->is_account){
+ $display= $this->show_disable_header(_("Remove samba account"),
+ _("This account has samba features enabled. You can disable them by clicking below."));
} else {
- $display= $this->show_enable_header(_("Create samba account"),
- _("This account has samba features disabled. Posix features are needed for samba accounts, enable them first."), TRUE);
+ $obj= $this->parent->by_object['posixAccount'];
+
+ /* Samba3 dependency on posix accounts are enabled
+ in the moment, because I need to rely on unique
+ uidNumbers. There'll be a better solution later
+ on. */
+ if ($obj->is_account){
+ $display= $this->show_enable_header(_("Create samba account"),
+ _("This account has samba features disabled. You can enable them by clicking below."));
+ } else {
+ $display= $this->show_enable_header(_("Create samba account"),
+ _("This account has samba features disabled. Posix features are needed for samba accounts, enable them first."), TRUE);
+ }
+ return ($display);
}
- return ($display);
}
}
}
}
+
+ foreach($this->attributes as $attr){
+ if(in_array($attr,$this->multi_boxes)){
+ $smarty->assign("use_".$attr,TRUE);
+ }else{
+ $smarty->assign("use_".$attr,FALSE);
+ }
+ }
+ foreach(array("allow_pwchange","tslogin","CtxWFHomeDir","CtxWFHomeDirDrive","CtxWFProfilePath",
+ "inherit","CtxWorkDirectory","CtxInitialProgram","CtxMaxConnectionTimeF","CtxMaxConnectionTime","CtxMaxDisconnectionTimeF",
+ "CtxMaxDisconnectionTime","CtxMaxIdleTimeF","CtxMaxIdleTime","connectclientdrives",
+ "onnectclientprinters","defaultprinter","shadow","brokenconn",
+ "reconn","allow_pwchange","connectclientprinters","no_password_required","temporary_disable",
+ "password_expires","logon_time_set","logoff_time_set","kickoff_time_set","SetSambaLogonHours",
+ "workstation_list") as $attr){
+ if(in_array($attr,$this->multi_boxes)){
+ $smarty->assign("use_".$attr,TRUE);
+ }else{
+ $smarty->assign("use_".$attr,FALSE);
+ }
+ }
+
/* Show main page */
+ $smarty->assign("multiple_support",$this->multiple_support_active);
if ($this->samba3){
$display.= $smarty->fetch (get_template_path('samba3.tpl', TRUE, dirname(__FILE__)));
} else {
"sambaUserWorkstations" => _("Allow connection from")))
);
}
+
+ function enable_multiple_support()
+ {
+ plugin::enable_multiple_support();
+ if($this->samba3){
+ $this->multiple_support_active = TRUE;
+ }else{
+ $this->multiple_support_active = FALSE;
+ }
+ }
+
+ function multiple_save_object()
+ {
+ $this->save_object();
+ plugin::multiple_save_object();
+ foreach(array("allow_pwchange","tslogin","CtxWFHomeDir","CtxWFHomeDirDrive","CtxWFProfilePath",
+ "inherit","CtxWorkDirectory","CtxInitialProgram","CtxMaxConnectionTimeF","CtxMaxConnectionTime","CtxMaxDisconnectionTimeF",
+ "CtxMaxDisconnectionTime","CtxMaxIdleTimeF","CtxMaxIdleTime","connectclientdrives",
+ "onnectclientprinters","defaultprinter","shadow","brokenconn",
+ "reconn","allow_pwchange","connectclientprinters","no_password_required","temporary_disable",
+ "password_expires","logon_time_set","logoff_time_set","kickoff_time_set","SetSambaLogonHours",
+ "workstation_list") as $attr){
+ if(isset($_POST["use_".$attr])){
+ $this->multi_boxes[] = $attr;
+ }
+ }
+ }
+
+ function multiple_execute()
+ {
+ return($this->execute());
+ }
+
+ function get_multi_edit_values()
+ {
+ $ret = plugin::get_multi_edit_values();
+
+ /* Terminal Server */
+ if(in_array("tslogin",$this->multi_boxes)){
+ $ret['tslogin'] = $this->mungedObject->getTsLogin();
+ }
+ if(in_array("CtxWFHomeDirDrive",$this->multi_boxes)){
+ $ret['CtxWFHomeDirDrive'] = $this->mungedObject->ctx['CtxWFHomeDirDrive'];
+ }
+ if(in_array("CtxWFHomeDir",$this->multi_boxes)){
+ $ret['CtxWFHomeDir'] = $this->mungedObject->ctx['CtxWFHomeDir'];
+ }
+ if(in_array("CtxWFProfilePath",$this->multi_boxes)){
+ $ret['CtxWFProfilePath'] = $this->mungedObject->ctx['CtxWFProfilePath'];
+ }
+
+ if(in_array("inherit",$this->multi_boxes)){
+ $ret['inherit'] = $this->mungedObject->getInheritMode();
+ }
+ if(in_array("CtxInitialProgram",$this->multi_boxes)){
+ $ret['CtxInitialProgram'] = $this->mungedObject->ctx['CtxInitialProgram'];
+ }
+ if(in_array("CtxWorkDirectory",$this->multi_boxes)){
+ $ret['CtxWorkDirectory'] = $this->mungedObject->ctx['CtxWorkDirectory'];
+ }
+
+ /* Time Limits. Be careful here, there are some negations */
+ if(in_array("CtxMaxConnectionTimeF",$this->multi_boxes)){
+ $ret["CtxMaxConnectionTimeF"] = !$this->mungedObject->getCtxMaxConnectionTimeF();
+ if(!$ret["CtxMaxConnectionTimeF"]){
+ $ret["CtxMaxConnectionTime"] = $this->mungedObject->ctx['CtxMaxConnectionTime'];
+ }
+ }
+ if(in_array("CtxMaxDisconnectionTimeF",$this->multi_boxes)){
+ $ret["CtxMaxDisconnectionTimeF"]= !$this->mungedObject->getCtxMaxDisconnectionTimeF();
+ if(!$ret["CtxMaxDisconnectionTimeF"]){
+ $ret["CtxMaxDisconnectionTime"]= $this->mungedObject->ctx['CtxMaxDisconnectionTime'];
+ }
+ }
+ if(in_array("CtxMaxIdleTimeF",$this->multi_boxes)){
+ $ret["CtxMaxIdleTimeF"] = !$this->mungedObject->getCtxMaxIdleTimeF();
+ if(!$ret["CtxMaxIdleTimeF"]){
+ $ret["CtxMaxIdleTime"] = $this->mungedObject->ctx['CtxMaxIdleTime'];
+ }
+ }
+
+ /* Client Devices */
+ if(in_array("connectclientdrives",$this->multi_boxes)){
+ $ret["connectclientdrives"] = $this->mungedObject->getConnectClientDrives();
+ }
+ if(in_array("connectclientprinters",$this->multi_boxes)){
+ $ret["connectclientprinters"] = $this->mungedObject->getConnectClientPrinters();
+ }
+ if(in_array("defaultprinter",$this->multi_boxes)){
+ $ret["defaultprinter"] = $this->mungedObject->getDefaultPrinter();
+ }
+
+ /* Misc */
+ if(in_array("shadow",$this->multi_boxes)){
+ $ret["shadow"] =$this->mungedObject->getShadow();
+ }
+ if(in_array("brokenconn",$this->multi_boxes)){
+ $ret["brokenconn"]=$this->mungedObject->getBrokenConn();
+ }
+ if(in_array("reconn",$this->multi_boxes)){
+ $ret["reconn"] =$this->mungedObject->getReConn();
+ }
+
+ print_a($ret);
+ return($ret);
+ }
+
+ function set_multi_edit_values($values)
+ {
+ plugin::set_multi_edit_values($values);
+
+ /* Enable disabled terminal login, this is inverted somehow */
+ if(isset($values['tslogin'])) $this->mungedObject->setTsLogin(!$values['tslogin']);
+
+ /* Imherit client configuration */
+ if(isset($values['inherit'])) $this->mungedObject->setInheritMode($values['inherit']);
+
+ /* Get all ctx values posted */
+ $ctx = array("CtxWFHomeDirDrive","CtxWFHomeDir","CtxWFProfilePath","CtxInitialProgram","CtxWorkDirectory",
+ "CtxMaxConnectionTime","CtxMaxDisconnectionTime","CtxMaxIdleTime");
+ foreach($ctx as $attr){
+ if(isset($values[$attr])){
+ $this->mungedObject->ctx[$attr] = $values[$attr] ;
+ }
+ }
+
+ if(isset($values['CtxMaxConnectionTimeF'])) $this->mungedObject->setCtxMaxConnectionTimeF($values['CtxMaxConnectionTimeF']);
+ if(isset($values['CtxMaxDisconnectionTimeF']))$this->mungedObject->setCtxMaxDisconnectionTimeF($values['CtxMaxDisconnectionTimeF']);
+ if(isset($values['CtxMaxIdleTimeF'])) $this->mungedObject->setCtxMaxIdleTimeF($values['CtxMaxIdleTimeF']);
+
+ if(isset($values['connectclientdrives'])) $this->mungedObject->setConnectClientDrives($values['connectclientdrives']);
+ if(isset($values['connectclientprinters'])) $this->mungedObject->setConnectClientPrinters($values['connectclientprinters']);
+ if(isset($values['defaultprinter'])) $this->mungedObject->setDefaultPrinter($values['defaultprinter']);
+
+ if(isset($values['shadow'])) $this->mungedObject->setShadow($values['shadow'],$values['shadow']);
+ if(isset($values['brokenconn'])) $this->mungedObject->setBrokenConn($values['brokenconn'],$values['brokenconn']);
+ if(isset($values['reconn'])) $this->mungedObject->setReConn($values['reconn'],$values['reconn']);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/gosa-core/plugins/personal/samba/samba3.tpl b/gosa-core/plugins/personal/samba/samba3.tpl
index 251cf53545f92393928c92f6c2b172b17f287c9e..6dbd266d4d255f8350362a07e682cef5a6cae124 100644 (file)
<tr>
<td><label for="sambaHomePath">{t}Home directory{/t}</label></td>
<td>
-{render acl=$sambaHomePathACL}
+{render acl=$sambaHomePathACL checkbox=$multiple_support checked=$use_sambaHomePath}
<input id="sambaHomePath" name="sambaHomePath" size=30 maxlength=60 value="{$sambaHomePath}">
{/render}
-{render acl=$sambaHomeDriveACL}
+{render acl=$sambaHomeDriveACL checkbox=$multiple_support checked=$use_sambaHomeDrive}
<select size="1" name="sambaHomeDrive">
<option disabled> </option>
{html_options values=$drives output=$drives selected=$sambaHomeDrive}
<tr>
<td><label for="sambaDomainName">{t}Domain{/t}</label></td>
<td>
-{render acl=$sambaDomainNameACL}
+{render acl=$sambaDomainNameACL checkbox=$multiple_support checked=$use_sambaDomainName}
<select id="sambaDomainName" size="1" name="sambaDomainName">
{html_options values=$domains output=$domains selected=$sambaDomainName}
</select>
<tr>
<td><label for="">{t}Script path{/t}</label></td>
<td>
-{render acl=$sambaLogonScriptACL}
+{render acl=$sambaLogonScriptACL checkbox=$multiple_support checked=$use_sambaLogonScript}
<input id="sambaLogonScript" name="sambaLogonScript" size=35 maxlength=60 value="{$sambaLogonScript}">
{/render}
</td>
<tr>
<td><label for="">{t}Profile path{/t}</label></td>
<td>
-{render acl=$sambaProfilePathACL}
- <input id="sambaProfilePath" name="sambaProfilePath" size=35 maxlength=60 value="{$sambaProfilePath}">
+{render acl=$sambaProfilePathACL checkbox=$multiple_support checked=$use_sambaProfilePath}
+ <input class="center" id="sambaProfilePath" name="sambaProfilePath" size=35 maxlength=60 value="{$sambaProfilePath}">
{/render}
</td>
</tr>
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=0 border=0>
<tr>
<td style="vertical-align:top;width:50%">
-{render acl=$AllowLoginOnTerminalServerACL}
- <input type=checkbox name="tslogin" id="tslogin" value="1" {$tslogin}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_tslogin}
+ <input class="center" type=checkbox name="tslogin" id="tslogin" value="1" {$tslogin}
onclick="
changeState('CtxWFHomeDir');
changeState('CtxWFHomeDirDrive');
<tr>
<td><label for="CtxWFHomeDir">{t}Home directory{/t}</label></td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxWFHomeDir}
<input id="CtxWFHomeDir" name="CtxWFHomeDir" size=30 maxlength=60 value="{$CtxWFHomeDir}" {$tsloginstate}>
{/render}
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxWFHomeDirDrive}
<select size="1" id="CtxWFHomeDirDrive" name="CtxWFHomeDirDrive" {$tsloginstate}>
<option disabled> </option>
{html_options values=$drives output=$drives selected=$CtxWFHomeDirDrive}
<tr>
<td><label for="CtxWFProfilePath">{t}Profile path{/t}</label></td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxWFProfilePath}
<input id="CtxWFProfilePath" name="CtxWFProfilePath" size=35 maxlength=60 value="{$CtxWFProfilePath}" {$tsloginstate}>
{/render}
</td>
</td>
<td style="vertical-align:top;">
-{render acl=$AllowLoginOnTerminalServerACL}
- <input type=checkbox id="inherit" name="inherit" {if $inheritstate} checked {/if}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_inherit}
+ <input class="center" type=checkbox id="inherit" name="inherit" {if $inheritstate} checked {/if}
onClick="changeState('CtxInitialProgram');
changeState('CtxWorkDirectory');"
<tr>
<td><label for="CtxInitialProgram">{t}Initial program{/t}</label></td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxInitialProgram}
<input id="CtxInitialProgram" name="CtxInitialProgram" size=35 maxlength=60 value="{$CtxInitialProgram}" {$inheritstate}>
{/render}
</td>
<tr>
<td><label for="CtxWorkDirectory">{t}Working directory{/t}</label></td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxWorkDirectory}
<input id="CtxWorkDirectory" name="CtxWorkDirectory" size=35 maxlength=60 value='{$CtxWorkDirectory}' {$inheritstate}>
{/render}
</td>
<table summary="">
<tr>
<td>
+<input type="checkbox" name="use_CtxMaxConnectionTimeF" {if $use_CtxMaxConnectionTimeF} checked {/if}
+ onClick="changeState('CtxMaxConnectionTimeF');" class="center"
+ >
{render acl=$AllowLoginOnTerminalServerACL}
- <input id="CtxMaxConnectionTimeF" type=checkbox name="CtxMaxConnectionTimeF"
+ <input id="CtxMaxConnectionTimeF" type="checkbox" class="center" name="CtxMaxConnectionTimeF"
+ {if !$use_CtxMaxConnectionTimeF} disabled {/if}
value="1" {$CtxMaxConnectionTimeF}
onclick="changeState('CtxMaxConnectionTime')" {$tsloginstate}>
{/render}
</tr>
<tr>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
- <input id="CtxMaxDisconnectionTimeF" type=checkbox name="CtxMaxDisconnectionTimeF" value="1" {$CtxMaxDisconnectionTimeF} onclick="changeState('CtxMaxDisconnectionTime')" {$tsloginstate}>
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxMaxDisconnectionTimeF}
+ <input id="CtxMaxDisconnectionTimeF" type=checkbox name="CtxMaxDisconnectionTimeF" value="1" {$CtxMaxDisconnectionTimeF} onclick="changeState('CtxMaxDisconnectionTime')" {$tsloginstate} class="center">
{/render}
<label for="CtxMaxDisconnectionTimeF">{t}Disconnection{/t}</label>
</td>
</tr>
<tr>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
- <input id="CtxMaxIdleTimeF" type=checkbox name="CtxMaxIdleTimeF" value="1" {$CtxMaxIdleTimeF} onclick="changeState('CtxMaxIdleTime')" {$tsloginstate}>
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_CtxMaxIdleTimeF}
+ <input id="CtxMaxIdleTimeF" type=checkbox name="CtxMaxIdleTimeF" value="1" {$CtxMaxIdleTimeF} onclick="changeState('CtxMaxIdleTime')" {$tsloginstate} class="center">
{/render}
<label for="CtxMaxIdleTimeF">{t}IDLE{/t}</label>
</td>
<table summary="">
<tr>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
- <input id="connectclientdrives" type=checkbox name="connectclientdrives" value="1" {$connectclientdrives} {$tsloginstate}>
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_connectclientdrives}
+ <input id="connectclientdrives" type=checkbox name="connectclientdrives" value="1" {$connectclientdrives} {$tsloginstate} class="center">
{/render}
<label for="connectclientdrives">{t}Connect client drives at logon{/t}</label>
</td>
</tr>
<tr>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
- <input id="connectclientprinters" type=checkbox name="connectclientprinters" value="1" {$connectclientprinters}{$tsloginstate}>
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_connectclientprinters}
+ <input id="connectclientprinters" type=checkbox name="connectclientprinters" value="1" {$connectclientprinters}{$tsloginstate} class="center">
{/render}
<label for="connectclientprinters">{t}Connect client printers at logon{/t}</label>
</td>
</tr>
<tr>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
- <input id="defaultprinter" type=checkbox name="defaultprinter" value="1" {$defaultprinter}>
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_defaultprinter}
+ <input id="defaultprinter" type=checkbox name="defaultprinter" value="1" {$defaultprinter} class="center">
{/render}
<label for="defaultprinter">{t}Default to main client printer{/t}</label>
</td>
<label for="shadow">{t}Shadowing{/t}</label>
</td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_shadow}
<select id="shadow" size="1" name="shadow" >
{html_options options=$shadow selected=$shadowmode}
</select>
<tr>
<td><label for="brokenconn">{t}On broken or timed out{/t}</label></td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_brokenconn}
<select id="brokenconn" size="1" name="brokenconn">
{html_options options=$brokenconn selected=$brokenconnmode}
</select>
<tr>
<td><label for="reconn">{t}Reconnect if disconnected{/t}</label></td>
<td>
-{render acl=$AllowLoginOnTerminalServerACL}
+{render acl=$AllowLoginOnTerminalServerACL checkbox=$multiple_support checked=$use_reconn}
<select id="reconn" size="1" name="reconn">
{html_options options=$reconn selected=$reconnmode}
</select>
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=4 border=0>
<tr>
<td style="width:50%; vertical-align:top;">
-{render acl=$sambaPwdCanChangeACL}
- <input id="allow_pwchange" type=checkbox name="allow_pwchange" value="1" {$flagsP}>
+{render acl=$sambaPwdCanChangeACL checkbox=$multiple_support checked=$use_allow_pwchange}
+ <input id="allow_pwchange" type=checkbox name="allow_pwchange" value="1" {$flagsP} class="center">
{/render}
<label for="allow_pwchange">{t}Allow user to change password from client{/t}</label>
<br>
-{render acl=$sambaAcctFlagsNACL}
- <input id="no_password_required" type=checkbox name="no_password_required" value="1" {$flagsN}>
+{render acl=$sambaAcctFlagsNACL checkbox=$multiple_support checked=$use_no_password_required}
+ <input id="no_password_required" type=checkbox name="no_password_required" value="1" {$flagsN} class="center">
{/render}
<label for="no_password_required">{t}Login from windows client requires no password{/t}</label>
<br>
-{render acl=$sambaAcctFlagsLACL}
- <input id="temporary_disable" type=checkbox name="temporary_disable" value="1" {$flagsD}>
+{render acl=$sambaAcctFlagsLACL checkbox=$multiple_support checked=$use_temporary_disable}
+ <input id="temporary_disable" type=checkbox name="temporary_disable" value="1" {$flagsD} class="center">
{/render}
<label for="temporary_disable">{t}Lock samba account{/t}</label>
<br>
-{render acl=$sambaPwdMustChangeACL}
- <input id="password_expires" type=checkbox name="password_expires" value="1" {$flagsC}>
+{render acl=$sambaPwdMustChangeACL checkbox=$multiple_support checked=$use_password_expires}
+ <input id="password_expires" type=checkbox name="password_expires" value="1" {$flagsC} class="center">
{/render}
<label for="password_expires">{t}Password expires on{/t}</label>
-{render acl=$sambaPwdMustChangeACL}
+{render acl=$sambaPwdMustChangeACL}
<select name=day onChange="createResult(this.form,this.form.sambaPwdMustChange);">
{html_options values=$days output=$days selected=$day}
</select>
{/render}
-{render acl=$sambaPwdMustChangeACL}
+{render acl=$sambaPwdMustChangeACL}
<select name=month onChange="populate(this.form,this.form.sambaPwdMustChange);">
{html_options options=$months selected=$month}
</select>
{/render}
-{render acl=$sambaPwdMustChangeACL}
+{render acl=$sambaPwdMustChangeACL}
<select name=year onChange="populate(this.form,this.form.sambaPwdMustChange);">
{html_options values=$years output=$years selected=$year}
</select>
{/render}
<br>
-{render acl=$sambaLogonTimeACL}
- <input id="logon_time_set" type=checkbox name="logon_time_set" value="1" {$flagsT}>
+{render acl=$sambaLogonTimeACL checkbox=$multiple_support checked=$use_logon_time_set}
+ <input id="logon_time_set" type=checkbox name="logon_time_set" value="1" {$flagsT} class="center">
{/render}
<label for="logon_time_set">{t}Limit Logon Time{/t}</label>
{render acl=$sambaLogonTimeACL}
</select>
{/render}
<br>
-{render acl=$sambaLogoffTimeACL}
- <input id="logoff_time_set" type=checkbox name="logoff_time_set" value="1" {$flagsO}>
+{render acl=$sambaLogoffTimeACL checkbox=$multiple_support checked=$use_logoff_time_set}
+ <input id="logoff_time_set" type=checkbox name="logoff_time_set" value="1" {$flagsO} class="center">
{/render}
<label for="logoff_time_set">{t}Limit Logoff Time{/t}</label>
{render acl=$sambaLogoffTimeACL}
{/render}
<br>
-{render acl=$sambaKickoffTimeACL}
- <input id="kickoff_time_set" type=checkbox name="kickoff_time_set" value="1" {$flagsK}>
+{render acl=$sambaKickoffTimeACL checkbox=$multiple_support checked=$use_kickoff_time_set}
+ <input id="kickoff_time_set" type=checkbox name="kickoff_time_set" value="1" {$flagsK} class="center">
{/render}
<label for="kickoff_time_set">{t}Account expires after{/t}</label>
{render acl=$sambaKickoffTimeACL}
<input type="hidden" name="sambaLogoffTime" value="{$sambaLogoffTime}">
<input type="hidden" name="sambaKickoffTime" value="{$sambaKickoffTime}">
<br>
-{render acl=$sambaLogonHoursACL mode=read_active}
+{render acl=$sambaLogonHoursACL mode=read_active checkbox=$multiple_support checked=$use_SetSambaLogonHours}
{t}Samba logon times{/t} <input type='submit' name='SetSambaLogonHours' value='{t}Edit settings...{/t}'>
{/render}
<td style="vertical-align:top;">
<label for="workstation_list">{t}Allow connection from these workstations only{/t}</label>
<br>
+
+{if $multiple_support}
+ <input type="checkbox" name="use_workstation_list" {if $use_workstation_list} checked {/if} class="center"
+ onClick="changeState('workstation_list');">
+{/if}
{render acl=$sambaUserWorkstationsACL}
- <select id="workstation_list" style="width:100%;" name="workstation_list[]" size=10 multiple>
+ <select {if $multiple_support && !$use_workstation_list} disabled {/if} id="workstation_list" style="width:100%;" name="workstation_list[]" size=10 multiple>
{html_options values=$workstations output=$workstations}
</select>
{/render}