| 1 | <!--! |
|---|
| 2 | Copyright (C) 2010-2014 Rob Guttman <guttman@alum.mit.edu> |
|---|
| 3 | All rights reserved. |
|---|
| 4 | |
|---|
| 5 | This software is licensed as described in the file COPYING, which |
|---|
| 6 | you should have received as part of this distribution. |
|---|
| 7 | --> |
|---|
| 8 | <!DOCTYPE html |
|---|
| 9 | PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
|---|
| 10 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 11 | <html xmlns="http://www.w3.org/1999/xhtml" |
|---|
| 12 | xmlns:xi="http://www.w3.org/2001/XInclude" |
|---|
| 13 | xmlns:py="http://genshi.edgewall.org/" |
|---|
| 14 | xmlns:i18n="http://genshi.edgewall.org/i18n" |
|---|
| 15 | i18n:domain="dynfields"> |
|---|
| 16 | <xi:include href="prefs.html" /> |
|---|
| 17 | <head> |
|---|
| 18 | <title i18n:comment="TRANSLATOR: browser window title"> |
|---|
| 19 | Dynamic Fields Options |
|---|
| 20 | </title> |
|---|
| 21 | </head> |
|---|
| 22 | <body> |
|---|
| 23 | <div py:if="saved" class="system-message" id="notice"> |
|---|
| 24 | Your preferences have been saved. |
|---|
| 25 | </div> |
|---|
| 26 | <p class="hint"> |
|---|
| 27 | Enable/disable a rule below by checking/unchecking its checkbox. |
|---|
| 28 | </p> |
|---|
| 29 | <fieldset py:for="title in data"> |
|---|
| 30 | <legend>${title}</legend> |
|---|
| 31 | <div class="field"> |
|---|
| 32 | <p class="hint">${data[title]['desc']}</p> |
|---|
| 33 | <py:for each="pref in data[title]['prefs']"> |
|---|
| 34 | <br/> |
|---|
| 35 | <label> |
|---|
| 36 | <input type="checkbox" name="${pref['id']}" |
|---|
| 37 | value="1" checked="${pref['enabled'] == '1' or None}" /> |
|---|
| 38 | ${pref['label']} |
|---|
| 39 | </label> |
|---|
| 40 | <select py:if="pref['type'] == 'select'" name="${pref['id']}.value"> |
|---|
| 41 | <option py:for="option in pref['options']" value="${option}" |
|---|
| 42 | selected="${(option==pref['value'] and 'selected') or None}">$option</option> |
|---|
| 43 | </select> |
|---|
| 44 | <input py:if="pref['type'] == 'text'" type="text" name="${pref['id']}.value" |
|---|
| 45 | value="${pref['value']}" size="20" /> |
|---|
| 46 | </py:for> |
|---|
| 47 | </div> |
|---|
| 48 | </fieldset> |
|---|
| 49 | </body> |
|---|
| 50 | </html> |
|---|