{% extends "template.html" %}
{% block breadcrumbs %}{{block.super}}<li>{{config_name}}</li>{% endblock %}
{% block content %}
<h1>Config: {{config_name}}</h1>
{% if read_only %}
<div style="color: #FF0000">WARNING! etc/{{config_name}} file is not writable by user {{system_user}}. Read-only mode enabled!</div>
<script type="text/javascript">
function on_submit() {
    alert("Read-only mode!");
    return false;
}
</script>
{% endif %}
<FORM METHOD="POST" {% if read_only %}ONSUBMIT="return on_submit()"{% endif %}>
<TABLE BORDER="0" WIDTH="100%">
{% for s in data %}
    <TR><TH COLSPAN="4">{{s.section}}</TH><TH>{% if s.help %}<a href="{{s.help}}" target="_">Help</a>{%endif%}</TH></TR>
    {% for o in s.data %}
        <TR class="{%cycle 'row1' 'row2'%}">
            <TD STYLE="width: 4pt"></TD>
            <TD>{{o.label}}</TD>
            <TD><INPUT TYPE="text" NAME="{{o.name}}" VALUE="{{o.value}}" /></TD>
            <TD>{{o.default}}</TD>
            <TD>{% if o.help %}<a href="{{o.help}}" target="_">Help</a>{%endif%}</TD>
        </TR>
    {% endfor %}
{% endfor %}
</TABLE>
{% if read_only %}{% else %}
<input type="submit" value="Save" />
{% endif %}
</FORM>
{% endblock %}
