Make keywords an array

This commit is contained in:
amcmanu3 2023-08-15 16:29:53 -04:00
parent 93428b2e05
commit 185702169a
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ config_json_schema = {
"max_audit_entries": {"type": "integer"}, "max_audit_entries": {"type": "integer"},
"disabled_language_files": {"type": "array"}, "disabled_language_files": {"type": "array"},
"stream_size_GB": {"type": "integer"}, "stream_size_GB": {"type": "integer"},
"keywords": {"type": "string"}, "keywords": {"type": "array"},
"allow_nsfw_profile_pictures": {"type": "boolean"}, "allow_nsfw_profile_pictures": {"type": "boolean"},
"enable_user_self_delete": {"type": "boolean"}, "enable_user_self_delete": {"type": "boolean"},
"reset_secrets_on_next_boot": {"type": "boolean"}, "reset_secrets_on_next_boot": {"type": "boolean"},

View File

@ -99,7 +99,7 @@
<textarea id="monitored_mounts" name="{{item[0]}}" class="form-control list hidden" rows="{{ len(data['all_partitions']) }}" value="{{','.join(item[1])}}" hidden>{{','.join(item[1])}}</textarea> <textarea id="monitored_mounts" name="{{item[0]}}" class="form-control list hidden" rows="{{ len(data['all_partitions']) }}" value="{{','.join(item[1])}}" hidden>{{','.join(item[1])}}</textarea>
</div> </div>
{% elif isinstance(item[1], list) %} {% elif isinstance(item[1], list) %}
<textarea value="{{','.join(item[1])}}" type="text" name="{{item[0]}}" class="form-control list">{{','.join(item[1])}}</textarea> <textarea id="{{item[0]}}" value="{{','.join(item[1])}}" type="text" name="{{item[0]}}" class="form-control list">{{','.join(item[1])}}</textarea>
{% elif isinstance(item[1], bool) %} {% elif isinstance(item[1], bool) %}
<div style="margin-left: 30px;"> <div style="margin-left: 30px;">
{% if item[1] == True %} {% if item[1] == True %}
@ -184,6 +184,7 @@
//We need to make sure these are sent regardless of whether or not they're checked //We need to make sure these are sent regardless of whether or not they're checked
formDataObject.disabled_language_files = $('#lang_select').val(); formDataObject.disabled_language_files = $('#lang_select').val();
formDataObject.monitored_mounts = $('#mount_select').val(); formDataObject.monitored_mounts = $('#mount_select').val();
formDataObject.keywords = $('#keywords').val().split(",");
$('#config-form input[type="radio"]:checked').each(function() { $('#config-form input[type="radio"]:checked').each(function() {
if ($(this).val() == 'True'){ if ($(this).val() == 'True'){
formDataObject[this.name] = true; formDataObject[this.name] = true;