mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix label matching when copying answers (#4946)
This commit is contained in:
committed by
GitHub
parent
5375e22781
commit
de9a86c614
@@ -388,13 +388,13 @@ $(function () {
|
||||
var source_label = get_label_text_for_id(source.id);
|
||||
|
||||
var $first_ticket_form = $(".questions-form").first().find("[data-addonidx=0]");
|
||||
var $candidates = $first_ticket_form.find(source.tagName + ":not([type='checkbox'], [type='radio'])");
|
||||
var $candidates = $first_ticket_form.find(source.tagName + ":not([type='checkbox'], [type='radio'], [type='hidden'])");
|
||||
var $match = $candidates.filter(function() {
|
||||
return (
|
||||
this.id.endsWith(source.id.substring(3))
|
||||
|| (this.placeholder && this.placeholder === source.placeholder)
|
||||
|| (this.placeholder && this.placeholder === source_label)
|
||||
|| (source_label && get_label_text_for_id(this.id) === source_label)
|
||||
|| (source_label && this.id && get_label_text_for_id(this.id) === source_label)
|
||||
);
|
||||
}).first();
|
||||
$match.val(this.value).trigger("change");
|
||||
|
||||
Reference in New Issue
Block a user