| Line | |
|---|
| 1 | # extends 'prefs.html' |
|---|
| 2 | <!DOCTYPE html> |
|---|
| 3 | <html> |
|---|
| 4 | <head> |
|---|
| 5 | <title> |
|---|
| 6 | # block preftitle |
|---|
| 7 | Dynamic Fields Options |
|---|
| 8 | # endblock preftitle |
|---|
| 9 | </title> |
|---|
| 10 | </head> |
|---|
| 11 | <body> |
|---|
| 12 | # block prefpanel |
|---|
| 13 | # if saved: |
|---|
| 14 | <div class="system-message" id="notice"> |
|---|
| 15 | Your preferences have been saved. |
|---|
| 16 | </div> |
|---|
| 17 | # endif |
|---|
| 18 | <p class="hint"> |
|---|
| 19 | Enable/disable a rule below by checking/unchecking its checkbox. |
|---|
| 20 | </p> |
|---|
| 21 | # for title in data: |
|---|
| 22 | <fieldset> |
|---|
| 23 | <legend>${title}</legend> |
|---|
| 24 | <div class="field"> |
|---|
| 25 | <p class="hint">${data[title]['desc']}</p> |
|---|
| 26 | # for pref in data[title]['prefs']: |
|---|
| 27 | <br/> |
|---|
| 28 | <label> |
|---|
| 29 | <input type="checkbox" name="${pref['id']}" |
|---|
| 30 | value="1"${{'checked': 'checked' if pref['enabled'] == '1'}|htmlattr} /> |
|---|
| 31 | ${pref['label']} |
|---|
| 32 | </label> |
|---|
| 33 | # if pref['type'] == 'select': |
|---|
| 34 | <select name="${pref['id']}.value"> |
|---|
| 35 | # for option in pref['options']: |
|---|
| 36 | <option value="${option}"${{'selected': 'selected' if option==pref['value']}|htmlattr}>${option}</option> |
|---|
| 37 | # endfor |
|---|
| 38 | </select> |
|---|
| 39 | # endif |
|---|
| 40 | # if pref['type'] == 'text': |
|---|
| 41 | <input type="text" name="${pref['id']}.value" |
|---|
| 42 | value="${pref['value']}" size="20" /> |
|---|
| 43 | # endif |
|---|
| 44 | # endfor |
|---|
| 45 | </div> |
|---|
| 46 | </fieldset> |
|---|
| 47 | # endfor |
|---|
| 48 | # endblock prefpanel |
|---|
| 49 | </body> |
|---|
| 50 | </html> |
|---|
Note: See
TracBrowser
for help on using the repository browser.