@ -3,7 +3,11 @@
{% block title %}Languages - Bazarr{% endblock %}
{% block title %}Languages - Bazarr{% endblock %}
{% block page_head %}
{% block page_head %}
< style >
.warning {
color: red;
}
< / style >
{% endblock page_head %}
{% endblock page_head %}
{% block bcleft %}
{% block bcleft %}
@ -33,11 +37,13 @@
< div class = "col-sm-3 text-right" >
< div class = "col-sm-3 text-right" >
< b > Single Language< / b >
< b > Single Language< / b >
< / div >
< / div >
< div class = "form-group col-sm- 1 ">
< div class = "form-group col-sm- 8 ">
< label class = "custom-control custom-checkbox" >
< label class = "custom-control custom-checkbox" >
< input type = "checkbox" class = "custom-control-input" id = "settings-general-single_language" name = "settings-general-single_language" >
< input type = "checkbox" class = "custom-control-input" id = "settings-general-single_language" name = "settings-general-single_language" >
< span class = "custom-control-label" for = "settings-general-single_language" > < / span >
< span class = "custom-control-label" for = "settings-general-single_language" > < / span >
< / label >
< / label >
< label > Download a single Subtitles file without adding the language code to the filename.< / label >
< label class = "warning" > We don't recommend enabling this option unless absolutely required (ie: media player not supporting language code in subtitles filename). Results may vary.< / label >
< / div >
< / div >
< / div >
< / div >
< br >
< br >
@ -143,7 +149,6 @@
$('input[type=checkbox]').each(function () {
$('input[type=checkbox]').each(function () {
formdata.set($(this).prop('id'), $(this).prop('checked'));
formdata.set($(this).prop('id'), $(this).prop('checked'));
});
});
$.ajax({
$.ajax({
url: "{{ url_for('api.savesettings') }}",
url: "{{ url_for('api.savesettings') }}",
data: formdata,
data: formdata,
@ -179,8 +184,11 @@
$.ajax({
$.ajax({
url: "{{ url_for('api.languages') }}?enabled=true",
url: "{{ url_for('api.languages') }}?enabled=true",
success: function (data) {
success: function (data) {
console.log(data);
let optArr = [];
$('#enabled_languages').selectpicker('val', data);
$.each(data, function (i, item) {
optArr.push(item.code2);
});
$('#enabled_languages').selectpicker('val', optArr);
}
}
});
});
}
}