Show More
@@ -51,23 +51,29 b'' | |||
|
51 | 51 | <div class="form"> |
|
52 | 52 | |
|
53 | 53 | %for node in plugin.get_settings_schema(): |
|
54 | <% label_css_class = ("label-checkbox" if (node.widget == "bool") else "") %> | |
|
54 | <% | |
|
55 | label_to_type = {'label-checkbox': 'bool', 'label-textarea': 'textarea'} | |
|
56 | %> | |
|
57 | ||
|
55 | 58 | <div class="field"> |
|
56 |
<div class="label ${label_ |
|
|
59 | <div class="label ${label_to_type.get(node.widget)}"><label for="${node.name}">${node.title}</label></div> | |
|
57 | 60 | <div class="input"> |
|
58 | 61 | %if node.widget in ["string", "int", "unicode"]: |
|
59 |
${h.text(node.name, defaults.get(node.name), class_=" |
|
|
62 | ${h.text(node.name, defaults.get(node.name), class_="large")} | |
|
60 | 63 | %elif node.widget == "password": |
|
61 |
${h.password(node.name, defaults.get(node.name), class_=" |
|
|
64 | ${h.password(node.name, defaults.get(node.name), class_="large")} | |
|
62 | 65 | %elif node.widget == "bool": |
|
63 | 66 | <div class="checkbox">${h.checkbox(node.name, True, checked=defaults.get(node.name))}</div> |
|
64 | 67 | %elif node.widget == "select": |
|
65 | 68 | ${h.select(node.name, defaults.get(node.name), node.validator.choices)} |
|
69 | %elif node.widget == "textarea": | |
|
70 | <div class="textarea" style="margin-left: 0px">${h.textarea(node.name, defaults.get(node.name), rows=10)}</div> | |
|
66 | 71 | %elif node.widget == "readonly": |
|
67 | 72 | ${node.default} |
|
68 | 73 | %else: |
|
69 | 74 | This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select]. |
|
70 | 75 | %endif |
|
76 | ||
|
71 | 77 |
|
|
72 | 78 | <span class="error-message">${errors.get(node.name)}</span> |
|
73 | 79 | <br /> |
General Comments 0
You need to be logged in to leave comments.
Login now