Fixed the missing chrome in the add/delete scripts screen
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 20 Mar 2012 05:46:58 +0000 (01:46 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 20 Mar 2012 05:46:58 +0000 (01:46 -0400)
webcit/sieve.c
webcit/static/t/sieve/list.html

index 52d68f7..d93fdcc 100644 (file)
@@ -420,6 +420,14 @@ void save_sieve(void) {
 }
 
 
+void display_sieve_add_or_delete(void) {
+       output_headers(1, 1, 2, 0, 0, 0);
+       do_template("sieve_add");
+       wDumpContent(1);
+}
+
+
+
 /*
  * create a new script
  * take the web environment script name and create it on the citadel server
@@ -444,9 +452,7 @@ void create_script(void) {
                }
        }
 
-       output_headers(1, 1, 1, 0, 0, 0);
-       do_template("sieve_add");
-       wDumpContent(1);
+       display_sieve_add_or_delete();
 }
 
 
@@ -458,9 +464,7 @@ void delete_script(void) {
 
        serv_printf("MSIV deletescript|%s", bstr("script_name"));
        serv_getln(buf, sizeof buf);
-       output_headers(1, 1, 1, 0, 0, 0);
-       do_template("sieve_add");
-       wDumpContent(1);
+       display_sieve_add_or_delete();
 }
 
 
@@ -952,4 +956,5 @@ InitModule_SIEVE
        WebcitAddUrlHandler(HKEY("save_sieve"), "", 0, save_sieve, 0);
        WebcitAddUrlHandler(HKEY("create_script"), "", 0, create_script, 0);
        WebcitAddUrlHandler(HKEY("delete_script"), "", 0, delete_script, 0);
+       WebcitAddUrlHandler(HKEY("display_sieve_add_or_delete"), "", 0, display_sieve_add_or_delete, 0);
 }
index e358a3d..c04625a 100644 (file)
@@ -73,7 +73,7 @@
                                <?ITERATE("SIEVE:SCRIPTS", ="sieve_list_select_one")>
                        </select>
                        &nbsp;&nbsp;&nbsp;
-                       <a href="do_template?template=sieve_add"><?_("Add or delete scripts")></a>
+                       <a href="display_sieve_add_or_delete"><?_("Add or delete scripts")></a>
                        <br>
                        <?ITERATE("SIEVE:SCRIPTS", ="sieve_display_one_script")>
                <??("X", 1)>