瀏覽代碼

HTML standards compliance fixes.

pull/24/head
Ben Kurtovic 11 年之前
父節點
當前提交
b0d51b3b0d
共有 1 個檔案被更改,包括 54 行新增52 行删除
  1. +54
    -52
      pages/settings.mako

+ 54
- 52
pages/settings.mako 查看文件

@@ -9,62 +9,64 @@
% endif
<h1>Settings</h1>
<p>This page contains some configurable options for the copyvio detector. Settings are saved as cookies. You can view and delete all cookies generated by this site at the bottom of this page.</p>
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="set">
<table>
<tr>
<td>Default site:</td>
<td>
<tt>http://</tt>
<select name="lang">
<% selected_lang = cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\
% for code, name in langs:
% if code == selected_lang:
<option value="${code | h}" selected="selected">${name}</option>
% else:
<option value="${code | h}">${name}</option>
% endif
% endfor
</select>
<tt>.</tt>
<select name="project">
<% selected_project = cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\
% for code, name in projects:
% if code == selected_project:
<option value="${code | h}" selected="selected">${name}</option>
% else:
<option value="${code | h}">${name}</option>
% endif
% endfor
</select>
<tt>.org</tt>
</td>
</tr>
<%
background_options = [
("plain", "Use a plain tiled background (default)."),
("potd", 'Use the current <a href="//commons.wikimedia.org/">Wikimedia Commons</a> <a href="//commons.wikimedia.org/wiki/Commons:Picture_of_the_day">Picture of the Day</a>, unfiltered. Certain POTDs may be unsuitable as backgrounds due to their aspect ratio or subject matter (generally portraits do not work well).'),
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset of previous Commons Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily.'),
]
selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "plain"
%>\
% for i, (value, desc) in enumerate(background_options):
<div id="settings-form">
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="set"/>
<table>
<tr>
% if i == 0:
<td>Background:</td>
% else:
<td>&nbsp;</td>
% endif
<td>Default site:</td>
<td>
<input type="radio" name="background" value="${value}" ${'checked' if value == selected else ''} /> ${desc}
<tt>http://</tt>
<select name="lang">
<% selected_lang = cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\
% for code, name in langs:
% if code == selected_lang:
<option value="${code | h}" selected="selected">${name}</option>
% else:
<option value="${code | h}">${name}</option>
% endif
% endfor
</select>
<tt>.</tt>
<select name="project">
<% selected_project = cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\
% for code, name in projects:
% if code == selected_project:
<option value="${code | h}" selected="selected">${name}</option>
% else:
<option value="${code | h}">${name}</option>
% endif
% endfor
</select>
<tt>.org</tt>
</td>
</tr>
% endfor
<tr>
<td><button type="submit">Save</button></td>
</tr>
</table>
</form>
<%
background_options = [
("plain", "Use a plain tiled background (default)."),
("potd", 'Use the current <a href="//commons.wikimedia.org/">Wikimedia Commons</a> <a href="//commons.wikimedia.org/wiki/Commons:Picture_of_the_day">Picture of the Day</a>, unfiltered. Certain POTDs may be unsuitable as backgrounds due to their aspect ratio or subject matter (generally portraits do not work well).'),
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset of previous Commons Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily.'),
]
selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "plain"
%>\
% for i, (value, desc) in enumerate(background_options):
<tr>
% if i == 0:
<td>Background:</td>
% else:
<td>&nbsp;</td>
% endif
<td>
<input type="radio" name="background" value="${value}" ${'checked="checked"' if value == selected else ''} /> ${desc}
</td>
</tr>
% endfor
<tr>
<td><button type="submit">Save</button></td>
</tr>
</table>
</form>
</div>
<h2>Cookies</h2>
% if cookies:
<table>


Loading…
取消
儲存