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"]: |
|
56 | <div class="input"> | |
57 | <div class="input"> |
|
57 | %if node.widget in ["string", "int", "unicode"]: | |
58 | ${h.text(node.name, class_="medium")} |
|
58 | ${h.text(node.name, node.default, class_="medium")} | |
59 | <p class="help-block">${node.description}</p> |
|
59 | %elif node.widget == "password": | |
60 | </div> |
|
60 | ${h.password(node.name, node.default, class_="medium")} | |
61 |
%elif node.widget == " |
|
61 | %elif node.widget == "bool": | |
62 | <div class="input"> |
|
62 | <div class="checkbox">${h.checkbox(node.name, node.default)}</div> | |
63 | ${h.password(node.name, class_="medium")} |
|
63 | %elif node.widget == "select": | |
64 | <p class="help-block">${node.description}</p> |
|
|||
65 | </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)} |
|
64 | ${h.select(node.name, node.default, node.validator.choices)} | |
74 | <p class="help-block">${node.description}</p> |
|
65 | %elif node.widget == "readonly": | |
75 | </div> |
|
|||
76 | %elif node.widget == "readonly": |
|
|||
77 | <div class="input"> |
|
|||
78 | ${node.default} |
|
66 | ${node.default} | |
79 | <p class="help-block">${node.description}</p> |
|
67 | %else: | |
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]. |
|
68 | 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> |
|
69 | %endif | |
85 |
|
|
70 | %if node.name in errors: | |
86 | %endif |
|
71 | <span class="error-message">${errors.get(node.name)}</span> | |
|
72 | <br /> | |||
|
73 | %endif | |||
|
74 | <p class="help-block">${node.description}</p> | |||
|
75 | </div> | |||
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