{% extends base.html %}
{% block title %}config{% end block %}

{% block body %}
<form method=POST>
<table border=0>
<tr><th>Repo:</th><td>
<input type=text name=repo placeholder=" {{ config.get('repo', "/path/to/repo/") }}"
tabindex=1>
</td></tr><tr><th>Port:</th><td>
<input type=text name=port placeholder=" {{ config.get('port', "8080") }}"
tabindex=2>
</td></tr><tr><th>Username:</th><td>
<input type=text name=username
placeholder=" {{ config.get('username', '') or "username" }}" tabindex=3>
</td></tr><tr><th>Password:</th><td>
<input type=password name=pwdhash placeholder=" password" tabindex=4>
</td></tr></table>
<br>
<label>Autosave Notes: <input type=checkbox name=autosave
{% if config.get('autosave', 'False') == 'True' %}
checked=on
{% end if %}></label>
<div class=small>Saves notes every 5 seconds in edit mode.</div>
<br><br>
<input type=submit value=Save class='btn btn-primary' tabindex=5>
<hr>
<div class=lead>Advanced Settings</div>
<label>Test Mode: <input type=checkbox name=testing
{% if config.get('testing', 'False') == 'True' %}
checked=on
{% end if %}></label>
<div class=small>Enables logging. You probably want to leave this off.</div>
<br>
<label>Localhost Only: <input type=checkbox name=listen_localhost_only
{% if config.get('listen_localhost_only', 'True') == 'True' %}
checked=on
{% end if %}
></label>
<div class=small>Prevents access to magpie from other computers on the network if
enabled.</div>
<br><br>
<input type=submit value=Save class='btn btn-primary'>
</form>
{% end block %}
