summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c5cbb5)
raw | patch | inline | side by side (parent: 9c5cbb5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Oct 2010 12:37:23 +0000 (12:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Oct 2010 12:37:23 +0000 (12:37 +0000) |
-Allow to save and remove the install device extension
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20061 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20061 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc
index 0152524a372b5e3c8b3e32c83fabf1213be22fe4..e713dae40ae18522e7ebbe05c0dd124b1689901f 100644 (file)
}
// Save now
- tabs::save(TRUE);
+ tabs::save();
if($moveToUUID){
$this->dn = (empty($uuid)) ? $dnCn : $dnUuid;
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc
index 5bd3d58a7a2b4e7d064f4e3b6f3af6fd40175a7b..e2c1664a1611213b50648db77d6dbfd7e89a0926 100644 (file)
public $setKickstartRootPasswordHash = FALSE;
+ public $view_logged = FALSE;
+
+ public $ignore_account = FALSE;
+
private $installNTPServerList = NULL;
function __construct(&$config, $dn)
function execute()
{
+ // Log account access
+ if($this->is_account && !$this->view_logged){
+ $this->view_logged = TRUE;
+ new log("view","Device/".get_class($this),$this->dn);
+ }
+
+ /***************
+ Handle account state
+ ***************/
+
+ // Allow to add or remove the distribution list extension
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
+ }
+
+ // Show account status-changer
+ $display = "";
+ if ($this->parent !== NULL){
+ if ($this->is_account){
+ $display= $this->show_disable_header(_("Remove instal profile"),
+ msgPool::featuresEnabled(_("Install profile")));
+ } else {
+ $display= $this->show_enable_header(_("Add install profile"),
+ msgPool::featuresDisabled(_("Install profile")));
+ return ($display);
+ }
+ }
+
+ /***************
+ Root password hash dialog
+ ***************/
+
if($this->setKickstartRootPasswordHash){
$this->dialog = TRUE;
$smarty = get_smarty();
return($smarty->fetch(get_template_path('goto/Device/SetPassword.tpl', TRUE)));
}
+ /***************
+ Generate HTML content
+ ***************/
+
$this->installNTPServerList->setAcl($this->getacl('installNTPServer'));
$this->installNTPServerList->update();
$smarty->assign($attr, $this->$attr);
}
$this->dialog = false;
- return($smarty->fetch(get_template_path('goto/Device/InstallRecipe.tpl', TRUE)));
+ return($display.$smarty->fetch(get_template_path('goto/Device/InstallRecipe.tpl', TRUE)));
}
$this->installRootEnabled = ($this->installRootEnabled)?'TRUE':'FALSE';
$this->installTimeUTC = ($this->installTimeUTC)?'TRUE':'FALSE';
-
plugin::save();
+ unset($this->attrs['installConfigManagement']);
+ unset($this->attrs['installBootstrapMethod']);
+ echo "Skipp saving of 'installConfigManagement' and 'installBootstrapMethod', i've no idea where to store them.";
+
$this->cleanup();
$ldap=$this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
}
}
+
+ function remove_from_parent()
+ {
+ plugin::remove_from_parent();
+ unset($this->attrs['installConfigManagement']);
+ unset($this->attrs['installBootstrapMethod']);
+ echo "Skipp saving of 'installConfigManagement' and 'installBootstrapMethod', i've no idea where to store them.";
+
+ $ldap=$this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+ new log("remove","Device/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }else{
+ $this->handle_post_events("remove");
+ }
+
+ }
+
+
static function plInfo()
{
return (array(