Code

Added missing files
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Mar 2007 13:27:20 +0000 (13:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Mar 2007 13:27:20 +0000 (13:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5775 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_sieveElement_Else_Elsif.inc [new file with mode: 0644]
include/sieve/templates/add_element.tpl [new file with mode: 0644]

diff --git a/include/sieve/class_sieveElement_Else_Elsif.inc b/include/sieve/class_sieveElement_Else_Elsif.inc
new file mode 100644 (file)
index 0000000..10a454e
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/* Sieve else tag */
+class sieve_elsif extends sieve_if
+{
+  var $TYPE = "elsif";
+}
+
+class sieve_else
+{
+  var $object_id = -1;
+
+  function sieve_else($data,$object_id)
+  {
+    $this->object_id = $object_id;
+  }
+
+  function save_object()
+  {
+  }
+
+  function execute()
+  {
+    $smarty = get_smarty();
+    $smarty->assign("ID", $this->object_id);
+    $object_container = $smarty->fetch(get_template_path("templates/object_container_clear.tpl",TRUE,dirname(__FILE__)));
+    $object= $smarty->fetch(get_template_path("templates/element_else.tpl",TRUE,dirname(__FILE__)));
+    $str = preg_replace("/%%OBJECT_CONTENT%%/",$object,$object_container);
+    return($str);
+  }
+
+  function get_sieve_script_part()
+  {
+    return(" else ");
+  }
+}
+
+?>
diff --git a/include/sieve/templates/add_element.tpl b/include/sieve/templates/add_element.tpl
new file mode 100644 (file)
index 0000000..f007941
--- /dev/null
@@ -0,0 +1,14 @@
+<h2>{t}Add a new element{/t}</h2>
+{t}Please select the type of element you want to add{/t}
+<br>
+<select name='element_type'>
+       {html_options options=$element_types selected=$element_type }
+</select>
+
+<p class='seperator'>&nbsp;</p>
+<br>
+<div class='seperator' style='text-align:right; width:100%;'>
+    <input type='submit' name='select_new_element_type_cancel' value='{t}Abort{/t}'>
+       &nbsp;
+       <input type='submit' name='select_new_element_type' value='{t}Next{/t}'>
+</div>