Skip to content

Commit

Permalink
Allow consistent deep links to tabs (#3840)
Browse files Browse the repository at this point in the history
  • Loading branch information
luelista committed Jan 29, 2024
1 parent 3338858 commit aa9d526
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pretix/control/templates/pretixcontrol/item/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
</div>
</div>
</fieldset>
<fieldset>
<fieldset id="tab-item-additional-settings">
<legend>{% trans "Additional settings" %}</legend>
{% bootstrap_field form.issue_giftcard layout="control" %}
{% if form.grant_membership_type %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h1>
{% bootstrap_field sform.giftcard_expiry_years layout="control" %}
{% bootstrap_field sform.giftcard_length layout="control" %}
</fieldset>
<fieldset>
<fieldset id="tab-organizer-privacy">
<legend>{% trans "Privacy" %}</legend>
{% bootstrap_field sform.privacy_url layout="control" %}
<div class="alert alert-legal">
Expand Down
3 changes: 2 additions & 1 deletion src/pretix/static/pretixcontrol/js/ui/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ $(function () {
var validity_error = false;
$form.find("fieldset").each(function () {
var $fieldset = $(this);
var tid = "tab-" + j + "-" + i;
var tid = $fieldset.attr("id");
if (!tid) tid = "tab-" + j + "-" + i;
var $tabli = $("<li>").appendTo($tabs);
var $tablink = $("<a>").attr("role", "tab")
.attr("data-toggle", "tab")
Expand Down

0 comments on commit aa9d526

Please sign in to comment.