mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-18 17:15:13 +01:00
Fix keywords returning 0 with empty list
This commit is contained in:
parent
59b9222b78
commit
cfe93e902d
@ -170,7 +170,7 @@
|
|||||||
{% block js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
function replacer(key, value) {
|
function replacer(key, value) {
|
||||||
if (key == "disabled_language_files" || key == "monitored_mounts") {
|
if (key == "disabled_language_files" || key == "monitored_mounts" || key == "keywords") {
|
||||||
if (value == 0) {
|
if (value == 0) {
|
||||||
return []
|
return []
|
||||||
} else {
|
} else {
|
||||||
@ -199,6 +199,7 @@
|
|||||||
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(",");
|
formDataObject.keywords = $('#keywords').val().split(",");
|
||||||
|
console.log(formDataObject.keywords)
|
||||||
$('#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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user