backoffice: disable "simple list" choice for map/timetable selections (#50035)
This commit is contained in:
parent
65c3293e98
commit
3cac5c56ff
|
@ -258,8 +258,10 @@ $(function() {
|
|||
$('[type=radio][name=display_mode]').on('change', function() {
|
||||
// show everything
|
||||
$('select[name="data_source$type"] option').show();
|
||||
$('input[name="data_mode"][value="simple-list"]').prop('disabled', false);
|
||||
// then restrict
|
||||
if ($(this).val() == 'map') {
|
||||
$('input[name="data_mode"][value="simple-list"]').prop('disabled', true);
|
||||
$('input[name="data_mode"][value="data-source"]').click()
|
||||
$('select[name="data_source$type"] option:not([data-type="geojson"])').hide();
|
||||
if ($('select[name="data_source$type"] option:selected:visible').length == 0) {
|
||||
|
@ -267,6 +269,7 @@ $(function() {
|
|||
}
|
||||
}
|
||||
if ($(this).val() == 'timetable') {
|
||||
$('input[name="data_mode"][value="simple-list"]').prop('disabled', true);
|
||||
$('input[name="data_mode"][value="data-source"]').click()
|
||||
$('select[name="data_source$type"] option:not([data-maybe-datetimes="true"])').hide();
|
||||
if ($('select[name="data_source$type"] option:selected:visible').length == 0) {
|
||||
|
|
Loading…
Reference in New Issue