Code

Enabled JS warning for ServerService.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Dec 2007 07:59:07 +0000 (07:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Dec 2007 07:59:07 +0000 (07:59 +0000)
- If we try to leave the dialog without saving

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7971 594d385d-05f5-0310-b6e9-bd551577e9d8

ihtml/themes/default/MultiSelectWindow.tpl
include/class_MultiSelectWindow.inc
plugins/admin/systems/class_divListSystemService.inc

index 2e2d19e7923ed70b7a902adc3b539755d16845f5..e7ceae46b3b6a5658397283cdc66e238cfa2e2b8 100644 (file)
        </p>
 </div>
 {/if}
-
-<input type="hidden" name="menu_action" id='menu_action'>
+{if $IgnoreAccount}
 <input type="hidden" name="ignore">
+{/if}
+<input type="hidden" name="menu_action" id='menu_action'>
 <input type="hidden" name="MultiSelectWindow{$filterName}" value="1">
index 15284030deae7c68832939e63403b7ef6a1b62e7..f2be830346eab428ba3064d51f5c76ae3e72bcd6 100644 (file)
@@ -38,6 +38,8 @@ class MultiSelectWindow{
   var $SaveAdditionalVars = array();  // Additional Post vars to store 
   var $module= "";
 
+  var $IgnoreAccount = TRUE;
+
        function ClearElementsList()
        {
                $this->array_Elements = array();
@@ -307,6 +309,11 @@ class MultiSelectWindow{
     return("");
   }
 
+  function EnableJSLeaveMsg($ignore = TRUE)
+  {
+    $this->IgnoreAccount = !$ignore;
+  }
+
        /* Draw the list with all list elements and filters */
        function Draw()
        {
@@ -408,6 +415,7 @@ class MultiSelectWindow{
                $smarty->assign("Summary"                       , $this->string_Summary);
                $smarty->assign("Title"                         , $this->string_Title);
                $smarty->assign("Information"           , $this->string_Information);
+               $smarty->assign("IgnoreAccount"         , $this->IgnoreAccount);
 
                /* Check for exeeded sizelimit */
                $smarty->assign("hint"                          , print_sizelimit_warning());
index 15344f3b3290b00ae2abc934a54ccd9bdd02b94d..ca31601baef7452cc17630c936b0380d178daf4e 100644 (file)
@@ -12,6 +12,7 @@ class divListSystemService extends MultiSelectWindow
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
+    $this->EnableJSLeaveMsg(TRUE);
 
     /* Set list strings */
     $this->SetTitle(_("Installed services"));