first push
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,80 @@
|
||||
{% load static %}
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark text-center">
|
||||
<h5 class="modal-title white w-100" id="myModalLabel160">Update Organization</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
||||
aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<form hx-encoding='multipart/form-data' hx-post='{{request.path}}' novalidate>
|
||||
{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="first-name-column">Company Name</label>
|
||||
{{organization_form.name}}
|
||||
{% for error in organization_form.name.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="last-name-column">Company Email</label>
|
||||
{{organization_form.email}}
|
||||
{% for error in organization_form.email.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="company-column">Company Phone</label>
|
||||
{{organization_form.phone}}
|
||||
{% for error in organization_form.phone.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="company-column">Company Website</label>
|
||||
{{organization_form.website}}
|
||||
{% for error in organization_form.website.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="company-column">Company Currency</label>
|
||||
{{organization_form.currency}}
|
||||
{% for error in organization_form.currency.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-light-secondary"
|
||||
data-bs-dismiss="modal">
|
||||
<i class="bx bx-x d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">Close</span>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-info ml-1"
|
||||
onclick="this.innerHTML = `<span class='spinner-grow spinner-grow-sm' role='status' aria-hidden='true'></span> Saving...`;">
|
||||
<i class="bx bx-check d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
htmx.on("htmx:beforeSwap", (e) => {
|
||||
if (e.detail.target.id == "update-organization-modal-content" && !e.detail.xhr.response) {
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
{% extends 'layouts/main-layout.html' %}
|
||||
{% block content %}
|
||||
<div class="page-heading">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 order-md-1 order-last">
|
||||
<h3>Password Change Done</h3>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-md-2 order-first">
|
||||
<nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="index.html">Dashboard</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Layout Default</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
Your password changed successfully.
|
||||
<a href="{% url 'authentication:logout' %}" class="btn btn-sm btn-danger">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,48 @@
|
||||
{% extends 'layouts/main-layout.html' %}
|
||||
{% block content %}
|
||||
<h3>Change Password</h3>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-7 mx-auto my-3">
|
||||
<form action="" method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
<div class="form-group position-relative has-icon-left">
|
||||
{{form.old_password}}
|
||||
<div class="form-control-icon">
|
||||
<i class="bi bi-shield-lock"></i>
|
||||
</div>
|
||||
</div>
|
||||
{% for error in form.old_password.errors %}
|
||||
<div class="text-danger mb-3">{{ error }}</div>
|
||||
{% endfor %}
|
||||
<div class="form-group position-relative has-icon-left">
|
||||
{{form.new_password1}}
|
||||
<div class="form-control-icon">
|
||||
<i class="bi bi-shield-lock"></i>
|
||||
</div>
|
||||
</div>
|
||||
{% for error in form.new_password1.errors %}
|
||||
<div class="text-danger mb-3">{{ error }}</div>
|
||||
{% endfor %}
|
||||
<p class="text-muted">
|
||||
{{form.new_password1.help_text}}
|
||||
</p>
|
||||
<div class="form-group position-relative has-icon-left">
|
||||
{{form.new_password2}}
|
||||
<div class="form-control-icon">
|
||||
<i class="bi bi-shield-lock"></i>
|
||||
</div>
|
||||
</div>
|
||||
{% for error in form.new_password2.errors %}
|
||||
<div class="text-danger mb-3">{{ error }}</div>
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-info btn-block shadow-lg">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,195 @@
|
||||
{% extends 'layouts/main-layout.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="page-heading">
|
||||
<h3>Profile</h3>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<section class="row">
|
||||
<div class="col-12 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gallery">
|
||||
<div class="col-12 mb-2 py-2 px-2 border">
|
||||
{% if user.profile_pic %}
|
||||
<img class="w-100 active" src="{{request.user.profile_pic.url}}">
|
||||
{% else %}
|
||||
<img class="w-100 active" src="{% static 'assets/images/faces/1.jpg' %}">
|
||||
{% endif %}
|
||||
</div>
|
||||
<h6 class="my-3">
|
||||
<i class="bi bi-person-badge"></i>
|
||||
<span>Contact Information</span>
|
||||
</h6>
|
||||
<p><i class="bi bi-telephone-fill"></i> {{request.user.phone}}</p>
|
||||
<p><i class="bi bi-envelope-fill"></i> {{request.user.email}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- update basic details modal -->
|
||||
<div class="modal fade text-left" id="update-basic-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="update-basic-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- update organization details modal -->
|
||||
<div class="modal fade text-left" id="update-organization-modal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel160" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div id="update-organization-modal-content" class="modal-content" hx-target="this"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h6 class="my-3">
|
||||
<i class="bi bi-person-fill"></i>
|
||||
<span>Basic Information</span>
|
||||
<button type="button" class="btn float-end" data-bs-toggle="modal"
|
||||
hx-get="{% url 'authentication:profile_basic_info_update' %}" hx-target="#update-basic-modal-content"
|
||||
data-bs-toggle="modal" data-bs-target="#update-basic-modal"
|
||||
><i class="bi bi-pencil-fill"></i> </button>
|
||||
</h6>
|
||||
<table class="table table-borderless">
|
||||
|
||||
<tr>
|
||||
<td><b>Full Name</b></td>
|
||||
<td>{{request.user.full_name}}</td>
|
||||
</tr>
|
||||
|
||||
{% if request.user.username %}
|
||||
<tr>
|
||||
<td><b>Username</b></td>
|
||||
<td>{{request.user.username}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<tr>
|
||||
<td><b>Designation</b></td>
|
||||
<td>Administrator</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td><b>Designation</b></td>
|
||||
<td>{{request.user.role}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.address %}
|
||||
<tr>
|
||||
<td><b>Address</b></td>
|
||||
<td>{{request.user.address}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if request.user.department %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h6 class="my-3">
|
||||
<i class="bi bi-person-video3"></i>
|
||||
<span>Department Information</span>
|
||||
</h6>
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td><b>Department</b></td>
|
||||
<td>{{request.user.department}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>Contact Person Name</b></td>
|
||||
<td>{{request.user.department.contact_person_name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Contact Person Number</b></td>
|
||||
<td>{{request.user.department.contact_person_phone}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Contact Person Email</b></td>
|
||||
<td>{{request.user.department.contact_person_email}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h6 class="my-3">
|
||||
<i class="bi bi-building"></i>
|
||||
<span>Organization Information</span>
|
||||
<button type="button" class="btn float-end"
|
||||
hx-get="{% url 'authentication:organization_info_update' %}" hx-target="#update-organization-modal-content"
|
||||
data-bs-toggle="modal" data-bs-target="#update-organization-modal"
|
||||
> <i class="bi bi-pencil-fill"></i> </button>
|
||||
</h6>
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td><b>Organization Name</b></td>
|
||||
<td>{{request.user.organization.name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Organization Website</b></td>
|
||||
<td>{{request.user.organization.website|urlize}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Organization Email</b></td>
|
||||
<td>{{request.user.organization.email}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Organization Phone</b></td>
|
||||
<td>{{request.user.organization.phone}}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><b>Organization Currency</b></td>
|
||||
<td>{{request.user.organization.currency}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not request.user.is_superuser %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h6 class="my-3">
|
||||
<i class="bi bi-building"></i>
|
||||
<span>Company Information</span>
|
||||
</h6>
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td><b>Company Name</b></td>
|
||||
<td>{{request.user.location.office_name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Company Address</b></td>
|
||||
<td>{{request.user.location.address}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Contact Person Name</b></td>
|
||||
<td>{{request.user.location.contact_person_name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Contact Person Number</b></td>
|
||||
<td>{{request.user.location.contact_person_phone}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Contact Person Email</b></td>
|
||||
<td>{{request.user.location.contact_person_email}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,149 @@
|
||||
{% load static %}
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark text-center">
|
||||
<h5 class="modal-title white w-100" id="myModalLabel160">Update Profile</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
||||
aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
<form hx-encoding='multipart/form-data' hx-post='{{request.path}}' novalidate>
|
||||
{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="first-name-column">Full Name</label>
|
||||
{{form.full_name}}
|
||||
{% for error in form.full_name.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="last-name-column">Email</label>
|
||||
{{form.email}}
|
||||
{% for error in form.email.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="company-column">Phone</label>
|
||||
{{form.phone}}
|
||||
{% for error in form.phone.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if address_form is not None %}
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label>Address Line 1</label>
|
||||
{{address_form.address_line_one}}
|
||||
{% for error in address_form.address_line_one.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label>Address Line 2</label>
|
||||
{{address_form.address_line_two}}
|
||||
{% for error in address_form.address_line_two.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label>Country</label>
|
||||
{{address_form.country}}
|
||||
{% for error in address_form.country.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label>State</label>
|
||||
{{address_form.state}}
|
||||
{% for error in address_form.state.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label>City</label>
|
||||
{{address_form.city}}
|
||||
{% for error in address_form.city.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="form-group">
|
||||
<label>Zip Code</label>
|
||||
{{address_form.pin_code}}
|
||||
{% for error in address_form.pin_code.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-md-12col-12 d-flex justify-content-between">
|
||||
<div class="form-group">
|
||||
<label for="company-column">Profile Picture</label>
|
||||
{{form.profile_pic}}
|
||||
{% for error in form.profile_pic.errors %}
|
||||
<small class="text-danger mb-3">{{ error }}</small>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="form-group rounded" id="imagePreview">
|
||||
{% if user.profile_pic %}
|
||||
<img src="{{user.profile_pic.url}}" class="rounded" width="100" height="80" onerror="this.parentElement.innerHTML = '';"/>
|
||||
{% else %}
|
||||
<img src="{% static 'assets/images/faces/1.jpg' %}" class="rounded" width="100" height="80"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-sm btn-light-secondary"
|
||||
data-bs-dismiss="modal">
|
||||
<i class="bx bx-x d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">Close</span>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-sm btn-info ml-1"
|
||||
onclick="this.innerHTML = `<span class='spinner-grow spinner-grow-sm' role='status' aria-hidden='true'></span> Saving...`;">
|
||||
<i class="bx bx-check d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
htmx.on("htmx:beforeSwap", (e) => {
|
||||
if (e.detail.target.id == "update-basic-modal-content" && !e.detail.xhr.response) {
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
function filePreview(input){
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
$('#imagePreview + img').remove();
|
||||
$('#imagePreview').after('<img src="'+e.target.result+'" class="rounded" width="100" height="80"/>');
|
||||
};
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
}
|
||||
$("#inputFile").change(function () {
|
||||
$('#imagePreview img').remove();
|
||||
filePreview(this);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
||||
{% autoescape off %}
|
||||
Hi, {{user.full_name}}
|
||||
Please click on the link to confirm your registration,
|
||||
<a href="{{ url }}{% url 'authentication:activate' uidb64=uid token=token %}"
|
||||
target="_blank" rel="noopener noreferrer">Activation Link</a>
|
||||
{% endautoescape %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% autoescape off %}
|
||||
Hi, {{user.full_name}}
|
||||
Please click on the link to confirm your new email address,
|
||||
<a href="{{ url }}{% url 'authentication:activate' uidb64=uid token=token %}"
|
||||
target="_blank" rel="noopener noreferrer">Activation Link</a>
|
||||
{% endautoescape %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% autoescape off %}
|
||||
Hi, {{user.full_name}}
|
||||
</br></br>
|
||||
You're receiving this e-mail because you requested a password reset for your user account at {{ site_name }}.
|
||||
</br></br>
|
||||
Please go to the following page and choose a new password:
|
||||
{% block reset_link %}
|
||||
<a href="{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}"
|
||||
target="_blank" rel="noopener noreferrer">Password Reset Link</a>
|
||||
{% endblock %}
|
||||
</br></br>
|
||||
Thanks for using our site!
|
||||
</br></br>
|
||||
The {{ site_name }} team.
|
||||
{% endautoescape %}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user