瀏覽代碼

Use cookies to store default site.

pull/24/head
Ben Kurtovic 12 年之前
父節點
當前提交
066dc9504f
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. +2
    -2
      pages/copyvios.mako
  2. +1
    -1
      pages/settings.mako

+ 2
- 2
pages/copyvios.mako 查看文件

@@ -12,7 +12,7 @@
<td>
<tt>http://</tt>
<select name="lang">
<% selected_lang = query.orig_lang if query.orig_lang else bot.wiki.get_site().lang %>
<% selected_lang = query.orig_lang if query.orig_lang else cookies["EarwigDefaultLang"].value if "EarwigDefaultLang" in cookies else bot.wiki.get_site().lang %>
% for code, name in all_langs:
% if code == selected_lang:
<option value="${code}" selected="selected">${name}</option>
@@ -23,7 +23,7 @@
</select>
<tt>.</tt>
<select name="project">
<% selected_project = query.project if query.project else bot.wiki.get_site().project %>
<% selected_project = query.project if query.project else cookies["EarwigDefaultProject"].value if "EarwigDefaultProject" in cookies else bot.wiki.get_site().project %>
% for code, name in all_projects:
% if code == selected_project:
<option value="${code}" selected="selected">${name}</option>


+ 1
- 1
pages/settings.mako 查看文件

@@ -49,7 +49,7 @@
<tt>${cookie.key | h}</tt>: <tt>${cookie.value | h}</tt>
<form action="${environ['PATH_INFO']}" method="post">
<input type="hidden" name="action" value="deleteCookie">
<input type="hidden" name="cookie" value="${cookie.name | h}">
<input type="hidden" name="cookie" value="${cookie.key | h}">
<button type="submit">Delete</button>
</form>
</li>


Loading…
取消
儲存