Added 'go' as hidden input fields to all of the forms in the room editor
[citadel.git] / webcit / static / t / room / edit / tab_expire.html
index 20b152fe835f87e272b3a62a232b33e30f598adf..a030d0b9fd1884a3848994a896dd9664ebf27230 100644 (file)
@@ -1,7 +1,8 @@
-<div class="tabcontent">
+<?!("COND:THISROOM:EDIT", 1)><div class="tabcontent">
        <br />
        <form method="post" action="set_room_policy">
                <input type="hidden" name="nonce" value="<?NONCE>" />
+               <input type="hidden" name="go" value="<?ROOM:INFO:PRINT_NAME("X")>">
                <table border="0" cellspacing="5">
                        <tr>
                                <td>
                                        <?ROOMNAME("X")>
                                </td>
                                <td>
-                                       <input type="radio" name="roompolicy" value="0" %s />&nbsp;
-                                               ((roompolicy == 0) ? "CHECKED" : "") );
+                                       <input type="radio" name="roompolicy" value="0" <?%("COND:EXPIRE:MODE", 1, #"roompolicy", #"EXPIRE_NEXTLEVEL" , 'checked="checked"',"")>/>&nbsp;
                                        <?_("Use the default policy for this floor")>&nbsp;
                                        <br />
-                                       <input type="radio" name="roompolicy" value="1" <?%("COND:EXPIRE:MODE", 1, #"mailboxespolicy", #"EXPIRE_MANUAL", 'checked="checked"',"")> />&nbsp;
+                                       <input type="radio" name="roompolicy" value="1" <?%("COND:EXPIRE:MODE", 1, #"roompolicy", #"EXPIRE_MANUAL", 'checked="checked"',"")> />&nbsp;
                                        <?_("Never automatically expire messages")>
                                        <br />
-                                       <input type="radio" name="roompolicy" value="2" <?%("COND:EXPIRE:MODE", 2, #"mailboxespolicy", #"EXPIRE_NUMMSG", 'checked="checked"', "")> />&nbsp;
+                                       <input type="radio" name="roompolicy" value="2" <?%("COND:EXPIRE:MODE", 2, #"roompolicy", #"EXPIRE_NUMMSGS", 'checked="checked"', "")> />&nbsp;
                                        <?_("Expire by message count")>
                                        <br />
-                                       <input type="radio" name="roompolicy" value="3" <?%("COND:EXPIRE:MODE", 1, #"mailboxespolicy", #"EXPIRE_AGE", 'checked="checked"', "")> />&nbsp;
+                                       <input type="radio" name="roompolicy" value="3" <?%("COND:EXPIRE:MODE", 1, #"roompolicy", #"EXPIRE_AGE", 'checked="checked"', "")> />&nbsp;
                                        <?_("Expire by message age")>
                                        <br />
                                        <?_("Number of messages or days: ")>
-                                       <input type="text" name="roomvalue" maxlength="5" value="<?SERV:CFG("sitevalue")>" />
+                                       <input type="text" name="roomvalue" MAXLENGTH="5" value="<?EXPIRE:VALUE(#"roompolicy", #"EXPIRE_NUMMSGS")>">
                                </td>
                        </tr>
        
-                       <??("COND:AIDE", 2 ...)>        if (WC->axlevel >= 6) {
+                       <??("COND:AIDE", 2)>
                        <tr>
                                <td colspan="2"><hr /></td>
                        </tr>
                        <tr>
                                <td>
                                        <?_("Message expire policy for this floor")>
-                                       <br />(
-                                               escputs(floorlist[WC->CurRoom.floorid]);
+                                       <br />
+                                       <?THISROOM:FLOOR:NAME("X")>
                                </td>
                                <td>
-                                       <input type="radio" name="floorpolicy" value="0" %s>",
-                                               ((floorpolicy == 0) ? "CHECKED" : "") );
+                                       <input type="radio" name="floorpolicy" value="0" <?%("COND:EXPIRE:MODE", 1, #"floorpolicy", #"EXPIRE_NEXTLEVEL" , 'checked="checked"',"")>>&nbsp;
                                        <?_("Use the system default")>
                                        <br />
-                                       <input type="radio" name="floorpolicy" value="1" %s>",
-                                               ((floorpolicy == 1) ? "CHECKED" : "") );
+                                       <input type="radio" name="floorpolicy" value="1" <?%("COND:EXPIRE:MODE", 1, #"floorpolicy", #"EXPIRE_MANUAL", 'checked="checked"',"")> />&nbsp;
                                        <?_("Never automatically expire messages")>
                                        <br />
-                                       <input type="radio" name="floorpolicy" value="2" %s>",
-                                               ((floorpolicy == 2) ? "CHECKED" : "") );
+                                       <input type="radio" name="floorpolicy" value="2" <?%("COND:EXPIRE:MODE", 2, #"floorpolicy", #"EXPIRE_NUMMSGS", 'checked="checked"', "")> />&nbsp;
                                        <?_("Expire by message count")>
                                        <br />
-                                       <input type="radio" name="floorpolicy" value="3" %s>",
-                                               ((floorpolicy == 3) ? "CHECKED" : "") );
+                                       <input type="radio" name="floorpolicy" value="3" <?%("COND:EXPIRE:MODE", 1, #"floorpolicy", #"EXPIRE_AGE", 'checked="checked"', "")> />&nbsp;
                                        <?_("Expire by message age")>
                                        <br />
                                        <?_("Number of messages or days: ")>
-                                       <input type="text" name="floorvalue" MAXLENGTH="5" value="%d">",
-                                               floorvalue);
-                       <("X", 2)>      
+                                       <input type="text" name="floorvalue" MAXLENGTH="5" value="<?EXPIRE:VALUE(#"floorpolicy", #"EXPIRE_NUMMSGS")>">
+                                       </td>
+                               </tr>
+                       <??("X", 2)>    
                        <tr>
                                <td colspan="2">
                                        <hr />
@@ -68,8 +65,9 @@
                                                <input type="submit" name="cancel_button" value="<?_("Cancel")>" />
                                        </center>
                                </td>
-                       <tr>
+                       </tr>
                </table>
-               <input type="hidden" name="tab" value="expire" />
+               <input type="hidden" name="last_tabsel" value="<?TAB:N>" />
        </form>
 </div>
+<?!("X", 1)><??("COND:THISROOM:EDIT", 20)><div class="tabcontent"><?_("Higher access is required to access this function.")></div><??("X", 20)>