From 755228e43c5967a647ebfe90d75b2d352dcb714e Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 4 Mar 2022 17:34:06 +0530 Subject: [PATCH] empty the 'note' field when setting a custom quota on the admin panel --- www/admin/inner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/admin/inner.js b/www/admin/inner.js index 83143a546..98213b384 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -517,11 +517,11 @@ define([ note, h('nav', [set, remove]) ]); + var $note = $(note); var getValues = function () { var key = $key.val(); var _limit = parseInt($(limit).val()); - var _note = $(note).val(); if (key.length !== 44) { try { var u = Keys.parseUser(key); @@ -535,6 +535,7 @@ define([ if (isNaN(_limit) || _limit < 0) { return void UI.warn(Messages.admin_invalLimit); } + var _note = ($note.val() || "").trim(); return { key: key, data: { @@ -585,6 +586,7 @@ define([ } APP.refreshLimits(); $key.val(''); + $note.val(''); }); });