diff --git a/app/js/custom.js b/app/js/custom.js index 0e842ebf..d6ed0576 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -459,6 +459,19 @@ $(document).on("click", ".js-toggle-password", function(e) { } }); +$(document).on("input", ".js-validate-psk", function(e) { + var field = $(e.target); + var colors = field.data("colors").split(","); + var target = $(field.data("target")); + if (field.val().length < 8 || field.val().length > 63) { + field.css("backgroundColor", colors[0]); + target.attr("disabled", true); + } else { + field.css("backgroundColor", colors[1]); + target.attr("disabled", false); + } +}); + $(function() { $('#theme-select').change(function() { var theme = themes[$( "#theme-select" ).val() ]; diff --git a/app/js/custom.min.js b/app/js/custom.min.js index 67444fb6..23a7c9b2 100644 --- a/app/js/custom.min.js +++ b/app/js/custom.min.js @@ -4,4 +4,4 @@ * Licensed under MIT (https://github.com/raspap-webgui/raspap-webgui/blob/master/LICENSE) */ -function msgShow(t,a){if(0==t)var e="success";else if(2==t||1==t)e="danger";return'