mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2025-07-04 03:13:16 -07:00
initial commit
This commit is contained in:
54
tp/templates/base_form.html
Normal file
54
tp/templates/base_form.html
Normal file
@ -0,0 +1,54 @@
|
||||
{% 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 %}
|
Reference in New Issue
Block a user