mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
add error and confirmation messages for Storage limit #1790
+ reuse message from #1762
This commit is contained in:
parent
c792670799
commit
c805cb3d2f
@ -1640,7 +1640,10 @@ define([
|
||||
multiple: true,
|
||||
validate: function () {
|
||||
var l = parseInt($(newLimit).val());
|
||||
if (isNaN(l)) { return false; }
|
||||
if (isNaN(l)) {
|
||||
Messages.limit_error = "Please enter a valid number"; // XXX
|
||||
return UI.warn(Messages.limit_error);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}, function () {
|
||||
@ -1657,6 +1660,7 @@ define([
|
||||
}
|
||||
var limit = getPrettySize(l);
|
||||
$(text).text(Messages._getKey('admin_limit', [limit]));
|
||||
UI.log(Messages.saved);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -902,8 +902,8 @@ define([
|
||||
|
||||
var todo = function () {
|
||||
var val = parseInt($input.val());
|
||||
Messages.download_limit_error = "Please enter a valid number"; // XXX
|
||||
if (typeof(val) !== 'number' || isNaN(val)) { return UI.warn(Messages.download_limit_error); }
|
||||
Messages.limit_error = "Please enter a valid number"; // XXX
|
||||
if (typeof(val) !== 'number' || isNaN(val)) { return UI.warn(Messages.limit_error); }
|
||||
if (val === oldVal) { return; }
|
||||
spinner.spin();
|
||||
common.setAttribute(['general', 'mediatag-size'], val, function (err) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user