mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 09:15:41 +00:00
120 lines
4.1 KiB
Django/Jinja
120 lines
4.1 KiB
Django/Jinja
{% extends "base.html.j2" %}
|
|
{% from "settings/_breadcrumbs.html.j2" import breadcrumbs with context %}
|
|
{% import "materialize/wtf.html.j2" as wtf %}
|
|
|
|
{% block page_content %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<h1 id="title">{{ title }}</h1>
|
|
</div>
|
|
|
|
<div class="col s12">
|
|
<form method="POST">
|
|
{{ edit_general_settings_form.hidden_tag() }}
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<span class="card-title">General settings</span>
|
|
{{ wtf.render_field(edit_general_settings_form.username, material_icon='person') }}
|
|
{{ wtf.render_field(edit_general_settings_form.email, material_icon='email') }}
|
|
</div>
|
|
<div class="card-action">
|
|
<div class="right-align">
|
|
{{ wtf.render_field(edit_general_settings_form.submit, material_icon='send') }}
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="POST">
|
|
{{ edit_interface_settings_form.hidden_tag() }}
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<span class="card-title">Interface settings</span>
|
|
<div class="row">
|
|
<div class="col s12"><p> </p></div>
|
|
<div class="col s1">
|
|
<p><i class="material-icons">brightness_3</i></p>
|
|
</div>
|
|
<div class="col s8">
|
|
<p>{{ edit_interface_settings_form.dark_mode.label.text }}</p>
|
|
<p class="light">Enable dark mode to ease your eyes.</p>
|
|
</div>
|
|
<div class="col s3 right-align">
|
|
<div class="switch">
|
|
<label>
|
|
{{ edit_interface_settings_form.dark_mode() }}
|
|
<span class="lever"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-action">
|
|
<div class="right-align">
|
|
{{ wtf.render_field(edit_interface_settings_form.submit, material_icon='send') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="POST">
|
|
{{ edit_notification_settings_form.hidden_tag() }}
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<span class="card-title">Notification settings</span>
|
|
{{ wtf.render_field(edit_notification_settings_form.job_status_mail_notification_level, material_icon='notifications') }}
|
|
</div>
|
|
<div class="card-action">
|
|
<div class="right-align">
|
|
{{ wtf.render_field(edit_notification_settings_form.submit, material_icon='send') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<form method="POST">
|
|
{{ change_password_form.hidden_tag() }}
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<span class="card-title">Change Password</span>
|
|
{{ wtf.render_field(change_password_form.password, material_icon='vpn_key') }}
|
|
{{ wtf.render_field(change_password_form.new_password, material_icon='vpn_key') }}
|
|
{{ wtf.render_field(change_password_form.new_password_2, material_icon='vpn_key') }}
|
|
</div>
|
|
<div class="card-action">
|
|
<div class="right-align">
|
|
{{ wtf.render_field(change_password_form.submit, material_icon='send') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<span class="card-title">Delete account</span>
|
|
<p>Deleting an account has the following effects:</p>
|
|
<ul>
|
|
<li>All data associated with your corpora and jobs will be permanently deleted.</li>
|
|
<li>All settings will be permanently deleted.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="card-action right-align">
|
|
<a class="btn red waves-effect waves-light" id="delete-user"><i class="material-icons left">delete</i>Delete</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock page_content %}
|
|
|
|
{% block scripts %}
|
|
{{ super() }}
|
|
<script>
|
|
document.querySelector('#delete-user').addEventListener('click', (event) => {
|
|
Utils.deleteUserRequest(currentUserId)
|
|
.then((response) => {window.location.href = '/';});
|
|
});
|
|
</script>
|
|
{% endblock scripts %}
|