57 lines
2.0 KiB
HTML
57 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
|
|
{% if error_id %}
|
|
<div class="alert alert-danger" role="alert">
|
|
You gave a duplicate name.
|
|
</div>
|
|
{% endif %}
|
|
|
|
<ul class="list-group">
|
|
{% for il in ilists %}
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
<form method="post">
|
|
<input class="form-control mb-3{% if error_id==il.id %} is-invalid{% endif %}" name="name" value="{{ il.name }}" required>
|
|
<input type="hidden" name="iid" value="{{ il.id }}">
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="checkbox" value="{{ il.is_active }}" name="is_active" {% if il.is_active %}CHECKED{% endif %}>
|
|
<label class="form-check-label" for="is_active">
|
|
Is active
|
|
</label>
|
|
</div>
|
|
|
|
{% for u in users %}
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="checkbox" name="shares_{{ u.id }}" value="{{ u.name }}" {% if u.shares_in_list(il.id) %}CHECKED{% endif %}>
|
|
<label class="form-check-label" for="inlineCheckbox1">{{ u.name }}</label>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="checkbox" name="to_be_deleted">
|
|
<label class="form-check-label" for="to_be_deleted">
|
|
Must be deleted
|
|
</label>
|
|
</div>
|
|
<input type="hidden" name="owner_user_id" value="{{ il.owner_user_id }}">
|
|
|
|
<input type="image" src="/static/save.svg" alt="Save" style="width: 2em; height: 2em;">
|
|
</form>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<br/>
|
|
New:<br/>
|
|
<ul class="list-group">
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
<form method="post">
|
|
<input class="form-control mb-3{% if error_id==9999 %} is-invalid{% endif %}" name="name" placeholder="{{ newlist.name }}" required>
|
|
<input type="image" src="/static/save.svg" alt="Save" style="width: 2em; height: 2em;">
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
|
|
{{ error_id }}
|
|
|
|
{% endblock %}
|