backoffice: never allow invalid geojson data source selection (#55720)
This commit is contained in:
parent
015caf1e78
commit
5a61721146
|
@ -282,6 +282,11 @@ $(function() {
|
|||
if ($('select[name="data_source$type"] option:selected:visible').length == 0) {
|
||||
$('select[name="data_source$type"] option:visible').first().prop('selected', true).trigger('change');
|
||||
}
|
||||
if ($('select[name="data_source$type"] option:selected:visible').length == 0) {
|
||||
// stil empty, it means there are no geojson sources at all, display
|
||||
// first option (which will be "None").
|
||||
$('select[name="data_source$type"] option').first().show().prop('selected', true);
|
||||
}
|
||||
}
|
||||
if ($(this).val() == 'timetable') {
|
||||
$('input[name="data_mode"][value="simple-list"]').prop('disabled', true);
|
||||
|
|
Loading…
Reference in New Issue