Add missed code for save settings

pull/388/head
Halali 6 years ago
parent b6b14d93e7
commit 8aff2c17fa

@ -1139,6 +1139,11 @@ def save_settings():
settings_general_automatic = 'False'
else:
settings_general_automatic = 'True'
settings_general_update_restart = request.forms.get('settings_general_update_restart')
if settings_general_update_restart is None:
settings_general_update_restart = 'False'
else:
settings_general_update_restart = 'True'
settings_general_single_language = request.forms.get('settings_general_single_language')
if settings_general_single_language is None:
settings_general_single_language = 'False'
@ -1201,6 +1206,7 @@ def save_settings():
settings.general.chmod = text_type(settings_general_chmod)
settings.general.branch = text_type(settings_general_branch)
settings.general.auto_update = text_type(settings_general_automatic)
settings.general.update_restart = text_type(settings_general_update_restart)
settings.general.single_language = text_type(settings_general_single_language)
settings.general.minimum_score = text_type(settings_general_minimum_score)
settings.general.use_scenename = text_type(settings_general_scenename)

@ -699,7 +699,7 @@
</div>
<div class="one wide column">
<div id="settings_update_restart" class="ui toggle checkbox"
data-restart_update={{settings.general.getboolean('update_restart')}}>
data-update-restart={{settings.general.getboolean('update_restart')}}>
<input name="settings_general_update_restart" type="checkbox">
<label></label>
</div>
@ -2033,10 +2033,10 @@
$("#settings_automatic_div").checkbox('uncheck');
}
if ($('#settings_restart_update').data("restart_update") === "True") {
$("#settings_restart_update").checkbox('check');
if ($('#settings_update_restart').data("update-restart") === "True") {
$("#settings_update_restart").checkbox('check');
} else {
$("#settings_restart_update").checkbox('uncheck');
$("#settings_update_restart").checkbox('uncheck');
}
if ($('#settings_debug').data("debug") === "True") {

Loading…
Cancel
Save