Viewport onto your services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

63 lines
2.2 KiB

{% extends "layout/layout.html" %}
{% from "layout/macros.html" import render_field %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li>
<a href="{{ url_for('dashboard.index') }}">Home</a>
</li>
<li class="active">
{{ user.username }} Profile
</li>
</ol>
{% endblock %}
{% block content_header %}
<h1>Profile for {{ user.username }}</h1>
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-10">
<form class="form-horizontal" role="form" action="{{ url_for('users.profile', user_id=user.id) }}"
method="post" name="user_profile_edit">
{% if current_user.id == user.id %}
{{ form.hidden_tag() }}
<div class="col-lg-12">
<h4 class="col-lg-offset-1">Personal Details</h4>
{{ render_field(form.fullname) }}
{{ render_field(form.bio) }}
</div>
<div class="col-lg-12">
<h4 class="col-lg-offset-1">Localisation</h4>
{{ render_field(form.locale) }}
{{ render_field(form.timezone, class_="combobox") }}
</div>
<div class="col-lg-12">
<h4 class="col-lg-offset-1">Project Event Notifications</h4>
{{ render_field(form.notification_type) }}
{{ render_field(form.notification_limit) }}
</div>
<div class="btn-group col-sm-offset-2 col-sm-10" role="group" aria-label="lesson-editing">
{{ render_field(form.submit, False, "primary", btn_group=True) }}
<a class="btn btn-warning" href="{{ url_for_security('change_password') }}" role="button">Change password</a>
{% if current_user.has_role("Admin") %}
<a class="btn btn-info" href="{{ url_for('users.edit', user_id=user.id) }}" role="button">Edit user</a>
{% endif %}
</div>
{% else %}
{{ render_field(form.fullname, static=True) }}
{{ render_field(form.bio, static=True) }}
{% if current_user.has_role("Admin") %}
<a class="btn btn-info" href="{{ url_for('users.edit', user_id=user.id) }}" role="button">Edit user</a>
{% endif %}
{% endif %}
</form>
</div>
</div>
{% endblock %}
{% block body_js %}
<script type="text/javascript" src="/static/js/project_notification.js"></script>
{% endblock %}