37 lines
1.6 KiB
HTML
37 lines
1.6 KiB
HTML
{% extends "base.html" %}
|
|
{% load form %}
|
|
{% block content %}
|
|
<h1>
|
|
<i class="ri-user-settings-fill"></i> Mon compte
|
|
</h1>
|
|
{% for error in form.non_field_errors %}<article class="message error">{{ error }}</article>{% endfor %}
|
|
<form method="post" {% if action %}action="{% url action %}"{% endif %}>
|
|
{% csrf_token %}
|
|
<fieldset>
|
|
{% if not user.youtubecredentials.credentials %}
|
|
<a href="{% url "youtube_login" %}" role="button"><i class="ri-youtube-fill"></i> Me connecter au compte Youtube</a>
|
|
{% else %}
|
|
<button type="submit"
|
|
formaction="{% url "youtube_logout" %}"
|
|
class="secondary">
|
|
<i class="ri-youtube-fill"></i> Déconnecter le compte Youtube <strong>{{ user.youtubecredentials.title }}</strong>
|
|
</button>
|
|
{% endif %}
|
|
</fieldset>
|
|
<fieldset>
|
|
{% for field in form %}
|
|
<label for="{{ field.id_for_label }}">
|
|
{{ field.label }}
|
|
{{ field }}
|
|
{% if field.errors %}
|
|
<small id="{{ field.errors.field_id }}_error" class="form-error">{{ field.errors|join:", " }}</small>
|
|
{% endif %}
|
|
</label>
|
|
{% endfor %}
|
|
<button type="submit">Mettre à jour mon compte</button>
|
|
</fieldset>
|
|
<fieldset>
|
|
<a href="{% url "password_change" %}" role="button" class="secondary">Changer mon mot de passe</a>
|
|
</fieldset>
|
|
</form>
|
|
{% endblock content %}
|