From 868b324547f93b32db491e64788222872e46aac8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 18 Jan 2023 18:00:50 -0500 Subject: [PATCH] Black config_json. Add feedback on submit --- app/frontend/templates/panel/config_json.html | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/frontend/templates/panel/config_json.html b/app/frontend/templates/panel/config_json.html index 71dc8ed4..eea9624a 100644 --- a/app/frontend/templates/panel/config_json.html +++ b/app/frontend/templates/panel/config_json.html @@ -69,10 +69,12 @@ $(this).removeAttr('selected').prop('selected', false); });">Enable all Languages - + {% elif isinstance(item[1], list) %} + class="form-control list">{{','.join(item[1])}} {% elif isinstance(item[1], bool) %} {% if item[1] == True %}
@@ -91,14 +93,14 @@ {% end %} {% elif isinstance(item[1], int) %} + step="1" min="0" required> {% else %} - + {% end %}
{% end %} - +   @@ -133,6 +135,7 @@ var token = getCookie("_xsrf") e.preventDefault(); + $("#submit-status").html(''); /* Convert multiple select to text list */ let selected_Lang = $('#lang_select').val(); $('#disabled_lang').val(selected_Lang); @@ -147,12 +150,11 @@ $.ajax({ type: "POST", headers: { 'X-XSRFToken': token }, - dataType: "json", + dataType: "text", url: '/panel/config_json', data: form_json, - success: function () { - console.log("in reload") - window.location.reload(); + success: function (data) { + $("#submit-status").html(''); }, }); });