summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e5dc50)
raw | patch | inline | side by side (parent: 1e5dc50)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Dec 2008 13:33:22 +0000 (13:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Dec 2008 13:33:22 +0000 (13:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13099 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
index 6635ee07189251e8d3a722e6fc15dc8335123013..634d863c9d3fb7e2e7d8d488c62901703b37b32e 100644 (file)
/* 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
$display= $this->ogroup->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->ogroup->by_object[$this->ogroup->current]->dialog){
+ if(($this->ogroup instanceOf tabs || $this->ogroup instanceOf plugin) && $this->ogroup->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->ogroup->by_object[$this->ogroup->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";
{
if (isset($this->apptabs->dn)){
del_lock ($this->apptabs->dn);
- }
- if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+ }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
del_lock($this->dn);
}
if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc
index 78ec8dede967db3de03095669ac666ad1e540fdb..a8959a121096714a9bc8d63082bb03c41e4d8b1d 100644 (file)
/* 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
if (!$this->apptabs->by_object[$this->apptabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
- if(isset($this->apptabs->FAIstate) && !preg_match("/freeze/i",$this->apptabs->FAIstate)){
+ if(($this->apptabs instanceOf tabs || $this->apptabs instanceOf plugin) && $this->apptabs->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif(isset($this->apptabs->FAIstate) && !preg_match("/freeze/i",$this->apptabs->FAIstate)){
$display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";
if ($this->dn != "new"){
{
if (isset($this->apptabs->dn)){
del_lock ($this->apptabs->dn);
- }
- if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+ }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
del_lock($this->dn);
}
if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc
index e8735a43571e9cb5f988053d31ed549565b2043a..7f2e02171774b5512d865770bea1a5deb55cc8de 100644 (file)
/* 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
$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";
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
index d41c7b95879bf22ab114c41c74d937dbe16dbb77..397e0bee188e999fb033a9e293039d898f97d67c 100644 (file)
/* 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
$display= $this->mimetabs->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->mimetabs->by_object[$this->mimetabs->current]->dialog){
+
+ if(($this->mimetabs instanceOf tabs || $this->mimetabs instanceOf plugin) && $this->mimetabs->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->mimetabs->by_object[$this->mimetabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
if(isset($this->mimetabs->FAIstate) && !preg_match("/freeze/i",$this->mimetabs->FAIstate)){
{
if (isset($this->mimetabs->dn)){
del_lock ($this->mimetabs->dn);
- }
- if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+ }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
del_lock($this->dn);
}
if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 40d58f000f3e72d06a2c9a62b782e56288d3f624..17b1667fef80d3cf5f3da6f4b489f818289b56cc 100644 (file)
/* 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));
}
/* Find out more about the object type */
if(!class_available("ArpNewDeviceTabs")){
msg_dialog::display(_("Error"), msgPool::class_not_found("ArpNewDevice"), ERROR_DIALOG);
}else{
+ add_lock ($this->dn, $this->ui->dn);
$this->systab = new ArpNewDeviceTabs($this->config,$this->config->data['TABS']['ARPNEWDEVICETABS'],$this->dn);
}
}elseif($type == "NewDevice"){
if(!class_available("SelectDeviceType")){
msg_dialog::display(_("Error"), msgPool::class_not_found("SelectDeviceType"), ERROR_DIALOG);
}else{
+ add_lock ($this->dn, $this->ui->dn);
$this->system_activation_object= array($this->dn);
$this->systab = new SelectDeviceType($this->config,$this->dn) ;
if(!class_available($tabclass)){
msg_dialog::display(_("Error"), msgPool::class_not_found($tabclass), ERROR_DIALOG);
}else{
+ add_lock ($this->dn, $this->ui->dn);
$this->systab= new $tabclass($this->config, $this->config->data['TABS'][$class], $this->dn,$acl_cat);
$this->systab->set_acl_base($this->dn);
session::set('objectinfo',$this->dn);
- add_lock ($this->dn, $this->ui->dn);
}
}else{
msg_dialog::display(_("Error"), _("Editing this type of object is not supported yet!"), ERROR_DIALOG);
$dialog = TRUE;
}
- if (!$dialog){
+ if(($this->systab instanceOf tabs || $this->systab instanceOf plugin) && $this->systab->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$dialog){
$display.= "<p style=\"text-align:right\">\n";
$display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";
{
if (isset($this->systab->dn)){
del_lock ($this->systab->dn);
- }
- if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+ }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
del_lock($this->dn);
}
if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc
index a2f37eb50779665f6898b3c4ab5c76f52f2eed51..39c030953e4a79ce799e8324b8c5019c19a2298d 100644 (file)
$this->by_object[$tab['CLASS']]->parent= &$this;
$this->by_object[$tab['CLASS']]->set_acl_category($category);
+ $this->read_only |= $this->by_object[$tab['CLASS']]->read_only;
/* Initialize current */
if ($this->current == ""){