Edit user #160268937
This commit is contained in:
dandds
2018-10-17 15:04:15 -04:00
committed by GitHub
17 changed files with 238 additions and 108 deletions

View File

@@ -26,7 +26,7 @@
</a>
{% if g.current_user %}
<a href="{{ url_for('atst.user') }}" class="topbar__link">
<a href="{{ url_for('users.user') }}" class="topbar__link">
<span class="topbar__link-label">{{ g.current_user.first_name + " " + g.current_user.last_name }}</span>
{{ Icon('avatar', classes='topbar__link-icon') }}
</a>

View File

@@ -2,7 +2,8 @@
{% from "components/options_input.html" import OptionsInput %}
{% from "components/date_input.html" import DateInput %}
<form action='{{ form_action }}'>
<form method="POST" action='{{ form_action }}'>
{{ form.csrf_token }}
<div class='panel'>
<div class='panel__content'>
<div class='form-row'>

View File

@@ -20,7 +20,7 @@
</a>
{% endif %}
<a href="{{ url_for('atst.user') }}" class="topbar__link">
<a href="{{ url_for('users.user') }}" class="topbar__link">
<span class="topbar__link-label">{{ g.current_user.first_name + " " + g.current_user.last_name }}</span>
{{ Icon('avatar', classes='topbar__link-icon') }}
</a>

View File

@@ -3,21 +3,29 @@
{% block content %}
<div class='col'>
{{ Alert('This form does not yet function',
message="<p>Functionality of this form is pending more engineering work. Engineers, please remove this alert when done.</p>",
level='warning'
) }}
{% if form.errors %}
{{ Alert('There were some errors',
message="<p>Please see below.</p>",
level='error'
) }}
{% endif %}
{% if updated %}
{{ Alert('User information updated.', level='success') }}
{% endif %}
<div class='panel'>
<div class='panel__heading'>
<h1>
<div class='h2'>{{ user.first_name }} {{ user.last_name }}</div>
<div class='h3'>DOD ID: {{ user.dod_id }}</div>
<div class='subtitle h3'>Edit user details</div>
</h1>
</div>
</div>
{% set form_action = url_for('atst.save_user') %}
{% set form_action = url_for('users.update_user') %}
{% include "fragments/edit_user_form.html" %}
</div>