Show More
@@ -50,40 +50,29 b'' | |||||
50 | ${h.secure_form(request.resource_path(resource, route_name='auth_home'))} |
|
50 | ${h.secure_form(request.resource_path(resource, route_name='auth_home'))} | |
51 | <div class="form"> |
|
51 | <div class="form"> | |
52 | %for node in plugin.get_settings_schema(): |
|
52 | %for node in plugin.get_settings_schema(): | |
53 | <% label_cls = ("label-checkbox" if (node.widget == "bool") else "") %> |
|
53 | <% label_css_class = ("label-checkbox" if (node.widget == "bool") else "") %> | |
54 | <div class="field"> |
|
54 | <div class="field"> | |
55 | <div class="label ${label_cls}"><label for="${node.name}">${node.title}</label></div> |
|
55 | <div class="label ${label_css_class}"><label for="${node.name}">${node.title}</label></div> | |
56 | %if node.widget in ["string", "int", "unicode"]: |
|
|||
57 |
|
|
56 | <div class="input"> | |
58 | ${h.text(node.name, class_="medium")} |
|
57 | %if node.widget in ["string", "int", "unicode"]: | |
59 | <p class="help-block">${node.description}</p> |
|
58 | ${h.text(node.name, node.default, class_="medium")} | |
60 | </div> |
|
|||
61 | %elif node.widget == "password": |
|
59 | %elif node.widget == "password": | |
62 | <div class="input"> |
|
60 | ${h.password(node.name, node.default, class_="medium")} | |
63 | ${h.password(node.name, class_="medium")} |
|
61 | %elif node.widget == "bool": | |
|
62 | <div class="checkbox">${h.checkbox(node.name, node.default)}</div> | |||
|
63 | %elif node.widget == "select": | |||
|
64 | ${h.select(node.name, node.default, node.validator.choices)} | |||
|
65 | %elif node.widget == "readonly": | |||
|
66 | ${node.default} | |||
|
67 | %else: | |||
|
68 | This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select]. | |||
|
69 | %endif | |||
|
70 | %if node.name in errors: | |||
|
71 | <span class="error-message">${errors.get(node.name)}</span> | |||
|
72 | <br /> | |||
|
73 | %endif | |||
64 |
|
|
74 | <p class="help-block">${node.description}</p> | |
65 |
|
|
75 | </div> | |
66 | %elif node.widget == "bool": |
|
|||
67 | <div class="input"> |
|
|||
68 | <div class="checkbox">${h.checkbox(node.name, True)}</div> |
|
|||
69 | <span class="help-block">${node.description}</span> |
|
|||
70 | </div> |
|
|||
71 | %elif node.widget == "select": |
|
|||
72 | <div class="select"> |
|
|||
73 | ${h.select(node.name, node.default, node.validator.choices)} |
|
|||
74 | <p class="help-block">${node.description}</p> |
|
|||
75 | </div> |
|
|||
76 | %elif node.widget == "readonly": |
|
|||
77 | <div class="input"> |
|
|||
78 | ${node.default} |
|
|||
79 | <p class="help-block">${node.description}</p> |
|
|||
80 | </div> |
|
|||
81 | %else: |
|
|||
82 | <div class="input"> |
|
|||
83 | This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select]. |
|
|||
84 | <p class="help-block">${node.description}</p> |
|
|||
85 | </div> |
|
|||
86 | %endif |
|
|||
87 | </div> |
|
76 | </div> | |
88 | %endfor |
|
77 | %endfor | |
89 | <div class="buttons"> |
|
78 | <div class="buttons"> |
General Comments 0
You need to be logged in to leave comments.
Login now