summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1061068)
raw | patch | inline | side by side (parent: 1061068)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Jan 2010 23:02:55 +0000 (23:02 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Jan 2010 23:02:55 +0000 (23:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15483 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc | patch | blob | history | |
gosa-plugins/samba/admin/systems/samba/wingeneric.tpl | patch | blob | history |
diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc
index 6a907f6a0f0d0b12845845650b537e7d490cd681..029b6ca3e8f58c3ca461732b539276ee40452555 100644 (file)
var $orig_cn;
var $orig_base;
+ var $baseSelector;
/* attribute list for save action */
var $ignore_account= TRUE;
$this->orig_dn= $this->dn;
$this->orig_base= $this->base;
$this->orig_cn= $this->cn;
+
+ /* Instanciate base selector */
+ $this->baseSelector= new baseSelector($this->get_allowed_bases(), $this->base);
+ $this->baseSelector->setSubmitButton(false);
+ $this->baseSelector->setHeight(300);
+ $this->baseSelector->update(true);
}
return($display);
}
- /* Base select dialog */
- $once = true;
- foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once){
- $once = false;
- $this->dialog = new baseSelectDialog($this->config,$this);
- $this->dialog->setCurrentBase($this->base);
- }
- }
-
- /* Dialog handling */
- if(is_object($this->dialog)){
- /* Must be called before save_object */
- $this->dialog->save_object();
-
- if($this->dialog->isClosed()){
- $this->dialog = false;
- }elseif($this->dialog->isSelected()){
-
- /* A new base was selected, check if it is a valid one */
- $tmp = $this->get_allowed_bases();
- if(isset($tmp[$this->dialog->isSelected()])){
- $this->base = $this->dialog->isSelected();
- }
-
- $this->dialog= false;
- }else{
- return($this->dialog->execute());
- }
- }
-
/* Fill templating stuff */
$smarty= get_smarty();
- $smarty->assign("bases" , $this->get_allowed_bases());
+ $smarty->assign("usePrototype", "true");
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translated){
$smarty->assign("$attr", $this->$attr);
}
- $smarty->assign("base_select", $this->base);
+ $smarty->assign("base", $this->baseSelector->render());
/* Show main page */
$str = $this->netConfigDNS->execute();
$this->netConfigDNS->save_object();
- /* Set new base if allowed */
- $tmp = $this->get_allowed_bases();
- if(isset($_POST['base'])){
- if(isset($tmp[$_POST['base']])){
- $this->base= $_POST['base'];
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)){
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base= $this->baseSelector->getBase();
+ $this->is_modified= TRUE;
}
}
+
}
diff --git a/gosa-plugins/samba/admin/systems/samba/wingeneric.tpl b/gosa-plugins/samba/admin/systems/samba/wingeneric.tpl
index 5d6bfa859b7913826fa57f92dd36464128bd7d73..5e00fa98ebb7fa0fdd6243dbb8939f5656792a2c 100644 (file)
<td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
<td>
{render acl=$baseACL}
- <select id="base" size="1" name="base" title="{t}Choose subtree to place group in{/t}">
- {html_options options=$bases selected=$base_select}
- </select>
-{/render}
-
-{render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
- <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+{$base}
{/render}
</td>
</tr>