implement mail address deletion
- implement managemails.views.DeleteMailAddress - add get_context_data to AddMailAddress to add customer to template context - add URL pattern 'delete_mailaddress' to managemails.urls - add template hostingpackages/customerhostingpackage_detail.html - add entry to changelog
This commit is contained in:
parent
af27400077
commit
bebcad8c86
4 changed files with 71 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
{% extends "managemails/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% spaceless %}
|
||||
{% if user == customer %}
|
||||
{% blocktrans %}Delete Mail Address {{ mailaddress }}{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with full_name=customer.get_full_name %}Delete Mail Address {{ mailaddress }} of Customer {{ full_name }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% endspaceless %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% spaceless %}
|
||||
{% if user == customer %}
|
||||
{% blocktrans %}Delete Mail Address {{ mailaddress }}{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with full_name=customer.get_full_name %}Delete Mail Address {{ mailaddress }} of Customer {{ full_name }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% endspaceless %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="panel panel-warning">
|
||||
<div class="panel-body">
|
||||
{% blocktrans %}Do you really want to delete the mail address {{ mailaddress }}?{% endblocktrans %}
|
||||
</div>
|
||||
<div class="panel-body form">
|
||||
<form action="{% url 'delete_mailaddress' package=hostingpackage.id domain=maildomain.domain pk=mailaddress.id %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input class="btn btn-warning" type="submit" value="{% trans "Yes, do it!" %}" />
|
||||
<a class="btn btn-default" href="{{ hostingpackage.get_absolute_url }}">{% trans "Cancel" %}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue