aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-02-29 13:32:46 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-02-29 13:32:46 +0000
commita82d268124ca51ae601514a4e8a9634a1c1d75de (patch)
treeb1f12cc7df4031381ed16afb2e3e45785bf49a31 /resources/assets/javascripts
parent7d4e4ca61887815b37b1d20d6b2336ce97e9083f (diff)
fixes #3767
Closes #3767 Merge request studip/studip!2642
Diffstat (limited to 'resources/assets/javascripts')
-rw-r--r--resources/assets/javascripts/lib/resources.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/resources/assets/javascripts/lib/resources.js b/resources/assets/javascripts/lib/resources.js
index 9acb2e3..0c2980e 100644
--- a/resources/assets/javascripts/lib/resources.js
+++ b/resources/assets/javascripts/lib/resources.js
@@ -292,14 +292,15 @@ class Resources
//Something is wrong.
return;
}
- let options_html = '';
+ let options = [];
for (let option of option_select_options) {
- let splitted_option = option.split('~~');
- options_html += '<option value="' + splitted_option[0] + '">'
- + (splitted_option[1] ?? splitted_option[0])
- + '</option>';
+ const opt = $('<option>', {
+ value: option,
+ text: option,
+ });
+ options.push(opt);
}
- $(new_criteria_select).append(options_html);
+ $(new_criteria_select).append(options);
} else if (option_type === 'date') {
let time_inputs = jQuery(new_criteria).find('input[data-time="yes"]');
let date_inputs = jQuery(new_criteria).find('input[type="date"]');