| 1 | <!DOCTYPE html |
|---|
| 2 | PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
|---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" |
|---|
| 5 | xmlns:xi="http://www.w3.org/2001/XInclude" |
|---|
| 6 | xmlns:py="http://genshi.edgewall.org/"> |
|---|
| 7 | <xi:include href="admin.html" /> |
|---|
| 8 | <head> |
|---|
| 9 | <title>Ticket Submit Policy</title> |
|---|
| 10 | </head> |
|---|
| 11 | <body> |
|---|
| 12 | <h2>Repository Hooks</h2> |
|---|
| 13 | <form method="post"> |
|---|
| 14 | <fieldset> |
|---|
| 15 | <legend>${hook}</legend> |
|---|
| 16 | <div class="field"> |
|---|
| 17 | <b>Enabled:</b> |
|---|
| 18 | <input type="checkbox" name="enable" value="enable" |
|---|
| 19 | py:attrs="{'checked': enabled or None, 'disabled': not can_enable or None}"/> |
|---|
| 20 | </div> |
|---|
| 21 | <div> |
|---|
| 22 | ${snippet} |
|---|
| 23 | </div> |
|---|
| 24 | <div class="field"> |
|---|
| 25 | <b>Listeners on this hook:</b> |
|---|
| 26 | <py:for each="listener in listeners"> |
|---|
| 27 | <div> |
|---|
| 28 | <fieldset> |
|---|
| 29 | <legend> |
|---|
| 30 | <input type="checkbox" id="${hook}:${listener['name']}" name="listeners" value="${listener['name']}" |
|---|
| 31 | py:attrs="{'checked': listener['activated'] or None}"/> |
|---|
| 32 | ${listener['name']} |
|---|
| 33 | </legend> |
|---|
| 34 | ${listener['description']} |
|---|
| 35 | <py:for each="option_name, option in sorted(listener['options'].items())"> |
|---|
| 36 | <div> |
|---|
| 37 | <fieldset> |
|---|
| 38 | <legend>${option_name}</legend> |
|---|
| 39 | <py:choose test="option['type']"> |
|---|
| 40 | <py:when test="'bool'"> |
|---|
| 41 | <input type="checkbox" |
|---|
| 42 | name="${listener['name']}-${option_name}" |
|---|
| 43 | checked="${option['value'] and 'checked' or None}" /> |
|---|
| 44 | </py:when> |
|---|
| 45 | <py:when text="'list'"> |
|---|
| 46 | <input type="text" |
|---|
| 47 | name="${listener['name']}-${option_name}" |
|---|
| 48 | value="${', '.join(option['value'])}"/> |
|---|
| 49 | </py:when> |
|---|
| 50 | <py:otherwise> |
|---|
| 51 | <input type="text" |
|---|
| 52 | name="${listener['name']}-${option_name}" |
|---|
| 53 | value="${option['value']}"/> |
|---|
| 54 | </py:otherwise> |
|---|
| 55 | </py:choose> |
|---|
| 56 | ${option['description']} |
|---|
| 57 | </fieldset> |
|---|
| 58 | </div> |
|---|
| 59 | </py:for> |
|---|
| 60 | </fieldset> |
|---|
| 61 | </div> |
|---|
| 62 | </py:for> |
|---|
| 63 | </div> |
|---|
| 64 | </fieldset> |
|---|
| 65 | <div class="buttons"> |
|---|
| 66 | <input type="submit" value="Apply changes" /> |
|---|
| 67 | </div> |
|---|
| 68 | </form> |
|---|
| 69 | </body> |
|---|
| 70 | </html> |
|---|