Remove duplicate functionality

- remove customer hosting package list
- replace useless dashboard with redirect
- move all hosting package list for superuser to top level menu item
- replace btn-default with btn-secondary
- improve email address management page
This commit is contained in:
Jan Dittberner 2023-04-29 12:35:49 +02:00
parent 2d05580ed3
commit 866f6c8083
16 changed files with 142 additions and 214 deletions

View file

@ -15,37 +15,20 @@
<thead> <thead>
<tr> <tr>
<th>{% translate "Name" %}</th> <th>{% translate "Name" %}</th>
<th>{% translate "Disk space" %}</th> <th>{% translate "Setup date" %}</th>
<th>{% translate "Mailboxes" %}</th>
<th>{% translate "Databases" %}</th>
<th>{% translate "Actions" %}</th> <th>{% translate "Actions" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for package in hosting_packages %} {% for package in hosting_packages %}
<tr> <tr>
<th><a href="{{ package.get_absolute_url }}" <td><a href="{{ package.get_absolute_url }}"
title="{% blocktranslate with packagename=package.name trimmed %} title="{% blocktranslate with packagename=package.name trimmed %}
Show details for {{ packagename }} Show details for {{ packagename }}
{% endblocktranslate %}">{{ package.name }}</a> {% endblocktranslate %}">{{ package.name }}</a>
</th> </td>
<th> <td>{{ package.created }}</td>
{% with diskspace=package.get_disk_space %} <td></td>
<span title="{% blocktranslate trimmed %}
The reserved disk space for your hosting package is {{ diskspace }} bytes.
{% endblocktranslate %}">{{ diskspace|filesizeformat }}</span>
{% endwith %}
</th>
<th>
{% blocktranslate with num=package.used_mailbox_count total=package.mailbox_count trimmed %}
used {{ num }} of {{ total }}
{% endblocktranslate %}</th>
<th>{% for dbtype in package.get_databases %}
{{ dbtype.number }}
{% include "userdbs/snippets/db_type.html" with db_type=dbtype.db_type %}
{% if not forloop.last %} / {% endif %}
{% endfor %}</th>
<th></th>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View file

@ -4,6 +4,7 @@ This module defines the views for the gnuviechadmin customer dashboard.
""" """
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import redirect
from django.views.generic import DetailView, TemplateView from django.views.generic import DetailView, TemplateView
from gvacommon.viewmixins import StaffOrSelfLoginRequiredMixin from gvacommon.viewmixins import StaffOrSelfLoginRequiredMixin
@ -18,6 +19,11 @@ class IndexView(LoginRequiredMixin, TemplateView):
template_name = "dashboard/index.html" template_name = "dashboard/index.html"
def dispatch(self, request, *args, **kwargs):
if not request.user.is_anonymous:
return redirect("customer_dashboard", slug=request.user.username)
return super().dispatch(request, *args, **kwargs)
class UserDashboardView(StaffOrSelfLoginRequiredMixin, DetailView): class UserDashboardView(StaffOrSelfLoginRequiredMixin, DetailView):
""" """

View file

@ -11,6 +11,9 @@
<th>{% translate "Name" %}</th> <th>{% translate "Name" %}</th>
<th>{% translate "Customer" %}</th> <th>{% translate "Customer" %}</th>
<th>{% translate "OS User" %}</th> <th>{% translate "OS User" %}</th>
<th>{% translate "Disk space" %}</th>
<th>{% translate "Mailboxes" %}</th>
<th>{% translate "Databases" %}</th>
<th>{% translate "Setup date" %}</th> <th>{% translate "Setup date" %}</th>
</tr> </tr>
</thead> </thead>
@ -21,6 +24,22 @@
<td> <td>
<a href="{% url 'customer_dashboard' slug=package.customer.username %}">{{ package.customer }}</a> <a href="{% url 'customer_dashboard' slug=package.customer.username %}">{{ package.customer }}</a>
</td> </td>
<td>
{% with diskspace=package.get_disk_space %}
<span title="{% blocktranslate trimmed %}
The reserved disk space for your hosting package is {{ diskspace }} bytes.
{% endblocktranslate %}">{{ diskspace|filesizeformat }}</span>
{% endwith %}
</td>
<td>
{% blocktranslate with num=package.used_mailbox_count total=package.mailbox_count trimmed %}
used {{ num }} of {{ total }}
{% endblocktranslate %}</td>
<td>{% for dbtype in package.get_databases %}
{{ dbtype.number }}
{% include "userdbs/snippets/db_type.html" with db_type=dbtype.db_type %}
{% if not forloop.last %} / {% endif %}
{% endfor %}</td>
<td>{{ package.osuser.username }}</td> <td>{{ package.osuser.username }}</td>
<td>{{ package.created }}</td> <td>{{ package.created }}</td>
</tr> </tr>

View file

@ -1,48 +0,0 @@
{% extends "hostingpackages/base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% spaceless %}
{% if user == customer %}
{% translate "Your hosting packages" %}
{% else %}
{% blocktranslate with customer=customer.get_full_name trimmed %}Hosting Packages of
{{ customer }}{% endblocktranslate %}
{% endif %}
{% endspaceless %}{% endblock title %}
{% block page_title %}{% spaceless %}
{% if user == customer %}
{% translate "Your hosting packages" %}
{% else %}
{% blocktranslate with customer=customer.get_full_name trimmed %}Hosting Packages
<small>of {{ customer }}</small>{% endblocktranslate %}
{% endif %}
{% endspaceless %}{% endblock page_title %}
{% block content %}
{% if customerhostingpackage_list %}
<table class="table table-condensed">
<thead>
<tr>
<th>{% translate "Name" %}</th>
<th>{% translate "Setup date" %}</th>
</tr>
</thead>
<tbody>
{% for package in customerhostingpackage_list %}
<tr>
<td><a href="{{ package.get_absolute_url }}">{{ package.name }}</a></td>
<td>{{ package.created }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-info">
{% if user == customer %}{% translate "You have no hosting packages setup yet." %}{% else %}
{% translate "There are no hosting packages setup for this customer yet." %}{% endif %}</p>
{% endif %}
{% if user.is_staff %}
<p><a href="{% url 'create_customer_hosting_package' user=customer.username %}"
class="btn btn-primary">{% translate "Add hosting package" %}</a></p>
{% endif %}
{% endblock content %}

View file

@ -12,7 +12,6 @@ from .views import (
CreateCustomerHostingPackage, CreateCustomerHostingPackage,
CreateHostingPackage, CreateHostingPackage,
CustomerHostingPackageDetails, CustomerHostingPackageDetails,
CustomerHostingPackageList,
HostingOptionChoices, HostingOptionChoices,
) )
@ -23,11 +22,6 @@ urlpatterns = [
AllCustomerHostingPackageList.as_view(), AllCustomerHostingPackageList.as_view(),
name="all_hosting_packages", name="all_hosting_packages",
), ),
re_path(
r"^(?P<user>[-\w0-9@.+_]+)/$",
CustomerHostingPackageList.as_view(),
name="hosting_packages",
),
re_path( re_path(
r"^(?P<user>[-\w0-9@.+_]+)/create$", r"^(?P<user>[-\w0-9@.+_]+)/create$",
CreateCustomerHostingPackage.as_view(), CreateCustomerHostingPackage.as_view(),

View file

@ -149,35 +149,6 @@ class AllCustomerHostingPackageList(StaffUserRequiredMixin, ListView):
) )
class CustomerHostingPackageList(StaffOrSelfLoginRequiredMixin, ListView):
"""
This view is used for showing a list of a customer's hosting packages.
"""
model = CustomerHostingPackage
customer = None
def get_customer_object(self):
if self.customer is None:
self.customer = get_object_or_404(
get_user_model(), username=self.kwargs["user"]
)
return self.customer
def get_context_data(self, **kwargs):
context = super(CustomerHostingPackageList, self).get_context_data(**kwargs)
context["customer"] = self.get_customer_object()
return context
def get_queryset(self):
return (
super(CustomerHostingPackageList, self)
.get_queryset()
.filter(customer__username=self.kwargs["user"])
)
class HostingOptionChoices(StaffUserRequiredMixin, DetailView): class HostingOptionChoices(StaffUserRequiredMixin, DetailView):
""" """
This view displays choices of hosting options for a customer hosting This view displays choices of hosting options for a customer hosting

View file

@ -4,9 +4,9 @@
{% block page_title %}{% translate "E-mail Addresses" %}{% endblock page_title %} {% block page_title %}{% translate "E-mail Addresses" %}{% endblock page_title %}
{% block content %} {% block content %}
{% if user.emailaddress_set.all %} {% if user.emailaddress_set.all %}
<p>{% translate 'The following e-mail addresses are associated with your account:' %}</p> <p>{% translate 'The following e-mail addresses are associated with your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list" method="post"> <form action="{% url 'account_email' %}" class="email_list" method="post">
{% csrf_token %} {% csrf_token %}
<table class="table table-condensed"> <table class="table table-condensed">
<thead> <thead>
@ -14,6 +14,7 @@
<th>{% translate "Email address" %}</th> <th>{% translate "Email address" %}</th>
<th>{% translate "Verified" %}</th> <th>{% translate "Verified" %}</th>
<th>{% translate "Primary" %}</th> <th>{% translate "Primary" %}</th>
<th>{% translate "Selection" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -22,54 +23,68 @@
<td>{{ emailaddress.email }}</td> <td>{{ emailaddress.email }}</td>
<td> <td>
{% if emailaddress.verified %} {% if emailaddress.verified %}
<span class="verified">{% translate "Verified" %}</span> <span class="text-success"><i class="bi-check-circle-fill" title="{% translate "Verified" %}"></i></span>
{% else %} {% else %}
<span class="unverified">{% translate "Unverified" %}</span> <span class="text-warning"><i class="bi-dash-circle-fill" title="{% translate "Unverified" %}"></i></span>
{% endif %} {% endif %}
</td> </td>
<td> <td>
{% if emailaddress.primary %} {% if emailaddress.primary %}
<span class="glyphicon glyphicon-star" title="{% translate "This is the current primary Email address" %}"></span> <span class="text-success"><i class="bi-check-circle-fill" title="{% translate "This is the current primary Email address" %}"></i></span>
{% else %} {% else %}
<span class="glyphicon glyphicon-star-empty"></span> <span class="text-secondary"><i class="bi-circle"></i></span>
{% endif %} {% endif %}
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}" /> </td>
<td>
<input id="email_radio_{{ forloop.counter }}" type="radio" name="email"
{% if emailaddress.primary %}checked="checked"{% endif %}
value="{{ emailaddress.email }}"/><label
for="email_radio_{{ forloop.counter }}"
aria-label="{% blocktranslate trimmed with address=emailaddress.email %}
Select {{ address }}
{% endblocktranslate %}"></label>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<p> <p>
<button class="btn btn-default" type="submit" name="action_primary" >{% translate 'Make Primary' %}</button> {% if user.emailaddress_set.count > 1 %}
<button class="btn btn-default" type="submit" name="action_send" >{% translate 'Re-send Verification' %}</button> <button class="btn btn-secondary" type="submit"
<button class="btn btn-warning" type="submit" name="action_remove" >{% translate 'Remove' %}</button> name="action_primary">{% translate 'Make Primary' %}</button>
{% endif %}
<button class="btn btn-secondary" type="submit"
name="action_send">{% translate 'Re-send Verification' %}</button>
<button class="btn btn-warning" type="submit" name="action_remove">{% translate 'Remove' %}</button>
</p> </p>
</form> </form>
{% else %} {% else %}
<p class="text-warning"><strong>{% translate 'Warning:'%}</strong> {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p> <p class="text-warning">
{% endif %} <strong>{% translate 'Warning:' %}</strong> {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}
</p>
{% endif %}
<h2>{% translate "Add E-mail Address" %}</h2> <h2>{% translate "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email"> <form method="post" action="{% url 'account_email' %}" class="add_email">
{% csrf_token %} {% csrf_token %}
{{ form | crispy }} {{ form | crispy }}
<button name="action_add" type="submit" class="btn btn-primary">{% translate "Add E-mail" %}</button> <button name="action_add" type="submit" class="btn btn-primary">{% translate "Add E-mail" %}</button>
</form> </form>
{% endblock content %} {% endblock content %}
{% block extra_js %} {% block extra_js %}
<script type="text/javascript"> <script type="text/javascript">
(function() { (function () {
var message = "{% translate 'Do you really want to remove the selected e-mail address?' %}"; const message = "{% translate 'Do you really want to remove the selected e-mail address?' %}";
var actions = document.getElementsByName('action_remove'); let actions = document.getElementsByName('action_remove');
if (actions.length) { if (actions.length) {
actions[0].addEventListener("click", function(e) { actions[0].addEventListener("click", function (e) {
if (! confirm(message)) { if (!confirm(message)) {
e.preventDefault(); e.preventDefault();
} }
}); });
} }
})(); })();
</script> </script>
{% endblock extra_js %} {% endblock extra_js %}

View file

@ -11,7 +11,7 @@
{% endblocktranslate %}</p> {% endblocktranslate %}</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}"> <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %} {% csrf_token %}
<button type="submit" class="btn btn-default">{% translate 'Confirm' %}</button> <button type="submit" class="btn btn-primary">{% translate 'Confirm' %}</button>
</form> </form>
{% else %} {% else %}
{% url 'account_email' as email_url %} {% url 'account_email' as email_url %}

View file

@ -14,7 +14,7 @@
{% if redirect_field_value %} {% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/> <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %} {% endif %}
<a class="btn btn-default" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a> <a class="btn btn-secondary" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a>
<button class="btn btn-primary" type="submit">{% translate "Sign In" %}</button> <button class="btn btn-primary" type="submit">{% translate "Sign In" %}</button>
</form> </form>
</div> </div>

View file

@ -23,13 +23,7 @@
<body> <body>
<nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
<div class="container"> <div class="container">
<a class="navbar-brand" href="{% spaceless %} <a class="navbar-brand" href="{% url 'dashboard' %}" title="{% translate "Dashboard" %}">gnuviechadmin</a>
{% if user.is_authenticated %}
{% url 'customer_dashboard' slug=user.username %}
{% else %}
{% url 'dashboard' %}
{% endif %}
{% endspaceless %}" title="{% translate "Dashboard" %}">gnuviechadmin</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent"
aria-controls="navbarContent" aria-expanded="false" aria-label="{% translate "Toggle navigation" %}"> aria-controls="navbarContent" aria-expanded="false" aria-label="{% translate "Toggle navigation" %}">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@ -37,21 +31,12 @@
<div class="collapes navbar-collapse" id="navbarContent"> <div class="collapes navbar-collapse" id="navbarContent">
<ul class="navbar-nav me-auto mb-2 mg-lg-0"> <ul class="navbar-nav me-auto mb-2 mg-lg-0">
{% if user.is_staff %} {% if user.is_staff %}
<li class="nav-item dropdown{% if active_item == 'hostingpackage' %} active{% endif %}"> <li class="nav-item{% if active_item == "hosting" %} active{% endif %}">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" <a class="nav-link" href="{% url 'all_hosting_packages' %}">
aria-expanded="false"><i class="bi-server"></i> {% translate "Hosting" %}</a> <i class="bi-boxes"></i> {% translate "Hosting" %}</a>
<ul class="dropdown-menu" role="menu">
<li><a class="dropdown-item" href="{% url 'hosting_packages' user=user.username %}"><i
class="bi-box2-fill"></i> {% translate "Your hosting packages" %}</a></li>
<li><a class="dropdown-item" href="{% url 'all_hosting_packages' %}"><i
class="bi-boxes"></i> {% translate "All hosting packages" %}</a></li>
</ul>
</li> </li>
{% elif user.is_authenticated %}
<li class="nav-item{% if active_item == 'hostingpackage' %} active{% endif %}"><a
class="nav-link" href="{% url 'hosting_packages' user=user.username %}"><i
class="bi-server"></i> {% translate "Hosting" %}</a></li>
{% endif %} {% endif %}
{% if user.is_authenticated %}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button"
aria-expanded="false"><i class="bi-link"></i> {% translate "Links" %} </a> aria-expanded="false"><i class="bi-link"></i> {% translate "Links" %} </a>
@ -67,11 +52,13 @@
class="icon-postgres"></i> {% translate "phpPgAdmin" %}</a></li> class="icon-postgres"></i> {% translate "phpPgAdmin" %}</a></li>
</ul> </ul>
</li> </li>
{% endif %}
<li class="nav-item{% if active_item == 'imprint' %} active{% endif %}"><a <li class="nav-item{% if active_item == 'imprint' %} active{% endif %}"><a
class="nav-link" href="{% url 'imprint' %}"><i class="bi-info"></i> {% translate "Imprint" %} class="nav-link" href="{% url 'imprint' %}"><i class="bi-info"></i> {% translate "Imprint" %}
</a></li> </a></li>
<li class="nav-item{% if active_item == 'privacy' %} active{% endif %}"><a <li class="nav-item{% if active_item == 'privacy' %} active{% endif %}"><a
class="nav-link" href="{% url 'privacy' %}"><i class="bi-file-text"></i> {% translate "Privacy policy" %} class="nav-link" href="{% url 'privacy' %}"><i
class="bi-file-text"></i> {% translate "Privacy policy" %}
</a></li> </a></li>
<li class="nav-item{% if active_item == 'contact' %} active{% endif %}"><a <li class="nav-item{% if active_item == 'contact' %} active{% endif %}"><a
class="nav-link" href="{% url 'contact_form' %}"><i class="nav-link" href="{% url 'contact_form' %}"><i
@ -79,7 +66,7 @@
</ul> </ul>
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% user_display user as user_display %} {% user_display user as user_display %}
{% url 'user_profile' slug=user.username as profile_url %} {% url 'customer_dashboard' slug=user.username as profile_url %}
{% if user.is_impersonate %} {% if user.is_impersonate %}
{% user_display user.impersonator as impersonator_display %} {% user_display user.impersonator as impersonator_display %}
{% url 'impersonate-stop' as stop_impersonation_url %} {% url 'impersonate-stop' as stop_impersonation_url %}
@ -87,7 +74,8 @@
Signed in as Signed in as
<a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a> <a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a>
<i class="bi-incognito" title="impersonated by {{ impersonator_display }}"></i> <i class="bi-incognito" title="impersonated by {{ impersonator_display }}"></i>
<a href="{{ stop_impersonation_url }}" class="navbar-link"><i class="bi-sign-stop" title="stop impersonation"></i></a> <a href="{{ stop_impersonation_url }}" class="navbar-link"><i class="bi-sign-stop"
title="stop impersonation"></i></a>
{% endblocktranslate %}</span> {% endblocktranslate %}</span>
{% else %} {% else %}
<span class="navbar-text justify-content-end">{% blocktranslate trimmed %} <span class="navbar-text justify-content-end">{% blocktranslate trimmed %}

View file

@ -10,8 +10,8 @@
{% if page.object_list %} {% if page.object_list %}
<ul class="list-group"> <ul class="list-group">
{% for user in page.object_list %} {% for user in page.object_list %}
<li class="list-group-item"><a href="{% url 'impersonate-start' user.pk %}{{ redirect }}">{{ user }}</a> <li class="list-group-item"><a href="{% url 'impersonate-start' user.pk %}{{ redirect }}">
- Impersonate {% blocktranslate %}Impersonate {{ user }}{% endblocktranslate %}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -13,15 +13,15 @@
placeholder="{% translate "user name part" %}" value="{% if query %}{{ query }}{% endif %}"> placeholder="{% translate "user name part" %}" value="{% if query %}{{ query }}{% endif %}">
</div> </div>
<button type="submit" class="btn btn-primary">{% translate "Search" %}</button> <button type="submit" class="btn btn-primary">{% translate "Search" %}</button>
<a class="btn btn-secondary" href="{% url 'impersonate-list' %}">{% translate "List all users" %}</a> <a class="btn btn-link" href="{% url 'impersonate-list' %}">{% translate "List all users" %}</a>
</form> </form>
<p> <p>
{% if query and page.object_list %} {% if query and page.object_list %}
<ul class="list-group"> <ul class="list-group">
{% for user in page.object_list %} {% for user in page.object_list %}
<li class="list-group-item"><a <li class="list-group-item"><a href="{% url 'impersonate-start' user.pk %}{{ redirect }}">
href="{% url 'impersonate-start' user.pk %}{{ redirect }}">{{ user }}</a> - Impersonate {% blocktranslate %}Impersonate {{ user }}{% endblocktranslate %}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -31,7 +31,7 @@
method="post"> method="post">
{% csrf_token %} {% csrf_token %}
<input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/> <input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/>
<a class="btn btn-default" href="{{ hostingpackage.get_absolute_url }}">{% translate "Cancel" %}</a> <a class="btn btn-secondary" href="{{ hostingpackage.get_absolute_url }}">{% translate "Cancel" %}</a>
</form> </form>
</div> </div>
</div> </div>

View file

@ -39,7 +39,7 @@
<form action="{% url 'delete_ssh_key' package=hostingpackage.id pk=key.id %}" method="post"> <form action="{% url 'delete_ssh_key' package=hostingpackage.id pk=key.id %}" method="post">
{% csrf_token %} {% csrf_token %}
<input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/> <input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/>
<a class="btn btn-default" href="{% url 'list_ssh_keys' package=hostingpackage.id %}" <a class="btn btn-secondary" href="{% url 'list_ssh_keys' package=hostingpackage.id %}"
title="{% translate "Cancel and go back to the SSH key list" %}">{% translate "Cancel" %}</a> title="{% translate "Cancel and go back to the SSH key list" %}">{% translate "Cancel" %}</a>
</form> </form>
</div> </div>

View file

@ -40,7 +40,7 @@
method="post"> method="post">
{% csrf_token %} {% csrf_token %}
<input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/> <input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/>
<a class="btn btn-default" href="{{ hostingpackage.get_absolute_url }}">{% translate "Cancel" %}</a> <a class="btn btn-secondary" href="{{ hostingpackage.get_absolute_url }}">{% translate "Cancel" %}</a>
</form> </form>
</div> </div>
</div> </div>

View file

@ -36,7 +36,7 @@
method="post" class="form"> method="post" class="form">
{% csrf_token %} {% csrf_token %}
<input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/> <input class="btn btn-warning" type="submit" value="{% translate "Yes, do it!" %}"/>
<a class="btn btn-default" href="{{ hostingpackage.get_absolute_url }}">{% translate "Cancel" %}</a> <a class="btn btn-secondary" href="{{ hostingpackage.get_absolute_url }}">{% translate "Cancel" %}</a>
</form> </form>
</div> </div>
</div> </div>