Fixes html error on edit user page

This commit is contained in:
Mouse Reeve 2021-01-18 11:19:30 -08:00
parent 11dd8c8f82
commit d8ace7e417
2 changed files with 15 additions and 15 deletions

View file

@ -8,40 +8,40 @@
{% endif %} {% endif %}
<form name="edit-profile" action="/edit-profile/" method="post" enctype="multipart/form-data"> <form name="edit-profile" action="/edit-profile/" method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<p class="block"> <div class="block">
<label class="label" for="id_avatar">Avatar:</label> <label class="label" for="id_avatar">Avatar:</label>
{{ form.avatar }} {{ form.avatar }}
{% for error in form.avatar.errors %} {% for error in form.avatar.errors %}
<p class="help is-danger">{{ error | escape }}</p> <p class="help is-danger">{{ error | escape }}</p>
{% endfor %} {% endfor %}
</p> </div>
<p class="block"> <div class="block">
<label class="label" for="id_name">Display name:</label> <label class="label" for="id_name">Display name:</label>
{{ form.name }} {{ form.name }}
{% for error in form.name.errors %} {% for error in form.name.errors %}
<p class="help is-danger">{{ error | escape }}</p> <p class="help is-danger">{{ error | escape }}</p>
{% endfor %} {% endfor %}
</p> </div>
<p class="block"> <div class="block">
<label class="label" for="id_summary">Summary:</label> <label class="label" for="id_summary">Summary:</label>
{{ form.summary }} {{ form.summary }}
{% for error in form.summary.errors %} {% for error in form.summary.errors %}
<p class="help is-danger">{{ error | escape }}</p> <p class="help is-danger">{{ error | escape }}</p>
{% endfor %} {% endfor %}
</p> </div>
<p class="block"> <div class="block">
<label class="label" for="id_email">Email address:</label> <label class="label" for="id_email">Email address:</label>
{{ form.email }} {{ form.email }}
{% for error in form.email.errors %} {% for error in form.email.errors %}
<p class="help is-danger">{{ error | escape }}</p> <p class="help is-danger">{{ error | escape }}</p>
{% endfor %} {% endfor %}
</p> </div>
<p class="block"> <div class="block">
<label class="checkbox label" for="id_manually_approves_followers"> <label class="checkbox label" for="id_manually_approves_followers">
Manually approve followers: Manually approve followers:
{{ form.manually_approves_followers }} {{ form.manually_approves_followers }}
</label> </label>
</p> </div>
<button class="button is-primary" type="submit">Save</button> <button class="button is-primary" type="submit">Save</button>
</form> </form>
</div> </div>
@ -50,14 +50,14 @@
<h2 class="title">Change password</h2> <h2 class="title">Change password</h2>
<form name="edit-profile" action="/change-password/" method="post" enctype="multipart/form-data"> <form name="edit-profile" action="/change-password/" method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<p class="block"> <div class="block">
<label class="label" for="id_password">New password:</label> <label class="label" for="id_password">New password:</label>
<input type="password" name="password" maxlength="128" class="input" required="" id="id_password"> <input type="password" name="password" maxlength="128" class="input" required="" id="id_password">
</p> </div>
<p class="block"> <div class="block">
<label class="label" for="id_confirm_password">Confirm password:</label> <label class="label" for="id_confirm_password">Confirm password:</label>
<input type="password" name="confirm-password" maxlength="128" class="input" required="" id="id_confirm_password"> <input type="password" name="confirm-password" maxlength="128" class="input" required="" id="id_confirm_password">
</p> </div>
<button class="button is-primary" type="submit">Change password</button> <button class="button is-primary" type="submit">Change password</button>
</form> </form>
</div> </div>

View file

@ -185,4 +185,4 @@ class EditUser(View):
user.save() user.save()
broadcast(user, user.to_update_activity(user)) broadcast(user, user.to_update_activity(user))
return redirect('/user/%s' % request.user.localname) return redirect(user.local_path)