From 5aca24f3bd1df62c0ed07051db729f6cd67c3ad5 Mon Sep 17 00:00:00 2001 From: Rinat Gumirov Date: Mon, 29 Oct 2018 23:34:41 +0500 Subject: [PATCH] expire share days in settings validate Signed-off-by: Rinat Gumirov --- settings/js/admin.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/settings/js/admin.js b/settings/js/admin.js index 35f3d949ab..56bbaead52 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -66,11 +66,8 @@ $(document).ready(function(){ }); }); - $('#shareapiExpireAfterNDays').change(function() { - var value = $(this).val(); - if (value <= 0) { - $(this).val("1"); - } + $('#shareapiExpireAfterNDays').on('input', function() { + this.value = this.value.replace(/\D/g, ''); }); $('#shareAPI input:not(.noJSAutoUpdate)').change(function() {