-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a button in admin settings to enable/disable validation of organi…
…zer billing (#504) * Add button to toggle billing validation for organizers * Edit active url * Fix isort flake8 warning * Change url display * Resolve conversations * Move enums to module pretix/common * Fix isort
- Loading branch information
Showing
6 changed files
with
110 additions
and
20 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,6 @@ | ||
from enum import StrEnum | ||
|
||
|
||
class ValidStates(StrEnum): | ||
DISABLED = 'disabled' | ||
ENABLED = 'enabled' |
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
49 changes: 49 additions & 0 deletions
49
src/pretix/control/templates/pretixcontrol/toggle_billing_validation.html
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,49 @@ | ||
{% extends "pretixcontrol/admin/base.html" %} | ||
{% load i18n %} | ||
{% load bootstrap3 %} | ||
{% load rich_text %} | ||
|
||
{% block title %}{% trans "Enable or disable billing validation" %}{% endblock %} | ||
{% block content %} | ||
<nav id="event-nav" class="header-nav"> | ||
<div class="navigation"> | ||
<div class="navigation-title"> | ||
<h1>{% trans "Enable or disable billing validation" %}</h1> | ||
</div> | ||
{% include "pretixcontrol/event/component_link.html" %} | ||
</div> | ||
</nav> | ||
<form action="" method="post" class="form-horizontal form-plugins"> | ||
{% csrf_token %} | ||
{% if "success" in request.GET %} | ||
<div class="alert alert-success"> | ||
{% trans "Your changes have been saved." %} | ||
</div> | ||
{% endif %} | ||
<div class="tabbed-form"> | ||
<fieldset> | ||
<legend>{% trans "Enable or disable billing validation" %}</legend> | ||
<div class="table-responsive"> | ||
<table class="table"> | ||
<tr class="{% if billing_validation %}success{% else %}default{% endif %}"> | ||
<td> | ||
<strong>{% trans "Validate billing information" %}</strong> | ||
</td> | ||
<td class="text-right flip" width="20%"> | ||
{% if billing_validation %} | ||
<button class="btn btn-default btn-block" name="billing_validation" value="disabled"> | ||
{% trans "Disabled" %} | ||
</button> | ||
{% else %} | ||
<button class="btn btn-default btn-block" name="billing_validation" value="enabled"> | ||
{% trans "Enabled" %} | ||
</button> | ||
{% endif %} | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</fieldset> | ||
</div> | ||
</form> | ||
{% 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