aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-04-16 10:12:25 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-04-16 14:13:51 +0200
commit3ba9f6bd6d5758f43f621b57c53f401ad5b2dc0b (patch)
treefe23e6e72fe8d32ea7498129e78269ec87a45eaa
parentd49a49fcbfae2abab09609a567b3bf45601620b3 (diff)
downloadnextcloud-server-3ba9f6bd6d5758f43f621b57c53f401ad5b2dc0b.tar.gz
nextcloud-server-3ba9f6bd6d5758f43f621b57c53f401ad5b2dc0b.zip
Improve the share link password error feedback with a red border
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--apps/files_sharing/css/sharetabview.scss6
-rw-r--r--core/js/sharedialoglinkshareview.js4
2 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_sharing/css/sharetabview.scss b/apps/files_sharing/css/sharetabview.scss
index f698697407a..9387b5cd314 100644
--- a/apps/files_sharing/css/sharetabview.scss
+++ b/apps/files_sharing/css/sharetabview.scss
@@ -68,6 +68,12 @@
}
.popovermenu {
.linkPassMenu {
+ input.error {
+ border-color: var(--color-error) !important;
+ &[type="submit"] {
+ border-left: none;
+ }
+ }
.share-pass-submit {
width: auto !important;
}
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index eaea8c9176f..1c1f5d79356 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -352,6 +352,7 @@
}
var $input = $li.find('.linkPassText');
$input.removeClass('error');
+ $input.parent().find('input').removeClass('error');
var password = $input.val();
if ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
@@ -380,6 +381,9 @@
$loading.removeClass('inlineblock').addClass('hidden');
},
error: function(model, msg) {
+ // Add visual feedback to both the input and the submit button
+ $input.parent().find('input').addClass('error');
+
// destroy old tooltips
var $container = $input.parent();
$container.tooltip('destroy');