From 464ae8ecc35d4bd4ea55c802b74058c06e10a2d5 Mon Sep 17 00:00:00 2001 From: Inga Kirschnick Date: Wed, 15 Mar 2023 09:18:11 +0100 Subject: [PATCH] New user Settings page --- app/templates/users/edit_profile.html.j2 | 299 +++++++++++------------ app/users/forms.py | 4 +- app/users/routes.py | 2 +- 3 files changed, 152 insertions(+), 153 deletions(-) diff --git a/app/templates/users/edit_profile.html.j2 b/app/templates/users/edit_profile.html.j2 index 88eb8fb5..3636da42 100644 --- a/app/templates/users/edit_profile.html.j2 +++ b/app/templates/users/edit_profile.html.j2 @@ -2,163 +2,160 @@ {% import "materialize/wtf.html.j2" as wtf %} {% block page_content %} -
+

{{ title }}

-
-
- -
-
-
- User Settings -
-
- {{ edit_profile_settings_form.hidden_tag() }} - {{ wtf.render_field(edit_profile_settings_form.username, material_icon='person') }} - {{ wtf.render_field(edit_profile_settings_form.email, material_icon='email') }} -
-
-
-
-
- {{ wtf.render_field(edit_profile_settings_form.submit, material_icon='send') }} -
-
-
-
- -
- {{ edit_privacy_settings_form.hidden_tag() }} -
-
- Privacy settings -
- {{ wtf.render_field(edit_privacy_settings_form.is_public, id='public-profile') }} -
-
-
- {{ wtf.render_field(edit_privacy_settings_form.show_email, data_action='disable', disabled=true) }} -
- {{ wtf.render_field(edit_privacy_settings_form.show_last_seen, data_action='disable', disabled=true) }} -
- {{ wtf.render_field(edit_privacy_settings_form.show_member_since, data_action='disable', disabled=true) }} -
-
-
-
- {{ wtf.render_field(edit_privacy_settings_form.submit, material_icon='send') }} -
-
-
-
- -
-
-
- {{ edit_public_profile_information_form.hidden_tag() }} -
-
- Public Profile -
-
-
-
-
-
-
- user-image -
-
-
-
-
-
- delete -
-
-
- {{ 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.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.website, material_icon='laptop') }} - {{ 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.submit, material_icon='send') }} -
-
-
-
- -
- {{ edit_notification_settings_form.hidden_tag() }} -
-
- Notification settings - {{ wtf.render_field(edit_notification_settings_form.job_status_mail_notification_level, material_icon='notifications') }} -
-
-
- {{ wtf.render_field(edit_notification_settings_form.submit, material_icon='send') }} -
-
-
-
- -
- {{ change_password_form.hidden_tag() }} -
-
- Change Password - {{ 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') }} -
-
-
- {{ wtf.render_field(change_password_form.submit, material_icon='send') }} -
-
-
-
- -
-
- Delete account -

Deleting an account has the following effects:

-
    -
  • All data associated with your corpora and jobs will be permanently deleted.
  • -
  • All settings will be permanently deleted.
  • -
-
- -
- +
+
+

Profile Settings

+

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

-
-
    -
  • User Settings
  • -
  • Privacy Settings
  • -
  • Public Profile Settings
  • -
  • Notification Settings
  • -
  • Change Password
  • -
  • Delete Account
  • +
    +
      +
    • +
      + User Settings + keyboard_arrow_right +
      +
      +
      +
      +
      + {{ edit_profile_settings_form.hidden_tag() }} + {{ wtf.render_field(edit_profile_settings_form.username, material_icon='person') }} + {{ wtf.render_field(edit_profile_settings_form.email, material_icon='email') }} +
      +
      +
      + {{ wtf.render_field(edit_profile_settings_form.submit, material_icon='send') }} +
      +
      +
      +
    • +
    • +
      Privacy Settingskeyboard_arrow_right
      +
      +
      + {{ edit_privacy_settings_form.hidden_tag() }} +
      + {{ wtf.render_field(edit_privacy_settings_form.is_public, id='public-profile') }} +
      +
      +
      + {{ wtf.render_field(edit_privacy_settings_form.show_email, data_action='disable', disabled=true) }} +
      + {{ wtf.render_field(edit_privacy_settings_form.show_last_seen, data_action='disable', disabled=true) }} +
      + {{ wtf.render_field(edit_privacy_settings_form.show_member_since, data_action='disable', disabled=true) }} +
      +
      + {{ wtf.render_field(edit_privacy_settings_form.submit, material_icon='send') }} +
      +
      +
      +
    • +
    • +
      Public Profilekeyboard_arrow_right
      +
      +
      + {{ edit_public_profile_information_form.hidden_tag() }} +
      +
      +
      + user-image +
      +
      +
      +
      +
      +
      + delete +
      +
      +
      + {{ 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.full_name, material_icon='badge') }} + {{ 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.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.submit, material_icon='send') }} +
      +
      +
      +
    • +
    +
    +
+
+
+

General Settings

+

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

+
+
+
    +
  • +
    + Notification Settings + keyboard_arrow_right +
    +
    +
    + {{ edit_notification_settings_form.hidden_tag() }} + {{ wtf.render_field(edit_notification_settings_form.job_status_mail_notification_level, material_icon='notifications') }} +
    + {{ wtf.render_field(edit_notification_settings_form.submit, material_icon='send') }} +
    +
    +
    +
  • +
  • +
    + Change Password + keyboard_arrow_right +
    +
    +
    + {{ change_password_form.hidden_tag() }} + {{ 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') }} +
    + {{ wtf.render_field(change_password_form.submit, material_icon='send') }} +
    +
    +
    +
  • +
  • +
    + Delete Account + keyboard_arrow_right +
    +
    +

    Deleting an account has the following effects:

    +
      +
    • All data associated with your corpora and jobs will be permanently deleted.
    • +
    • All settings will be permanently deleted.
    • +
    + +
    +
diff --git a/app/users/forms.py b/app/users/forms.py index af0e1984..73d72c8d 100644 --- a/app/users/forms.py +++ b/app/users/forms.py @@ -64,11 +64,13 @@ class EditPublicProfileInformationForm(FlaskForm): 'Full name', validators=[Length(max=128)] ) + style={'style': 'overflow: auto;'} about_me = TextAreaField( 'About me', validators=[ Length(max=254) - ] + ], + render_kw=style ) website = StringField( 'Website', diff --git a/app/users/routes.py b/app/users/routes.py index 21e2ff02..bc2e90fb 100644 --- a/app/users/routes.py +++ b/app/users/routes.py @@ -172,5 +172,5 @@ def edit_profile(user_id): change_password_form=change_password_form, edit_notification_settings_form=edit_notification_settings_form, user=user, - title='Edit Profile' + title='User Settings' )