Merge pull request #337 from dod-ccpo/user-profile-screen
User profile screen
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
</a>
|
||||
|
||||
{% if g.current_user %}
|
||||
<a href="{{ url_for('atst.home') }}" class="topbar__link">
|
||||
<a href="{{ url_for('atst.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>
|
||||
|
38
templates/fragments/edit_user_form.html
Normal file
38
templates/fragments/edit_user_form.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
{% from "components/options_input.html" import OptionsInput %}
|
||||
{% from "components/date_input.html" import DateInput %}
|
||||
|
||||
<form action='{{ form_action }}'>
|
||||
<div class='panel'>
|
||||
<div class='panel__content'>
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(form.first_name) }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(form.last_name) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='form-row'>
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(form.email, validation='email') }}
|
||||
</div>
|
||||
|
||||
<div class='form-col form-col--half'>
|
||||
{{ TextInput(form.phone_number, validation='usPhone') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ OptionsInput(form.service_branch) }}
|
||||
{{ OptionsInput(form.citizenship) }}
|
||||
{{ OptionsInput(form.designation) }}
|
||||
{{ DateInput(form.date_latest_training,tooltip="When was the last time you completed the IA training? <br> Information Assurance (IA) training is an important step in cyber awareness.",placeholder="MM / DD / YYYY", validation="date") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='action-group'>
|
||||
<button class='usa-button usa-button-big' type='submit'>Save Details</button>
|
||||
</div>
|
||||
</form>
|
@@ -20,7 +20,7 @@
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ url_for('atst.home') }}" class="topbar__link">
|
||||
<a href="{{ url_for('atst.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>
|
||||
|
24
templates/user/edit.html
Normal file
24
templates/user/edit.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "components/alert.html" import Alert %}
|
||||
|
||||
{% 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'
|
||||
) }}
|
||||
|
||||
<div class='panel'>
|
||||
<div class='panel__heading'>
|
||||
<h1>
|
||||
<div class='h2'>{{ user.first_name }} {{ user.last_name }}</div>
|
||||
<div class='subtitle h3'>Edit user details</div>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set form_action = url_for('atst.save_user') %}
|
||||
{% include "fragments/edit_user_form.html" %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user