initial project commit
This commit is contained in:
84
web/templates/user/settings.html
Normal file
84
web/templates/user/settings.html
Normal file
@@ -0,0 +1,84 @@
|
||||
{% extends 'base.html' %} {% block title %}Your Preferences{% endblock %} {%
|
||||
block content %}
|
||||
<h2>Your Preferences</h2>
|
||||
<form
|
||||
id="user-settings-form"
|
||||
method="post"
|
||||
action="{{ url_for('user_settings') }}"
|
||||
>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<fieldset>
|
||||
<legend>Regions</legend>
|
||||
<p>
|
||||
<small>Add new Region:</small>
|
||||
<input
|
||||
type="text"
|
||||
name="new-region"
|
||||
id="new-region"
|
||||
value=""
|
||||
placeholder="Type a region and save to add & select"
|
||||
size="30"
|
||||
/>
|
||||
</p>
|
||||
{% if all_regions %} {% for r in all_regions %}
|
||||
<label style="display: block; background-color: {{ r.color }}">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="region"
|
||||
id="region-{{ r.name }}"
|
||||
value="{{ r.name }}"
|
||||
{%
|
||||
if
|
||||
r
|
||||
in
|
||||
user_regions
|
||||
%}checked{%
|
||||
endif
|
||||
%}
|
||||
/>
|
||||
{{ r.name }}
|
||||
</label>
|
||||
{% endfor %} {% else %}
|
||||
<p>No regions available. Ask an admin to add some.</p>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Keywords</legend>
|
||||
<p>
|
||||
<small>Add new Keyword:</small>
|
||||
<input
|
||||
type="text"
|
||||
name="new-keyword"
|
||||
id="new-keyword"
|
||||
value=""
|
||||
placeholder="Type a keyword and save to add & select"
|
||||
size="30"
|
||||
/>
|
||||
</p>
|
||||
{% if all_keywords %} {% for k in all_keywords %}
|
||||
<label style="display: block; background-color: {{ k.color }}">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="keyword"
|
||||
id="keyword-{{ k.name }}"
|
||||
value="{{ k.name }}"
|
||||
{%
|
||||
if
|
||||
k
|
||||
in
|
||||
user_keywords
|
||||
%}checked{%
|
||||
endif
|
||||
%}
|
||||
/>
|
||||
{{ k.name }}
|
||||
</label>
|
||||
{% endfor %} {% else %}
|
||||
<p>No keywords available. Ask an admin to add some.</p>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
{% endblock %} {% block footer_scripts %}
|
||||
<script src="{{ url_for('static', filename='settings.js') }}"></script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user