2017-08-17 13:20:57 -04:00
|
|
|
{% extends 'base.html' %}
|
2018-02-26 22:45:26 -05:00
|
|
|
{% load widget_tweaks %}
|
2017-08-17 13:20:57 -04:00
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row bg-dark-primary">
|
|
|
|
<div class="col-lg-3 ml-auto">
|
2018-01-25 00:18:13 -05:00
|
|
|
<h2 class="d-lg-none text-white mt-3">{{ attorney.first_name }} {{ attorney.last_name }}</h2>
|
2017-08-17 13:20:57 -04:00
|
|
|
<div class="p-2 my-3 shadow bg-white">
|
2017-08-17 14:47:29 -04:00
|
|
|
<img class="d-block mx-auto" src="/media/{{ attorney.image }}" style="max-width: 100%"/>
|
2017-08-17 13:20:57 -04:00
|
|
|
</div>
|
|
|
|
{% if attorney.phone %}<p class="text-white"><i class="fa fa-phone"> {{ attorney.phone_formatted }}</i></p>{% endif %}
|
|
|
|
{% if attorney.email %}<p class="text-white"><i class="fa fa-envelope"> {{ attorney.email }}</i></p>{% endif %}
|
|
|
|
{% if attorney.website %}<p class="text-white"><i class="fa fa-globe"> {{ attorney.website }}</i></p>{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-6 pt-3 bg-light-blue">
|
|
|
|
<div class="col-lg-6">
|
2018-02-26 22:45:26 -05:00
|
|
|
<h2 class="d-none d-lg-inline text-dark-primary">
|
|
|
|
{{ attorney.first_name }} {{ attorney.last_name }}
|
|
|
|
</h2>
|
|
|
|
{% if perms.charter_members.change_attorney or attorney.user == request.user %}
|
|
|
|
<a href="#" data-toggle="modal" data-target="#editModal">Edit</a>
|
|
|
|
{% endif %}
|
2018-01-12 01:54:50 -05:00
|
|
|
<p>{{ attorney.biography | safe }}</p>
|
2017-08-17 13:20:57 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-02-26 22:45:26 -05:00
|
|
|
|
|
|
|
{% if perms.charter_members.change_attorney or attorney.user == request.user %}
|
|
|
|
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title" id="exampleModalLabel">Edit Attorney Information</h5>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<form id="edit" method="post" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-12">
|
|
|
|
Portrait
|
|
|
|
{{ editForm.image|add_class:"form-control" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
|
|
{{ editForm.first_name|add_class:"form-control"|attr:"placeholder:First Name" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
|
|
{{ editForm.last_name|add_class:"form-control"|attr:"placeholder:Last Name" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
|
|
{{ editForm.password1|add_class:"form-control"|attr:"placeholder:Password" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
|
|
{{ editForm.password2|add_class:"form-control"|attr:"placeholder:Confirm Password" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
|
|
{{ editForm.phone|add_class:"form-control"|attr:"placeholder:Phone Number (No Formatting)" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
|
|
{{ editForm.email|add_class:"form-control"|attr:"placeholder:Email" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-8">
|
|
|
|
{{ editForm.address|add_class:"form-control"|attr:"placeholder:Address" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-4">
|
|
|
|
{{ editForm.region|add_class:"form-control" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-12">
|
|
|
|
{{ editForm.website|add_class:"form-control"|attr:"placeholder:Website" }}
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-12">
|
|
|
|
{{ editForm.biography|add_class:"form-control"|attr:"placeholder:Biography" }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
|
|
<button type="submit" class="btn btn-primary" form="edit">Save changes</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-08-17 13:20:57 -04:00
|
|
|
{% endblock %}
|