Permalink
Browse files

Fix Save button of global settings in webadmin.

In HTML one <form> can't be inside another one...
In XHTML it works...

Thanks to skydrome for reporting this.

Also I tried to fix listeners editor, as they used nested forms too...
But it seems that I messed up the whole table.

Let someone more skilled in HTML fix this broken layout.

At least buttons themselves work now.
  • Loading branch information...
1 parent 59fcc33 commit 5fbf528a49ea60b8e175fad16dd13d5b743aec39 @DarthGandalf DarthGandalf committed Apr 20, 2012
Showing with 186 additions and 60 deletions.
  1. +65 −60 modules/data/webadmin/tmpl/settings.tmpl
  2. +121 −0 webskins/_default_/pub/_default_.css
@@ -1,72 +1,77 @@
<? INC Header.tmpl ?>
-<form action="settings" method="post">
- <? INC _csrf_check.tmpl ?>
- <div class="section">
- <input type="hidden" name="submitted" value="1" />
-
- <h3>Listen Port(s)</h3>
- <div class="sectionbg">
- <div class="sectionbody">
- <div class="subsection">
- <div>
+<div class="section">
+
+ <h3>Listen Port(s)</h3>
+ <div class="sectionbg">
+ <div class="sectionbody">
+ <div class="subsection">
+ <div class="listeners">
+ <div class="listeners_header">
+ <div class="listeners_header1">Port</div>
+ <div class="listeners_header1">BindHost</div>
+ <div class="listeners_header1">SSL</div>
+ <div class="listeners_header1">IPv4</div>
+ <div class="listeners_header1">IPv6</div>
+ <div class="listeners_header1">IRC</div>
+ <div class="listeners_header1">Web</div>
+ <!--<td/>-->
+ </div>
+ <? LOOP ListenLoop ?>
+ <div class="listener_show <? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
+ <div class="listener_show_port"><? VAR Port ?></div>
+ <div class="listener_show_host"><? VAR BindHost DEFAULT=** ?></div>
+ <div class="listener_show_ssl">
+ <div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsSSL ?>checked="checked"<? ENDIF ?>/></div>
+ </div>
+ <div class="listener_show_ipv4">
+ <div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsIPV4 ?>checked="checked"<? ENDIF ?>/></div>
+ </div>
+ <div class="listener_show_ipv6">
+ <div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsIPV6 ?>checked="checked"<? ENDIF ?>/></div>
+ </div>
+ <div class="listener_show_irc">
+ <div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsIRC ?>checked="checked"<? ENDIF ?>/></div>
+ </div>
+ <div class="listener_show_web">
+ <div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsWeb ?>checked="checked"<? ENDIF ?>/></div>
+ </div>
+ <div class="listener_show_delete">
+ <? IF SuggestDeletion ?>
+ <form action="del_listener" method="post">
+ <? INC _csrf_check.tmpl ?>
+ <input name="host" type="hidden" value="<? VAR BindHost ?>"/>
+ <input name="port" type="hidden" value="<? VAR Port ?>"/>
+ <input name="ipv4" type="hidden" value="<? VAR IsIPV4 ?>"/>
+ <input name="ipv6" type="hidden" value="<? VAR IsIPV6 ?>"/>
+ <input type="submit" value="Del"/>
+ </form>
+ <? ENDIF ?>
+ </div>
+ </div>
+ <? ENDLOOP ?>
+ <div class="listener_add">
<form action="add_listener" method="post">
- <table>
- <thead>
- <tr>
- <td>Port</td>
- <td>BindHost</td>
- <td>SSL</td>
- <td>IPv4</td>
- <td>IPv6</td>
- <td>IRC</td>
- <td>Web</td>
- <td/>
- </tr>
- </thead>
- <tbody>
- <? LOOP ListenLoop ?>
- <tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
- <td><? VAR Port ?></td>
- <td><? VAR BindHost DEFAULT=** ?></td>
- <td><div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsSSL ?>checked="checked"<? ENDIF ?>/></div></td>
- <td><div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsIPV4 ?>checked="checked"<? ENDIF ?>/></div></td>
- <td><div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsIPV6 ?>checked="checked"<? ENDIF ?>/></div></td>
- <td><div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsIRC ?>checked="checked"<? ENDIF ?>/></div></td>
- <td><div class="checkbox"><input type="checkbox" disabled="disabled" <? IF IsWeb ?>checked="checked"<? ENDIF ?>/></div></td>
- <td>
- <? IF SuggestDeletion ?>
- <form action="del_listener" method="post">
- <? INC _csrf_check.tmpl ?>
- <input name="host" type="hidden" value="<? VAR BindHost ?>"/>
- <input name="port" type="hidden" value="<? VAR Port ?>"/>
- <input name="ipv4" type="hidden" value="<? VAR IsIPV4 ?>"/>
- <input name="ipv6" type="hidden" value="<? VAR IsIPV6 ?>"/>
- <input type="submit" value="Del"/>
- </form>
- <? ENDIF ?>
- </td>
- </tr>
- <? ENDLOOP ?>
- <tr>
- <? INC _csrf_check.tmpl ?>
- <td><input name="port" type="number" min="1" max="65535" class="number"/></td>
- <td><input name="host" type="text" value="*" class="third"/></td>
- <td><div class="checkbox"><input name="ssl" type="checkbox"/></div></td>
- <td><div class="checkbox"><input name="ipv4" type="checkbox" checked="checked"/></div></td>
- <td><div class="checkbox"><input name="ipv6" type="checkbox" checked="checked"/></div></td>
- <td><div class="checkbox"><input name="irc" type="checkbox" checked="checked"/></div></td>
- <td><div class="checkbox"><input name="web" type="checkbox" checked="checked"/></div></td>
- <td><input type="submit" value="Add"/></td>
- </tr>
- </tbody>
- </table>
+ <? INC _csrf_check.tmpl ?>
+ <div class="listener_add_port"><input name="port" type="number" min="1" max="65535" class="number"/></div>
+ <div class="listener_add_host"><input name="host" type="text" value="*" class="third"/></div>
+ <div class="listener_add_ssl"><div class="checkbox"><input name="ssl" type="checkbox"/></div></div>
+ <div class="listener_add_ipv4"><div class="checkbox"><input name="ipv4" type="checkbox" checked="checked"/></div></div>
+ <div class="listener_add_ipv6"><div class="checkbox"><input name="ipv6" type="checkbox" checked="checked"/></div></div>
+ <div class="listener_add_irc"><div class="checkbox"><input name="irc" type="checkbox" checked="checked"/></div></div>
+ <div class="listener_add_web"><div class="checkbox"><input name="web" type="checkbox" checked="checked"/></div></div>
+ <div class="listener_add_submit"><input type="submit" value="Add"/></div>
</form>
</div>
</div>
</div>
</div>
</div>
+</div>
+
+<form action="settings" method="post">
+ <? INC _csrf_check.tmpl ?>
+ <input type="hidden" name="submitted" value="1" />
<div class="section">
<h3>Settings</h3>
@@ -364,3 +364,124 @@ td {
.textsection p {
margin-bottom: 0.7em;
}
+
+.listeners {
+ display: table
+}
+
+.listeners_header {
+ display: table-row
+}
+
+.listeners_header1 {
+ display: table-cell
+}
+
+.listener_show {
+ display: table-row
+}
+
+.listener_show_port {
+ display: table-cell
+}
+
+.listener_show_host {
+ display: table-cell
+}
+
+.listener_show_ssl {
+ display: table-cell
+}
+
+.listener_show_ipv4 {
+ display: table-cell
+}
+
+.listener_show_ipv6 {
+ display: table-cell
+}
+
+.listener_show_irc {
+ display: table-cell
+}
+
+.listener_show_web {
+ display: table-cell
+}
+
+.listener_show_delete {
+ display: table-cell
+}
+
+.listener_add {
+ display: table-row
+}
+
+.listener_add_port {
+ display: table-cell
+}
+
+.listener_add_host {
+ display: table-cell
+}
+
+.listener_add_ssl {
+ display: table-cell
+}
+
+.listener_add_ipv4 {
+ display: table-cell
+}
+
+.listener_add_ipv6 {
+ display: table-cell
+}
+
+.listener_add_irc {
+ display: table-cell
+}
+
+.listener_add_web {
+ display: table-cell
+}
+
+.listener_add_submit {
+ display: table-cell
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

0 comments on commit 5fbf528

Please sign in to comment.