mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2026-01-06 08:14:27 +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
|
if (stringLength < GLOBAL_CONSTANTS.NAME_MIN_LENGTH
|
||||||
|| stringLength > GLOBAL_CONSTANTS.NAME_MAX_LENGTH
|
|| stringLength > GLOBAL_CONSTANTS.NAME_MAX_LENGTH
|
||||||
|| iconPlaceholder) {
|
|| 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 {
|
} else {
|
||||||
$row.removeClass('error');
|
$row.removeClass('error');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
height: 34px;
|
height: 34px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
transition: .3s;
|
transition: .3s;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.status-item-field {
|
.status-item-field {
|
||||||
border: 1px solid $input-border;
|
border: 1px solid $input-border;
|
||||||
|
|
@ -62,6 +63,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.error.error-highlight {
|
&.error.error-highlight {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
|
||||||
.status-item-icon,
|
.status-item-icon,
|
||||||
.status-item-field {
|
.status-item-field {
|
||||||
border-color: $brand-danger;
|
border-color: $brand-danger;
|
||||||
|
|
@ -70,6 +73,18 @@
|
||||||
.status-item-icon {
|
.status-item-icon {
|
||||||
border-right-color: $input-border;
|
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_type:
|
||||||
status_options_label: "Status options"
|
status_options_label: "Status options"
|
||||||
add_status_label: "Add status option"
|
add_status_label: "Add status option"
|
||||||
|
errors:
|
||||||
|
icon_and_name_error: "Status icon and status name should be filled"
|
||||||
datetime_type:
|
datetime_type:
|
||||||
range_label: 'Range'
|
range_label: 'Range'
|
||||||
checklist_type:
|
checklist_type:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue