summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2018-10-31 08:46:37 +0100
committerGitHub <noreply@github.com>2018-10-31 08:46:37 +0100
commitb449cb35f67ca0cf21b466ca1ac1c195a2e6bd91 (patch)
treec2cfcab87a1a571cc4416b5d65440cfb4aa25e3b /settings
parentbbdfead9fdcfb98c76f8bd57b61d133a13f21697 (diff)
parent5aca24f3bd1df62c0ed07051db729f6cd67c3ad5 (diff)
downloadnextcloud-server-b449cb35f67ca0cf21b466ca1ac1c195a2e6bd91.tar.gz
nextcloud-server-b449cb35f67ca0cf21b466ca1ac1c195a2e6bd91.zip
Merge pull request #12125 from MasterOfDeath/expire-share-days-validate
Validate expire share days in settings (issue: #11930)
Diffstat (limited to 'settings')
-rw-r--r--settings/js/admin.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 35f3d949ab6..56bbaead520 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() {