${_('Plugin')}: ${resource.display_name}
${h.secure_form(request.resource_path(resource, route_name='auth_home'), request=request)}
## Allow derived templates to add something above the form
## input fields
%if hasattr(next, 'above_form_fields'):
${next.above_form_fields()}
%endif
%endfor
## Allow derived templates to add something below the form
## input fields
%if hasattr(next, 'below_form_fields'):
${next.below_form_fields()}
%endif
${h.end_form()}
${_('Plugin Configuration')}
%for node in plugin.get_settings_schema(): <% label_to_type = {'label-checkbox': 'bool', 'label-textarea': 'textarea'} %>
%if node.widget in ["string", "int", "unicode"]:
${h.text(node.name, defaults.get(node.name), class_="large")}
%elif node.widget == "password":
${h.password(node.name, defaults.get(node.name), class_="large")}
%elif node.widget == "bool":
%if node.name == "global_2fa" and c.rhodecode_edition_id != "EE":
<%node.description = _('This feature is available in RhodeCode EE edition only. Contact {sales_email} to obtain a trial license.').format(sales_email='sales@rhodecode.com')%>
%else:
%endif
${h.checkbox(node.name, True, checked=defaults.get(node.name))}
%endif
%elif node.widget == "select":
${h.select(node.name, defaults.get(node.name), node.validator.choices, class_="select2AuthSetting")}
%elif node.widget == "select_with_labels":
${h.select(node.name, defaults.get(node.name), node.choices, class_="select2AuthSetting")}
%elif node.widget == "textarea":
${h.textarea(node.name, defaults.get(node.name), rows=10)}
%elif node.widget == "readonly":
${node.default}
%else:
This field is of type ${node.typ}, which cannot be displayed. Must be one of [string|int|bool|select].
%endif
%if node.name in errors:
%endif
${node.description | n}
% for node in plugin.get_settings_schema(): *option*: `${node.name}` => `${defaults.get(node.name)}`${'\n # '.join(['']+node.description.splitlines())} % endfor% endif