{% extends g.theme.master %}
{% if allow_config %}
{% do g.register_app_js('js/custom-fields.js', app=app) %}
{% endif %}
{% block title %}{{c.project.name}} / {{app.config.options.mount_label}} / Admin Fields{% endblock %}
{% block header %}{{app.config.options.mount_label}} Admin Fields{% endblock %}
{% block content %}
{{c.form.display(value=globals, action='set_custom_fields')}}
<h1>Default fields</h1>
<form name="show_fields_in_search" method="POST" action="allow_default_field">
<table>
<thead>
<tr>
<th>Filed name</th>
<th>Show in search</th>
</tr>
</thead>
{%for column in columns.keys()%}
<tr>
<td>{{columns[column]}}</td> <td><input type="checkbox" name="{{column}}" {%if globals.show_in_search[column]%}checked {%endif%}></td>
</tr>
{%endfor%}
<tr><td><input type="submit" value="Save"></td><td></td></tr>
</table>
</form>
{% endblock %}
{% block extra_css %}
<style type="text/css">
div.custom-field {
cursor: move;
border:1px solid #ccc;
margin:2px;
padding:2px;
}
</style>
{% endblock %}