mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
New user Settings page
This commit is contained in:
parent
f1be57e509
commit
464ae8ecc3
@ -2,19 +2,29 @@
|
|||||||
{% import "materialize/wtf.html.j2" as wtf %}
|
{% import "materialize/wtf.html.j2" as wtf %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="container">
|
<div class="section container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h1 id="title">{{ title }}</h1>
|
<h1 id="title">{{ title }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m9 l10">
|
<div class="col s4">
|
||||||
|
<h4>Profile Settings</h4>
|
||||||
<div id="user-settings" class="card section scrollspy">
|
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
|
||||||
|
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
||||||
|
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
|
||||||
|
Stet clita kasd gubergren, no sea tak</p>
|
||||||
|
</div>
|
||||||
|
<div class="col s8" style="margin-top: 22.8px;">
|
||||||
|
<ul class="collapsible">
|
||||||
|
<li>
|
||||||
|
<div class="collapsible-header">
|
||||||
|
<span>User Settings</span>
|
||||||
|
<i class="caret material-icons right">keyboard_arrow_right</i>
|
||||||
|
</div>
|
||||||
|
<div class="collapsible-body">
|
||||||
<form method="POST" enctype="multipart/form-data">
|
<form method="POST" enctype="multipart/form-data">
|
||||||
<div class="card-content">
|
|
||||||
<span class="card-title">User Settings</span>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s6">
|
<div class="col s6">
|
||||||
{{ edit_profile_settings_form.hidden_tag() }}
|
{{ edit_profile_settings_form.hidden_tag() }}
|
||||||
@ -22,20 +32,17 @@
|
|||||||
{{ wtf.render_field(edit_profile_settings_form.email, material_icon='email') }}
|
{{ wtf.render_field(edit_profile_settings_form.email, material_icon='email') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="card-action">
|
|
||||||
<div class="right-align">
|
<div class="right-align">
|
||||||
{{ wtf.render_field(edit_profile_settings_form.submit, material_icon='send') }}
|
{{ wtf.render_field(edit_profile_settings_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="collapsible-header"><span>Privacy Settings</span><i class="material-icons caret right">keyboard_arrow_right</i></div>
|
||||||
|
<div class="collapsible-body">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{{ edit_privacy_settings_form.hidden_tag() }}
|
{{ edit_privacy_settings_form.hidden_tag() }}
|
||||||
<div id="privacy-settings" class="card section scrollspy">
|
|
||||||
<div class="card-content">
|
|
||||||
<span class="card-title">Privacy settings</span>
|
|
||||||
<br>
|
<br>
|
||||||
{{ wtf.render_field(edit_privacy_settings_form.is_public, id='public-profile') }}
|
{{ wtf.render_field(edit_privacy_settings_form.is_public, id='public-profile') }}
|
||||||
<br>
|
<br>
|
||||||
@ -47,118 +54,108 @@
|
|||||||
<br>
|
<br>
|
||||||
{{ wtf.render_field(edit_privacy_settings_form.show_member_since, data_action='disable', disabled=true) }}
|
{{ wtf.render_field(edit_privacy_settings_form.show_member_since, data_action='disable', disabled=true) }}
|
||||||
<br>
|
<br>
|
||||||
</div>
|
|
||||||
<div class="card-action">
|
|
||||||
<div class="right-align">
|
<div class="right-align">
|
||||||
{{ wtf.render_field(edit_privacy_settings_form.submit, material_icon='send') }}
|
{{ wtf.render_field(edit_privacy_settings_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<div id="public-profile-settings" class="card section scrollspy">
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="collapsible-header"><span>Public Profile</span><i class="material-icons caret right">keyboard_arrow_right</i></div>
|
||||||
|
<div class="collapsible-body">
|
||||||
<form method="POST" enctype="multipart/form-data">
|
<form method="POST" enctype="multipart/form-data">
|
||||||
<div class="card-content">
|
|
||||||
{{ edit_public_profile_information_form.hidden_tag() }}
|
{{ edit_public_profile_information_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s1 m3"></div>
|
||||||
<span class="card-title">Public Profile</span>
|
<div class="col s10 m6">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s5">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s2"></div>
|
|
||||||
<div class="col s8">
|
|
||||||
<img src="{{ url_for('.profile_avatar', user_id=user.id) }}" alt="user-image" class="circle responsive-img" id="avatar">
|
<img src="{{ url_for('.profile_avatar', user_id=user.id) }}" alt="user-image" class="circle responsive-img" id="avatar">
|
||||||
</div>
|
</div>
|
||||||
<div class="col s2"></div>
|
<div class="col s1 m3"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s2">
|
<div class="col s3 m2">
|
||||||
<div class="center-align">
|
<div class="center-align">
|
||||||
<a class="btn-floating red waves-effect waves-light modal-trigger" style="margin-top:15px;" href="#delete-avatar-modal"><i class="material-icons">delete</i></a>
|
<a class="btn-floating red waves-effect waves-light modal-trigger" style="margin-top:15px;" href="#delete-avatar-modal"><i class="material-icons">delete</i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s10">
|
<div class="col s9 m8">
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.avatar, accept='image/jpeg, image/png, image/gif', placeholder='Choose an image file', id='avatar-upload') }}
|
{{ wtf.render_field(edit_public_profile_information_form.avatar, accept='image/jpeg, image/png, image/gif', placeholder='Choose an image file', id='avatar-upload') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="col s7">
|
|
||||||
<p></p>
|
<p></p>
|
||||||
<br>
|
<br>
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.full_name, material_icon='badge') }}
|
{{ wtf.render_field(edit_public_profile_information_form.full_name, material_icon='badge') }}
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.about_me, material_icon='description') }}
|
{{ wtf.render_field(edit_public_profile_information_form.about_me, material_icon='description', id='about-me-textfield') }}
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.website, material_icon='laptop') }}
|
{{ wtf.render_field(edit_public_profile_information_form.website, material_icon='laptop') }}
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.organization, material_icon='business') }}
|
{{ wtf.render_field(edit_public_profile_information_form.organization, material_icon='business') }}
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.location, material_icon='location_on') }}
|
{{ wtf.render_field(edit_public_profile_information_form.location, material_icon='location_on') }}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-action">
|
|
||||||
<div class="right-align">
|
<div class="right-align">
|
||||||
{{ wtf.render_field(edit_public_profile_information_form.submit, material_icon='send') }}
|
{{ wtf.render_field(edit_public_profile_information_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s4">
|
||||||
|
<h4>General Settings</h4>
|
||||||
|
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
|
||||||
|
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
||||||
|
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
|
||||||
|
Stet clita kasd gubergren, no sea tak</p>
|
||||||
|
</div>
|
||||||
|
<div class="col s8" style="margin-top: 22.8px;">
|
||||||
|
<ul class="collapsible">
|
||||||
|
<li>
|
||||||
|
<div class="collapsible-header">
|
||||||
|
<span>Notification Settings</span>
|
||||||
|
<i class="caret material-icons">keyboard_arrow_right</i>
|
||||||
|
</div>
|
||||||
|
<div class="collapsible-body">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{{ edit_notification_settings_form.hidden_tag() }}
|
{{ edit_notification_settings_form.hidden_tag() }}
|
||||||
<div id="notification-settings" class="card section scrollspy">
|
|
||||||
<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') }}
|
{{ wtf.render_field(edit_notification_settings_form.job_status_mail_notification_level, material_icon='notifications') }}
|
||||||
</div>
|
|
||||||
<div class="card-action">
|
|
||||||
<div class="right-align">
|
<div class="right-align">
|
||||||
{{ wtf.render_field(edit_notification_settings_form.submit, material_icon='send') }}
|
{{ wtf.render_field(edit_notification_settings_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="collapsible-header">
|
||||||
|
<span>Change Password</span>
|
||||||
|
<i class="caret material-icons right">keyboard_arrow_right</i>
|
||||||
|
</div>
|
||||||
|
<div class="collapsible-body">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{{ change_password_form.hidden_tag() }}
|
{{ change_password_form.hidden_tag() }}
|
||||||
<div id="change-password" class="card section scrollspy">
|
|
||||||
<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.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, material_icon='vpn_key') }}
|
||||||
{{ wtf.render_field(change_password_form.new_password_2, 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">
|
<div class="right-align">
|
||||||
{{ wtf.render_field(change_password_form.submit, material_icon='send') }}
|
{{ wtf.render_field(change_password_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<div id="delete-account" class="card section scrollspy">
|
</li>
|
||||||
<div class="card-content">
|
<li>
|
||||||
<span class="card-title">Delete account</span>
|
<div class="collapsible-header">
|
||||||
|
<span>Delete Account</span>
|
||||||
|
<i class="caret material-icons right">keyboard_arrow_right</i>
|
||||||
|
</div>
|
||||||
|
<div class="collapsible-body">
|
||||||
<p>Deleting an account has the following effects:</p>
|
<p>Deleting an account has the following effects:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>All data associated with your corpora and jobs will be permanently deleted.</li>
|
<li>All data associated with your corpora and jobs will be permanently deleted.</li>
|
||||||
<li>All settings will be permanently deleted.</li>
|
<li>All settings will be permanently deleted.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
<div class="right-align">
|
||||||
<div class="card-action right-align">
|
|
||||||
<a class="btn red waves-effect waves-light modal-trigger" href="#delete-user"><i class="material-icons left">delete</i>Delete</a>
|
<a class="btn red waves-effect waves-light modal-trigger" href="#delete-user"><i class="material-icons left">delete</i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</li>
|
||||||
</div>
|
|
||||||
<div class="col hide-on-small-only m3 l2">
|
|
||||||
<ul class="section table-of-contents" style="position: fixed !important;">
|
|
||||||
<li><a href="#user-settings">User Settings</a></li>
|
|
||||||
<li><a href="#privacy-settings">Privacy Settings</a></li>
|
|
||||||
<li><a href="#public-profile-settings">Public Profile Settings</a></li>
|
|
||||||
<li><a href="#notification-settings">Notification Settings</a></li>
|
|
||||||
<li><a href="#change-password">Change Password</a></li>
|
|
||||||
<li><a href="#delete-account">Delete Account</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,11 +64,13 @@ class EditPublicProfileInformationForm(FlaskForm):
|
|||||||
'Full name',
|
'Full name',
|
||||||
validators=[Length(max=128)]
|
validators=[Length(max=128)]
|
||||||
)
|
)
|
||||||
|
style={'style': 'overflow: auto;'}
|
||||||
about_me = TextAreaField(
|
about_me = TextAreaField(
|
||||||
'About me',
|
'About me',
|
||||||
validators=[
|
validators=[
|
||||||
Length(max=254)
|
Length(max=254)
|
||||||
]
|
],
|
||||||
|
render_kw=style
|
||||||
)
|
)
|
||||||
website = StringField(
|
website = StringField(
|
||||||
'Website',
|
'Website',
|
||||||
|
@ -172,5 +172,5 @@ def edit_profile(user_id):
|
|||||||
change_password_form=change_password_form,
|
change_password_form=change_password_form,
|
||||||
edit_notification_settings_form=edit_notification_settings_form,
|
edit_notification_settings_form=edit_notification_settings_form,
|
||||||
user=user,
|
user=user,
|
||||||
title='Edit Profile'
|
title='User Settings'
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user