##// END OF EJS Templates
auth-plugins: use large fields, and add support for textarea type.
marcink -
r3245:8fb7ec19 default
parent child Browse files
Show More
@@ -51,23 +51,29 b''
51 <div class="form">
51 <div class="form">
52
52
53 %for node in plugin.get_settings_schema():
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 <div class="field">
58 <div class="field">
56 <div class="label ${label_css_class}"><label for="${node.name}">${node.title}</label></div>
59 <div class="label ${label_to_type.get(node.widget)}"><label for="${node.name}">${node.title}</label></div>
57 <div class="input">
60 <div class="input">
58 %if node.widget in ["string", "int", "unicode"]:
61 %if node.widget in ["string", "int", "unicode"]:
59 ${h.text(node.name, defaults.get(node.name), class_="medium")}
62 ${h.text(node.name, defaults.get(node.name), class_="large")}
60 %elif node.widget == "password":
63 %elif node.widget == "password":
61 ${h.password(node.name, defaults.get(node.name), class_="medium")}
64 ${h.password(node.name, defaults.get(node.name), class_="large")}
62 %elif node.widget == "bool":
65 %elif node.widget == "bool":
63 <div class="checkbox">${h.checkbox(node.name, True, checked=defaults.get(node.name))}</div>
66 <div class="checkbox">${h.checkbox(node.name, True, checked=defaults.get(node.name))}</div>
64 %elif node.widget == "select":
67 %elif node.widget == "select":
65 ${h.select(node.name, defaults.get(node.name), node.validator.choices)}
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 %elif node.widget == "readonly":
71 %elif node.widget == "readonly":
67 ${node.default}
72 ${node.default}
68 %else:
73 %else:
69 This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select].
74 This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select].
70 %endif
75 %endif
76
71 %if node.name in errors:
77 %if node.name in errors:
72 <span class="error-message">${errors.get(node.name)}</span>
78 <span class="error-message">${errors.get(node.name)}</span>
73 <br />
79 <br />
General Comments 0
You need to be logged in to leave comments. Login now