Improve the share link password error feedback with a red border
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
a8064fdd06
commit
410aacae60
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -73,6 +73,12 @@
|
||||||
}
|
}
|
||||||
.popovermenu {
|
.popovermenu {
|
||||||
.linkPassMenu {
|
.linkPassMenu {
|
||||||
|
input.error {
|
||||||
|
border-color: var(--color-error) !important;
|
||||||
|
&[type="submit"] {
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
.share-pass-submit {
|
.share-pass-submit {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -352,6 +352,7 @@
|
||||||
}
|
}
|
||||||
var $input = $li.find('.linkPassText');
|
var $input = $li.find('.linkPassText');
|
||||||
$input.removeClass('error');
|
$input.removeClass('error');
|
||||||
|
$input.parent().find('input').removeClass('error');
|
||||||
var password = $input.val();
|
var password = $input.val();
|
||||||
|
|
||||||
if ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
|
if ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
|
||||||
|
@ -380,6 +381,9 @@
|
||||||
$loading.removeClass('inlineblock').addClass('hidden');
|
$loading.removeClass('inlineblock').addClass('hidden');
|
||||||
},
|
},
|
||||||
error: function(model, msg) {
|
error: function(model, msg) {
|
||||||
|
// Add visual feedback to both the input and the submit button
|
||||||
|
$input.parent().find('input').addClass('error');
|
||||||
|
|
||||||
// destroy old tooltips
|
// destroy old tooltips
|
||||||
var $container = $input.parent();
|
var $container = $input.parent();
|
||||||
$container.tooltip('destroy');
|
$container.tooltip('destroy');
|
||||||
|
|
Loading…
Reference in New Issue