diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc
index e8735a43571e9cb5f988053d31ed549565b2043a..1acd7d6fa5e0b22a47124e9b4789c925a6411969 100644 (file)
if (isset($_POST['edit_cancel']) && is_object($this->devicetabs)){
$this->remove_lock();
$this->devicetabs= NULL;
- session::un_set('objectinfo');
+ set_object_info();
}
}
unset ($this->devicetabs);
$this->devicetabs= NULL;
- session::un_set('objectinfo');
+ set_object_info();
}else{
/* Reinitialize tab */
/* Check locking, save current plugin in 'back_plugin', so
the dialog knows where to return. */
if (($user= get_lock($this->dn)) != ""){
- return(gen_locked_message ($user, $this->dn));
+ return(gen_locked_message ($user, $this->dn,TRUE));
}
/* Lock the current entry, so everyone will get the
/* Register devicetabs to trigger edit dialog */
$this->devicetabs= new devicetabs($this->config,$this->config->data['TABS']['DEVICETABS'], $this->dn,"devices");
$this->devicetabs->set_acl_base($this->dn);
- session::set('objectinfo',$this->dn);
+ set_object_info($this->dn);
}
/* Delete device canceled? */
if (isset($_POST['delete_cancel'])){
$this->remove_lock();
- session::un_set('objectinfo');
+ set_object_info();
}
/* Show tab dialog if object is present */
$display= $this->devicetabs->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->devicetabs->by_object[$this->devicetabs->current]->dialog){
+
+ if(($this->devicetabs instanceOf tabs || $this->devicetabs instanceOf plugin) && $this->devicetabs->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->devicetabs->by_object[$this->devicetabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
$display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";