mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-30 10:51:52 +00:00
WIP
This commit is contained in:
parent
62093864f2
commit
1b6c8297dd
2 changed files with 12 additions and 1 deletions
|
@ -153,12 +153,14 @@ base_url = settings.general.base_url
|
|||
def save_settings(settings_items):
|
||||
from database import database
|
||||
for key, value in settings_items:
|
||||
# Intercept database stored settings
|
||||
if key == 'enabled_languages':
|
||||
database.execute("UPDATE table_settings_languages SET enabled=0")
|
||||
for item in value:
|
||||
database.execute("UPDATE table_settings_languages SET enabled=1 WHERE code2=?", (item,))
|
||||
continue
|
||||
|
||||
# Make sure that text based form values aren't pass as list
|
||||
if isinstance(value, list) and len(value) == 1:
|
||||
value = value[0]
|
||||
|
||||
|
|
|
@ -71,7 +71,9 @@
|
|||
<div class="col-sm-3 text-right">
|
||||
<b>Languages</b>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-8 pl-sm-0">
|
||||
<select class="selectpicker" id="settings-general-serie_default_language" name="settings-general-serie_default_language"></select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
|
@ -134,9 +136,16 @@
|
|||
// Hide *_div on Select input changed to None
|
||||
|
||||
|
||||
$('#enabled_languages').on('change', function() {
|
||||
//$('#settings-general-serie_default_language').selectpicker('val', $('#enabled_languages').val());
|
||||
console.log($('#enabled_languages').val());
|
||||
console.log($('#enabled_languages option:selected').text());
|
||||
})
|
||||
|
||||
// Set Select input values
|
||||
$('#settings-general-subfolder').val('{{settings.general.subfolder}}').trigger('change');
|
||||
$('#settings-general-anti_captcha_provider').val('{{settings.general.anti_captcha_provider}}').trigger('change');
|
||||
$('#settings-general-serie_default_language').val('{{settings.general.serie_default_language}}').trigger('change');
|
||||
$('.selectpicker').selectpicker('refresh')
|
||||
|
||||
// Set Checkbox input values
|
||||
|
|
Loading…
Reference in a new issue