forked from mozilla/kitsune
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added UI for changing and deleting group avatars [bug 663805]
- Loading branch information
Showing
9 changed files
with
230 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{# vim: set ts=2 et sts=2 sw=2: #} | ||
{% extends "groups/base.html" %} | ||
{% set title = _('Delete {group} group avatar')|f(group=profile.group.name) %} | ||
|
||
{% block content %} | ||
<article id="avatar-delete" class="main"> | ||
<h1>{{ _('Are you sure you want to delete the {group} group avatar?')|f(group=profile.group.name) }}</h1> | ||
<div id="avatar-preview"> | ||
<img src="{{ group_avatar(profile) }}" alt=""> | ||
</div> | ||
|
||
<form action="" method="post"> | ||
{{ csrf() }} | ||
<p> | ||
{% trans %} | ||
You are about to permanently delete the avatar. | ||
<strong>This cannot be undone!</strong> | ||
You can always upload another avatar to replace the current one. | ||
{% endtrans %} | ||
</p> | ||
<div class="form-actions"> | ||
<input type="submit" class="btn" value="{{ _('Delete avatar') }}" /> | ||
<a href="{{ url('groups.profile', profile.slug) }}">{{ _('Cancel') }}</a> | ||
</div> | ||
</form> | ||
</article> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{# vim: set ts=2 et sts=2 sw=2: #} | ||
{% extends "groups/base.html" %} | ||
{% set title = _('Change {group} group avatar')|f(group=profile.group.name) %} | ||
|
||
{% block content %} | ||
<article id="change-avatar" class="main"> | ||
<h1>{{ title }}</h1> | ||
<form method="post" action="" enctype="multipart/form-data"> | ||
{{ csrf() }} | ||
<ul> | ||
{{ form.as_ul()|safe }} | ||
</ul> | ||
<div class="submit"> | ||
<input type="submit" value="{{ _('Upload', 'avatar') }}" /> | ||
<a href="{{ url('groups.profile', profile.slug) }}">{{ _('Cancel') }}</a> | ||
</div> | ||
</form> | ||
</article> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters