summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 242f3de)
raw | patch | inline | side by side (parent: 242f3de)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 13:32:33 +0000 (13:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 13:32:33 +0000 (13:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19757 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/Device.tpl | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/Device.tpl b/gosa-plugins/goto/admin/systems/goto/Device/Device.tpl
index d4a3e45e900c05e9b2662bbb4bc79363c34583da..a722aa08ef944a1913d710c1b5b6731a2cfe654b 100644 (file)
{/render}
</td>
</tr>
+ <tr>
+ <td>
+ <div style="height:10px;"> </div>
+ {t}Base{/t}
+ </td>
+ <td>
+ <div style="height:10px;"> </div>
+ {render acl=$baseACL}
+ {$base}
+ {/render}
+ </td>
+ </tr>
</table>
<hr>
<table>
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc
index a6a8a42fa46e7bd40fb12855a792fcbc467c0d31..b333c5a42de42f23a0a7529b88716bdd1a7d6151 100644 (file)
plugin::plugin($config, $dn);
$this->base = $this->config->current['BASE'];
$this->orig_dn = $this->dn;
+
+ // Prepare the base selector
+ $this->baseSelector= new baseSelector($this->get_allowed_bases(), $this->base);
+ $this->baseSelector->setSubmitButton(false);
+ $this->baseSelector->setHeight(300);
+ $this->baseSelector->update(true);
}
// Assign just user names instead of the complete dn.
$smarty->assign("owner_name", $this->getUserName($this->owner));
$smarty->assign("manager_name", $this->getUserName($this->manager));
+ $smarty->assign("base", $this->baseSelector->render());
+ // Assign attribute values
foreach($this->attributes as $attr){
$smarty->assign($attr, $this->$attr);
}
// Regenerate a new uuid
if(isset($_POST['reloadUUID'])) $this->deviceUUID = $this->genFakeUuid();
+
+ // Update the 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;
+ }
+ }
+
}
"description" => _("Device"),
"objectClass" => "Device")),
"plProvidedAcls" => array(
+ "base" => _("Base"),
"cn" => _("Name"),
"serialNumber" => _("Serial number"),
"seeAlso" => _("See also"),