Code

Added baseslect to blocklists
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 May 2006 07:44:28 +0000 (07:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 May 2006 07:44:28 +0000 (07:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3482 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofax/blocklists/generic.tpl

index bcb4c10d546157845430861da2345df283b9077f..f5f523e8e4d4cc6bc365305703fef5d4701ac5a8 100644 (file)
@@ -251,6 +251,31 @@ class blocklist extends plugin
 
     if($this->dn){
 
+      /* Base select dialog */
+      $once = true;
+      foreach($_POST as $name => $value){
+        if(preg_match("/^chooseBase/",$name) && $once){
+          $once = false;
+          $this->dialog = new baseSelectDialog($this->config);
+          $this->dialog->setCurrentBase($this->base);
+        }
+      }
+
+      /* Dialog handling */
+      if(is_object($this->dialog)){
+        /* Must be called before save_object */
+        $this->dialog->save_object();
+
+        if($this->dialog->isClosed()){
+          $this->dialog = false;
+        }elseif($this->dialog->isSelected()){
+          $this->base = $this->dialog->isSelected();
+          $this->dialog= false;
+        }else{
+          return($this->dialog->execute());
+        }
+      }
+
       /* Set base */
       if ($this->base == ""){
         if ($this->dn == "new"){
index d34a84df20f2f99b96d594924189812c242519a8..00e945a5302c52f47f4f473a54e92cbe7b0eac75 100644 (file)
         {html_options options=$bases selected=$base_select}
                <option disabled>&nbsp;</option>
        </select>
+        {if $selectmode == ""}
+            <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
+        {else}
+            <img src="images/folder_gray.png" class="center" title="{t}Select a base{/t}">
+        {/if}
       </td>
      </tr>
     </table>