A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

67 líneas
3.4 KiB

  1. <%include file="/support/header.mako" args="environ=environ, title='Settings'"/>\
  2. <%namespace module="toolserver.misc" import="get_bot, parse_cookies"/>\
  3. <%namespace module="toolserver.sites" import="get_sites"/>\
  4. <% cookies = parse_cookies(environ) %>
  5. <% langs, projects = get_sites(get_bot()) %>
  6. <h1>Settings</h1>
  7. <p>This page contains some configurable options for this Toolserver site. Settings are saved as cookies. You can view and delete all cookies generated by this site at the bottom of this page.</p>
  8. <h2>Options</h2>
  9. <table>
  10. <tr>
  11. <form action="${environ['PATH_INFO']}" method="post">
  12. <input type="hidden" name="action" value="setDefaultSite">
  13. <td>Default site:</td>
  14. <td>
  15. <tt>http://</tt>
  16. <select name="lang">
  17. % for code, name in langs:
  18. % if "EarwigDefaultLang" in cookies and code == cookies["EarwigDefaultLang"].value:
  19. <option value="${code}" selected="selected">${name}</option>
  20. % else:
  21. <option value="${code}">${name}</option>
  22. % endif
  23. % endfor
  24. </select>
  25. <tt>.</tt>
  26. <select name="project">
  27. % for code, name in projects:
  28. % if "EarwigDefaultProject" in cookies and code == cookies["EarwigDefaultProject"].value:
  29. <option value="${code}" selected="selected">${name}</option>
  30. % else:
  31. <option value="${code}">${name}</option>
  32. % endif
  33. % endfor
  34. </select>
  35. <tt>.org</tt>
  36. </td>
  37. <td><button type="submit">Save</button></td>
  38. </form>
  39. </tr>
  40. <tr>
  41. <td>Background:</td>
  42. </tr>
  43. </table>
  44. <h2>Cookies</h2>
  45. % if cookies:
  46. <ul>
  47. % for cookie in cookies:
  48. <li>
  49. <tt>${cookie.key | h}</tt>: <tt>${cookie.value | h}</tt>
  50. <form action="${environ['PATH_INFO']}" method="post">
  51. <input type="hidden" name="action" value="deleteCookie">
  52. <input type="hidden" name="cookie" value="${cookie.name | h}">
  53. <button type="submit">Delete</button>
  54. </form>
  55. </li>
  56. % endfor
  57. </ul>
  58. <form action="${environ['PATH_INFO']}" method="post">
  59. <input type="hidden" name="action" value="deleteCookie">
  60. <input type="hidden" name="all" value="1">
  61. <button type="submit">Delete all</button>
  62. </form>
  63. % else:
  64. <p>No cookies!</p>
  65. % endif
  66. <%include file="/support/footer.mako" args="environ=environ"/>