summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 623e381)
raw | patch | inline | side by side (parent: 623e381)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Dec 2008 14:07:48 +0000 (14:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Dec 2008 14:07:48 +0000 (14:07 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13100 594d385d-05f5-0310-b6e9-bd551577e9d8
14 files changed:
index e022dcd4e2c42a6102aaed4add8e867e31203242..701ac804e4716445c39f5959c65f3225375453ed 100644 (file)
$cache = &session::get("LOCK_CACHE");
if(isset($cache['READ_ONLY'][$object])){
unset($cache['READ_ONLY'][$object]);
- //echo "Remove ".$object."<b> Skipped!</b>";
return;
}
}
- //echo "Remove ".$object."<b> Done!</b>";
-
/* Check for existance and remove the entry */
$ldap= $config->get_ldap_link();
$ldap->cd ($config->get_cfg_value("config"));
diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc
index 40711f61c05d3f569b0136e1104d73930c75cd06..430382fbf1c1e9db8e6e8440efd940bdcf8a273f 100644 (file)
/* Check locking, save current plugin in 'back_plugin', so
the dialog knows where to return. */
if (($acl= get_lock($this->dn)) != ""){
- return(gen_locked_message ($acl, $this->dn));
+ return(gen_locked_message ($acl, $this->dn,TRUE));
}
/* Lock the current entry, so everyone will get the above dialog */
/* Remove acl lock if a DN is marked as "currently edited" */
if (isset($this->acltabs->dn)){
del_lock ($this->acltabs->dn);
+ }else{
+ del_lock ($this->dn);
}
- del_lock ($this->dn);
del_lock ($this->dns);
}
index 4a652a849260ecef7bba52709d68df68f5ca51de..8f883795b2e2b9678b4ede9c294ae38f9a7645aa 100644 (file)
$this->by_object[$tab['CLASS']]->parent= &$this;
$this->by_object[$tab['CLASS']]->set_acl_category("acl");
+ $this->read_only |= $this->by_object[$tab['CLASS']]->read_only;
/* Initialize current */
if ($this->current == ""){
function execute()
{
$display= tabs::execute();
- if(!$this->by_object['acl']->dialog){
+ if($this->read_only){
+ $display.= "<p style=\"text-align:right\">\n";
+ $display.= " <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
+ $display.= "</p>";
+ }elseif(!$this->by_object['acl']->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-core/plugins/admin/acl/tabs_acl_role.inc b/gosa-core/plugins/admin/acl/tabs_acl_role.inc
index 4b8a211a2cf10a51def2a9475d3b1614cd41fefa..06303492f19189b7ffe1986afcec5f61e102fa80 100644 (file)
function execute()
{
$display= tabs::execute();
- if(!$this->by_object['aclrole']->dialog){
+ if($this->read_only){
+ $display.= "<p style=\"text-align:right\">\n";
+ $display.= " <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
+ $display.= "</p>";
+ }elseif(!$this->by_object['aclrole']->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-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index 7637f1c38e036cca01def98e5718a382c5cc0c51..96d0ec35353ec07806fea73388d8cc1535434178 100644 (file)
}else{
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 above dialog */
/* Show main page (tabs) */
$display= $this->deptabs->execute();
- if (!$this->deptabs->by_object[$this->deptabs->current]->dialog){
+ if(($this->deptabs instanceOf tabs || $this->deptabs instanceOf plugin) && $this->deptabs->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->deptabs->by_object[$this->deptabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
$display.= "<input type=submit name=\"edit_finish\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";
function remove_lock()
{
- if (isset($this->dn)){
- del_lock ($this->dn);
- }
if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
del_lock($this->dn);
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index e5f1bd8c6a3287afc75c055bbf8754e2bed563e2..1e4155283131d0880a24d94f4257e4b49f980ed2 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));
}
add_lock ($this->dn, $this->ui->dn);
$obj = $this->dialog->by_object[$this->dialog->current];
- if((isset($obj->is_dialog) && (!$obj->is_dialog)) || (isset($obj->dialog) && (!$obj->dialog))){
+ if(($this->dialog instanceOf tabs || $this->dialog instanceOf plugin) && $this->dialog->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif((isset($obj->is_dialog) && (!$obj->is_dialog)) || (isset($obj->dialog) && (!$obj->dialog))){
$display.= "<p style=\"text-align:right\">\n";
if(!$this->no_save){
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
index 5c23583e711d995cb1d4c7062fbf9502a1f31c10..865e7c7fe71571663bfb06f1890692348a31dad4 100644 (file)
$smarty->assign("types", array(BLOCK_LIST_SEND => _("send"), BLOCK_LIST_RECEIVE => _("receive")));
$smarty->assign("type", $this->type);
$smarty->assign("dn", $this->dn);
+ $smarty->assign("read_only",$this->read_only);
return($smarty->fetch(get_template_path('generic.tpl', TRUE)));
}
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
index 1346ab95c728dc15547a0c9034e5e74eb05e9b32..c2e5b3f1d57a70fe4c7c724f9739d21e1dd6b467 100644 (file)
$this->dn=$this->blocklists[$s_entry]['dn'];
if (($user= get_lock($this->dn)) != ""){
- return(gen_locked_message($user, $this->dn));
+ return(gen_locked_message($user, $this->dn,TRUE));
}else{
add_lock ($this->dn, $this->ui->dn);
}
diff --git a/gosa-plugins/gofax/gofax/blocklists/generic.tpl b/gosa-plugins/gofax/gofax/blocklists/generic.tpl
index 05056c67a3c68310c71a9e6e31740805614e7521..11e6b56e29f044bcaef192eb67aaf8ee251865ea 100644 (file)
</table>
<p class="plugbottom">
+ {if !$read_only}
<input type=submit name="edit_finish" style="width:80px" value="{msgPool type=okButton}">
{if $dn != "new"}
<input type=submit name="edit_apply" value="{msgPool type=applyButton}">
{/if}
+ {/if}
<input type=submit name="edit_cancel" value="{msgPool type=cancelButton}">
</p>
<input type='hidden' name='blocklist_posted' value="1">
diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc
index ffa0f2ec230e7d7950541d7b726c5e99344d02a3..97594a94fc2e58bf071351dbd4b0bacbce6088d9 100644 (file)
$this->dn= $this->conferences[$s_entry]['dn'];
if (($conf= get_lock($this->dn)) != ""){
- return(gen_locked_message ($conf, $this->dn));
+ return(gen_locked_message ($conf, $this->dn,TRUE));
}
/* Lock the current entry, so everyone will get the above dialog */
$display= $this->conftab->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->conftab->by_object[$this->conftab->current]->dialog){
+
+ if(($this->conftab instanceOf tabs || $this->conftab instanceOf plugin) && $this->conftab->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->conftab->by_object[$this->conftab->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";
*/
function remove_lock()
{
- if($this->dn) del_lock($this->dn);
- if(is_array($this->dns) && count($this->dns)) del_lock($this->dns);
- if(isset($this->conftab) && isset($this->conftab->dn)){
+ if($this->dn) {
+ del_lock($this->dn);
+ }elseif(isset($this->conftab) && isset($this->conftab->dn)){
del_lock ($this->conftab->dn);
}
+ if(is_array($this->dns) && count($this->dns)) del_lock($this->dns);
}
diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc
index 04cb48277e3ad6f23284d5e09d3a4534cbeb7357..4dc2f7c8618bdca61f536ae4957e936fab41629f 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->macrotabs->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->macrotabs->by_object[$this->macrotabs->current]->dialog){
+
+ if(($this->macrotabs instanceOf tabs || $this->macrotabs instanceOf plugin) && $this->macrotabs->read_only == TRUE){
+ $display.= "<p style=\"text-align:right\">
+ <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+ </p>";
+ }elseif (!$this->macrotabs->by_object[$this->macrotabs->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/systems/goto/tabs_printers.inc b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc
index a7d777d5ee03c8f7b0babb529e5c2a2fe18f3625..5b8eb259d729743fa5a97b67eae94d54302f2ba5 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 == ""){
diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc b/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc
index 86bee8ac0d111d0cc4517b4666f2052b280ed4b6..266566c2c288db64be8a34baf665080e1b7414bb 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 == ""){
diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc b/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc
index 517ed4bcf2f68d5e1dd019379ccbc3b89ee9623c..a84b5fcb9dc38f75bb01e1f1ad1fdb2d565ec24b 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 == ""){