forked from enviPath/enviPy
All html files now prettier formatted and fixes for incompatible blocks applied Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#193 Co-authored-by: Tobias O <tobias.olenyi@envipath.com> Co-committed-by: Tobias O <tobias.olenyi@envipath.com>
111 lines
3.2 KiB
HTML
111 lines
3.2 KiB
HTML
{% load static %}
|
|
<!-- Edit User -->
|
|
<div id="edit_user_modal" class="modal" tabindex="-1">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Update User Defaults</h5>
|
|
<button
|
|
type="button"
|
|
class="close"
|
|
data-dismiss="modal"
|
|
aria-label="Close"
|
|
>
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>Edit User Defaults.</p>
|
|
<form
|
|
id="edit-user-modal-form"
|
|
accept-charset="UTF-8"
|
|
action=""
|
|
data-remote="true"
|
|
method="post"
|
|
>
|
|
{% csrf_token %}
|
|
<p>
|
|
<label for="default-package">Default Package</label>
|
|
<select
|
|
id="default-package"
|
|
name="default-package"
|
|
class="form-control"
|
|
data-width="100%"
|
|
>
|
|
<option disabled>Select a Package</option>
|
|
{% for p in meta.writeable_packages %}
|
|
<option
|
|
value="{{ p.url }}"
|
|
{% if p.id == meta.user.default_package.id %}selected{% endif %}
|
|
>
|
|
{{ p.name|safe }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</p>
|
|
<p>
|
|
<label for="default-group">Default Group</label>
|
|
<select
|
|
id="default-group"
|
|
name="default-group"
|
|
class="form-control"
|
|
data-width="100%"
|
|
>
|
|
<option disabled>Select a Group</option>
|
|
{% for g in meta.available_groups %}
|
|
<option
|
|
value="{{ g.url }}"
|
|
{% if g.id == meta.user.default_group.id %}selected{% endif %}
|
|
>
|
|
{{ g.name|safe }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</p>
|
|
<p>
|
|
<label for="default-prediction-setting"
|
|
>Default Prediction Setting</label
|
|
>
|
|
<select
|
|
id="default-prediction-setting"
|
|
name="default-prediction-setting"
|
|
class="form-control"
|
|
data-width="100%"
|
|
>
|
|
<option disabled>Select a Setting</option>
|
|
{% for s in meta.available_settings %}
|
|
<option
|
|
value="{{ s.url }}"
|
|
{% if s.id == meta.user.default_setting.id %}selected{% endif %}
|
|
>
|
|
{{ s.name|safe }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">
|
|
Close
|
|
</button>
|
|
<button
|
|
type="button"
|
|
class="btn btn-primary"
|
|
id="edit-user-modal-submit"
|
|
>
|
|
Update
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$("#edit-user-modal-submit").click(function (e) {
|
|
e.preventDefault();
|
|
$("#edit-user-modal-form").submit();
|
|
});
|
|
});
|
|
</script>
|