Files

45 lines
1.5 KiB
HTML

{% extends "base/layout.html" %}
{% block main %}
{{ super() }}
<div>
<h1>Settings </h1>
<form action="{{url_for('save_settings')}}" method="POST">
<h3>Home Assistant</h3>
<p>
<label for="url">URL</label><br>
<input type="url" name="url" value="{{url}}" required>
</p>
<p>
<label for="token">Authentication Token</label><br>
<input type="text" name="token" value="{{token}}" required>
</p>
<h3>Authorization</h3>
<p>
<label><input name="auth-enabled" type="checkbox" value="true" {% if auth_enabled == True %}checked{% endif %}/> Enabled</label> <br>
</p>
<p>
<label for="auth-user">Username</label><br>
<input type="text" name="auth-user" value="{{username}}">
</p>
<p>
<label for="auth-password">Password</label><br>
<input type="password" name="auth-password" value="">
</p>
<h3>Feedback</h3>
<p>
<label>Level of information:</label><br>
<label><input name="feedback" type="radio" value="none" {% if feedback == 'none' %}checked{% endif %}/> None</label> <br />
<label><input name="feedback" type="radio" value="some" {% if feedback == 'some' %}checked{% endif %}/> Some</label> <br />
<label><input name="feedback" type="radio" value="all" {% if feedback == 'all' %}checked{% endif %}/> All</label>
</p>
<input type="submit" value="Submit">
</form>
</div>
{% endblock %}