mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2024-11-26 03:11:31 -08:00
55 lines
1.9 KiB
HTML
55 lines
1.9 KiB
HTML
|
{% extends "base.html" %}
|
||
|
|
||
|
{% load crispy_forms_tags %}
|
||
|
|
||
|
{% block content %}
|
||
|
{% url 'accounts:login' as login_url %}
|
||
|
{% url 'accounts:edit_profile' as edit_profile_url %}
|
||
|
{% url 'accounts:password_change' as password_change_url %}
|
||
|
{% url 'audio:new_feed' as new_feed_url %}
|
||
|
|
||
|
{% if request.path == login_url %}
|
||
|
{% firstof 'Login' as submit %}
|
||
|
{% elif request.path == edit_profile_url %}
|
||
|
{% firstof 'Update' as submit %}
|
||
|
{% elif request.path == password_change_url %}
|
||
|
{% firstof 'Update' as submit %}
|
||
|
{% elif request.path == new_feed_url %}
|
||
|
{% firstof 'Submit' as submit %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% include "base_navbar.html" %}
|
||
|
{% include "base_heading.html" %}
|
||
|
|
||
|
<div class="container">
|
||
|
<div class="d-flex flex-column offset-sm-3 col-sm-6 col-xs-12 px-0">
|
||
|
|
||
|
{% if request.path == new_feed_url %}
|
||
|
<form method="POST" enctype="multipart/form-data">
|
||
|
{% elif form_data == "TRUE" %}
|
||
|
<form method="POST" enctype="multipart/form-data">
|
||
|
{% else %}
|
||
|
<form method="POST">
|
||
|
{% endif %}
|
||
|
{% csrf_token %}
|
||
|
{{ form | crispy }}
|
||
|
<div class="mt-3">
|
||
|
<input type="submit" class="btn btn-dark btn-lg" value="{{ submit }}">
|
||
|
</div>
|
||
|
</form><br>
|
||
|
{% if request.path == edit_profile_url %}
|
||
|
<div class="container px-0">
|
||
|
<div class="d-flex flex-column align-items-start">
|
||
|
{% if user.account.use_totp %}
|
||
|
<a type="button" class="btn btn-lg btn-dark mb-4" href="{% url 'accounts:disable_totp' %}">Disable 2fa</a>
|
||
|
{% else %}
|
||
|
<a type="button" class="btn btn-lg btn-dark mb-4" href="{% url 'accounts:enable_totp' %}">Enable 2fa</a>
|
||
|
{% endif %}
|
||
|
<a type="button" class="btn btn-lg btn-dark" href="{% url 'accounts:password_change' %}">Change Password</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endblock %}
|