Tax rule editor: Show edit history

This commit is contained in:
Raphael Michel
2020-12-11 15:37:48 +01:00
parent 2cd5094393
commit 246d150511

View File

@@ -18,103 +18,117 @@
<form action="" method="post" class="form-horizontal"> <form action="" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<div class="tabbed-form"> <div class="row">
<fieldset> <div class="col-xs-12 col-lg-10">
<legend>{% trans "General" %}</legend> <div class="tabbed-form">
{% bootstrap_field form.name layout="control" %} <fieldset>
{% bootstrap_field form.rate addon_after="%" layout="control" %} <legend>{% trans "General" %}</legend>
{% bootstrap_field form.price_includes_tax layout="control" %} {% bootstrap_field form.name layout="control" %}
</fieldset> {% bootstrap_field form.rate addon_after="%" layout="control" %}
<fieldset> {% bootstrap_field form.price_includes_tax layout="control" %}
<legend>{% trans "Advanced" %}</legend> </fieldset>
<div class="alert alert-legal"> <fieldset>
{% blocktrans trimmed with docs="https://docs.pretix.eu/en/latest/user/events/taxes.html" %} <legend>{% trans "Advanced" %}</legend>
These settings are intended for advanced users. See the <div class="alert alert-legal">
<a href="{{ docs }}">documentation</a> {% blocktrans trimmed with docs="https://docs.pretix.eu/en/latest/user/events/taxes.html" %}
for more information. Note that we are not responsible for the correct handling These settings are intended for advanced users. See the
of taxes in your ticket shop. If in doubt, please contact a lawyer or tax consultant. <a href="{{ docs }}">documentation</a>
{% endblocktrans %} for more information. Note that we are not responsible for the correct handling
</div> of taxes in your ticket shop. If in doubt, please contact a lawyer or tax consultant.
{% bootstrap_field form.eu_reverse_charge layout="control" %} {% endblocktrans %}
{% bootstrap_field form.home_country layout="control" %} </div>
<h3>{% trans "Custom taxation rules" %}</h3> {% bootstrap_field form.eu_reverse_charge layout="control" %}
<div class="alert alert-warning"> {% bootstrap_field form.home_country layout="control" %}
{% blocktrans trimmed %} <h3>{% trans "Custom taxation rules" %}</h3>
These settings are intended for professional users with very specific taxation situations. <div class="alert alert-warning">
If you create any rule here, the reverse charge settings above will be ignored. The rules will be {% blocktrans trimmed %}
checked in order and once the first rule matches the order, it will be used and all further rules will These settings are intended for professional users with very specific taxation situations.
be ignored. If no rule matches, tax will be charged. If you create any rule here, the reverse charge settings above will be ignored. The rules will be
{% endblocktrans %} checked in order and once the first rule matches the order, it will be used and all further rules will
{% trans "All of these rules will only apply if an invoice address is set." %} be ignored. If no rule matches, tax will be charged.
</div> {% endblocktrans %}
{% trans "All of these rules will only apply if an invoice address is set." %}
</div>
<div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}"> <div class="formset" data-formset data-formset-prefix="{{ formset.prefix }}">
{{ formset.management_form }} {{ formset.management_form }}
{% bootstrap_formset_errors formset %} {% bootstrap_formset_errors formset %}
<div data-formset-body> <div data-formset-body>
{% for form in formset %} {% for form in formset %}
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<div class="row" data-formset-form> <div class="row" data-formset-form>
<div class="sr-only"> <div class="sr-only">
{{ form.id }} {{ form.id }}
{% bootstrap_field form.DELETE form_group_class="" layout="inline" %} {% bootstrap_field form.DELETE form_group_class="" layout="inline" %}
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
{% bootstrap_field form.country layout='inline' form_group_class="" %} {% bootstrap_field form.country layout='inline' form_group_class="" %}
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
{% bootstrap_field form.address_type layout='inline' form_group_class="" %} {% bootstrap_field form.address_type layout='inline' form_group_class="" %}
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
{% bootstrap_field form.action layout='inline' form_group_class="" %} {% bootstrap_field form.action layout='inline' form_group_class="" %}
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
{% bootstrap_field form.rate layout='inline' form_group_class="" %} {% bootstrap_field form.rate layout='inline' form_group_class="" %}
</div> </div>
<div class="col-sm-1 text-right flip"> <div class="col-sm-1 text-right flip">
<button type="button" class="btn btn-block btn-danger" data-formset-delete-button> <button type="button" class="btn btn-block btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button> <i class="fa fa-trash"></i></button>
</div> </div>
</div>
{% endfor %}
</div> </div>
{% endfor %} <script type="form-template" data-formset-empty-form>
</div> {% escapescript %}
<script type="form-template" data-formset-empty-form> <div class="row" data-formset-form>
{% escapescript %} <div class="sr-only">
<div class="row" data-formset-form> {{ form.id }}
<div class="sr-only"> {% bootstrap_field formset.empty_form.DELETE form_group_class="" layout="inline" %}
{{ form.id }} </div>
{% bootstrap_field formset.empty_form.DELETE form_group_class="" layout="inline" %} <div class="col-sm-3">
</div> {% bootstrap_field formset.empty_form.country layout='inline' form_group_class="" %}
<div class="col-sm-3"> </div>
{% bootstrap_field formset.empty_form.country layout='inline' form_group_class="" %} <div class="col-sm-3">
</div> {% bootstrap_field formset.empty_form.address_type layout='inline' form_group_class="" %}
<div class="col-sm-3"> </div>
{% bootstrap_field formset.empty_form.address_type layout='inline' form_group_class="" %} <div class="col-sm-3">
</div> {% bootstrap_field formset.empty_form.action layout='inline' form_group_class="" %}
<div class="col-sm-3"> </div>
{% bootstrap_field formset.empty_form.action layout='inline' form_group_class="" %} <div class="col-sm-2">
</div> {% bootstrap_field formset.empty_form.rate layout='inline' form_group_class="" %}
<div class="col-sm-2"> </div>
{% bootstrap_field formset.empty_form.rate layout='inline' form_group_class="" %} <div class="col-sm-1 text-right flip">
</div> <button type="button" class="btn btn-block btn-danger" data-formset-delete-button>
<div class="col-sm-1 text-right flip"> <i class="fa fa-trash"></i></button>
<button type="button" class="btn btn-block btn-danger" data-formset-delete-button> </div>
<i class="fa fa-trash"></i></button> </div>
</div> {% endescapescript %}
</div> </script>
{% endescapescript %} <p>
</script> <button type="button" class="btn btn-default" data-formset-add>
<p> <i class="fa fa-plus"></i> {% trans "Add a new rule" %}</button>
<button type="button" class="btn btn-default" data-formset-add> </p>
<i class="fa fa-plus"></i> {% trans "Add a new rule" %}</button> </div>
</p> </fieldset>
</div> </div>
</fieldset> <div class="form-group submit-group">
</div> <button type="submit" class="btn btn-primary btn-save">
<div class="form-group submit-group"> {% trans "Save" %}
<button type="submit" class="btn btn-primary btn-save"> </button>
{% trans "Save" %} </div>
</button> </div>
<div class="col-xs-12 col-lg-2">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
{% trans "Change history" %}
</h3>
</div>
{% include "pretixcontrol/includes/logs.html" with obj=rule %}
</div>
</div>
</div> </div>
</form> </form>
{% endblock %} {% endblock %}