Skip to content

Commit

Permalink
Merge branch 'main' into signup
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnieBLT authored Feb 4, 2025
2 parents 726bdc4 + efb301b commit 79b66a6
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 83 deletions.
77 changes: 39 additions & 38 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ python-dotenv = "^1.0.1"
Django = "^5.1.5"
dj-database-url = "^2.3.0"
django-allauth = "^0.61.1"
beautifulsoup4 = "^4.12.3"
beautifulsoup4 = "^4.13.1"
django-email-obfuscator = "^0.1.5"
django-gravatar2 = "^1.4.5"
django-import-export = "^4.3.4"
django-import-export = "^4.3.5"
django-annoying = "^0.10.7"
dj-rest-auth = "^5.0.2"
user-agents = "^2.2.0"
Expand All @@ -33,7 +33,7 @@ pytz = "^2024.1"
requests = "^2.32.3"
requests-oauthlib = "^1.3.1"
tablib = "^3.8.0"
ua-parser = "^1.0.0"
ua-parser = "^1.0.1"
djangorestframework = "^3.15.2"
cffi = "^1.17.1"
django-mdeditor = "^0.1.20"
Expand All @@ -49,7 +49,7 @@ pydantic = "^2.10.6"
pydantic_core = "^2.18.4"
unstructured = "^0.16.17"
Markdown = "^3.6"
faiss-cpu = "^1.8.0"
faiss-cpu = "^1.10.0"
psutil = "^5.9.8"
python-bitcoinrpc = "^1.0"
sendgrid = "^6.11.0"
Expand Down
119 changes: 78 additions & 41 deletions website/templates/account/password_change.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@
{% load i18n %}
{% block style %}
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden; /* Prevent scrolling */
}

.min-h-screen {
min-height: 100vh;
}

.inner-addon {
position: relative;
}

.inner-addon .glyphicon {
position: absolute;
padding: 10px;
pointer-events: none;
}

Expand All @@ -46,53 +56,80 @@
</style>
{% endblock style %}
{% block content %}
<div class="row">
<div class="panel-heading">
<div class="panel-title text-center">
<h1 class="text-center">{% trans "Change Password" %}</h1>
<hr />
</div>
</div>
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4">
{% include "includes/sidenav.html" %}
<div class="min-h-screen flex justify-center items-start bg-white overflow-hidden pt-14 ">
<div class="bg-gray p-8 rounded-lg shadow-xl w-full sm:w-96 md:w-1/2 lg:w-1/3 max-w-4xl">
<h1 class="text-center font-bold text-xl mb-6">{% trans "Change Password" %}</h1>
<form method="post"
action="{% url 'account_change_password' %}"
class="password_change">
class="password_change"
id="password-change-form">
{% csrf_token %}
<div class="row main">
<div class="main-issue-form main-center">
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}">
<i class="glyphicon glyphicon-lock"></i>
<input class="form-control"
type="password"
id="id_oldpassword"
name="oldpassword"
placeholder="Old Password">
<span class="help-block">{{ form.oldpassword.errors }}</span>
</div>
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}">
<i class="glyphicon glyphicon-lock"></i>
<input class="form-control"
type="password"
id="id_password1"
name="password1"
placeholder="New Password">
<span class="help-block">{{ form.password1.errors }}</span>
</div>
<div class="form-group inner-addon left-addon {% if form.password2.errors %}has-error{% endif %}">
<i class="glyphicon glyphicon-lock"></i>
<input class="form-control"
type="password"
id="id_password2"
name="password2"
placeholder="Confirm Password">
<span class="help-block">{{ form.password2.errors }}</span>
</div>
<div class="space-y-4">
<!-- Old Password -->
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}">
<i class="glyphicon glyphicon-lock"></i>
<input class="form-control form-input w-full py-2 px-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
type="password"
id="id_oldpassword"
name="oldpassword"
placeholder="Old Password"
value="{{ form.oldpassword.value|default:'' }}">
<span class="help-block">{{ form.oldpassword.errors }}</span>
</div>
<!-- New Password -->
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}">
<i class="glyphicon glyphicon-lock"></i>
<input class="form-control form-input w-full py-2 px-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
type="password"
id="id_password1"
name="password1"
placeholder="New Password"
value="{{ form.password1.value|default:'' }}">
<span class="help-block">{{ form.password1.errors }}</span>
</div>
<!-- Confirm Password -->
<div class="form-group inner-addon left-addon {% if form.password2.errors %}has-error{% endif %}">
<i class="glyphicon glyphicon-lock"></i>
<input class="form-control form-input w-full py-2 px-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
type="password"
id="id_password2"
name="password2"
placeholder="Confirm Password"
value="{{ form.password2.value|default:'' }}">
<span class="help-block">{{ form.password2.errors }}</span>
</div>
<!-- Show Password Checkbox -->
<div class="form-group show-password-checkbox flex items-center space-x-2 space-y-2 ">
<input type="checkbox"
class="form-checkbox text-blue-500"
id="show-password">
<label for="show-password" class="text-lg">{% trans "Show Password" %}</label>
</div>
<div class="mt-4">
<button type="submit"
class="btn btn-success pull-right text-black"
name="action">{% trans "Change Password" %}</button>
class="btn btn-success w-full py-2 bg-green-500 text-white font-semibold rounded-lg shadow-md hover:bg-green-600">
{% trans "Change Password" %}
</button>
</div>
</div>
</form>
</div>
</div>
<script>
// Toggle show password functionality
const showPasswordCheckbox = document.getElementById('show-password');
const passwordFields = document.querySelectorAll('#id_oldpassword, #id_password1, #id_password2');

showPasswordCheckbox.addEventListener('change', function() {
passwordFields.forEach(function(field) {
if (showPasswordCheckbox.checked) {
field.type = 'text';
} else {
field.type = 'password';
}
});
});

</script>
{% endblock content %}

0 comments on commit 79b66a6

Please sign in to comment.