mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 01:03:18 +08:00
Add error message for status item
This commit is contained in:
parent
16724f622c
commit
2e8db12ca5
3 changed files with 18 additions and 1 deletions
|
@ -29,7 +29,7 @@ var RepositoryStatusColumnType = (function() {
|
|||
if (stringLength < GLOBAL_CONSTANTS.NAME_MIN_LENGTH
|
||||
|| stringLength > GLOBAL_CONSTANTS.NAME_MAX_LENGTH
|
||||
|| iconPlaceholder) {
|
||||
$row.addClass('error');
|
||||
$row.addClass('error').attr('data-error-text', I18n.t('libraries.manange_modal_column.status_type.errors.icon_and_name_error'));
|
||||
} else {
|
||||
$row.removeClass('error');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
height: 34px;
|
||||
margin-bottom: 5px;
|
||||
transition: .3s;
|
||||
position: relative;
|
||||
|
||||
.status-item-field {
|
||||
border: 1px solid $input-border;
|
||||
|
@ -62,6 +63,8 @@
|
|||
}
|
||||
|
||||
&.error.error-highlight {
|
||||
margin-bottom: 15px;
|
||||
|
||||
.status-item-icon,
|
||||
.status-item-field {
|
||||
border-color: $brand-danger;
|
||||
|
@ -70,6 +73,18 @@
|
|||
.status-item-icon {
|
||||
border-right-color: $input-border;
|
||||
}
|
||||
|
||||
&::before {
|
||||
@include font-small;
|
||||
bottom: -14px;
|
||||
color: $brand-danger;
|
||||
content: attr(data-error-text);
|
||||
left: 0;
|
||||
line-height: 15px;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1201,6 +1201,8 @@ en:
|
|||
status_type:
|
||||
status_options_label: "Status options"
|
||||
add_status_label: "Add status option"
|
||||
errors:
|
||||
icon_and_name_error: "Status icon and status name should be filled"
|
||||
datetime_type:
|
||||
range_label: 'Range'
|
||||
checklist_type:
|
||||
|
|
Loading…
Reference in a new issue