Skip to content

Commit 9d0bcfe

Browse files
author
Evgeniy Kolesov
committed
MAGETWO-34893: Required marker is displayed on wrong line in Backend
1 parent 30e8679 commit 9d0bcfe

File tree

7 files changed

+76
-15
lines changed

7 files changed

+76
-15
lines changed

Gruntfile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ module.exports = function (grunt) {
6060
'less:luma',
6161
'less:backend'
6262
],
63-
63+
/**
64+
* Styles for backend theme
65+
*/
66+
backend: [
67+
'less:backend',
68+
'replace:example',
69+
'less:override'
70+
],
6471
/**
6572
* Documentation
6673
*/

app/code/Magento/Tax/view/adminhtml/templates/rate/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<div class="entry-edit">
10+
<div class="entry-edit form-inline">
1111
<?php echo $block->getFormHtml() ?>
1212
</div>
1313
<?php echo $block->getChildHtml('form_after');?>

app/design/adminhtml/Magento/backend/web/css/override.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ nav ol {
373373
.page-layout-admin-login .admin__field[class]:not(.admin__field-option)._required > .admin__field-label span:after {
374374
left: 0;
375375
margin-left: 30px;
376+
top: .2rem;
376377
}
377378
.admin__control-text {
378379
line-height: 3.3rem;
@@ -644,12 +645,13 @@ option:empty {
644645
._required > .admin__field-label span:after {
645646
color: #eb5202;
646647
content: '*';
647-
display: inline;
648+
display: inline-block;
648649
font-size: 1.6rem;
649650
font-weight: 500;
651+
line-height: 1;
650652
margin-left: 10px;
651-
margin-top: 2px;
652653
position: absolute;
654+
top: 1.2rem;
653655
z-index: 1;
654656
}
655657
._disabled > .admin__field-label {

app/design/adminhtml/Magento/backend/web/css/source/forms/_extends.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
&:after {
6161
left: 0;
6262
margin-left: @temp_gutter; // @todo ui: update after finalizing Form Grid mixing css/source/forms/_temp.less:10
63+
top: .2rem;
6364
}
6465
}
6566
}

app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@
8787
span:after {
8888
color: @field-label__required__color;
8989
content: '*';
90-
display: inline;
90+
display: inline-block;
9191
font-size: @font-size__l;
9292
font-weight: @font-weight__heavier;
93+
line-height: 1;
9394
margin-left: 10px;
94-
margin-top: 2px;
9595
position: absolute;
96+
top: 1.2rem;
9697
z-index: 1;
9798
}
9899
}

app/design/adminhtml/Magento/backend/web/css/styles-old.less

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,14 +1078,61 @@ input.mage-error ~ .addafter {
10781078
padding-top: 0;
10791079
}
10801080

1081-
.field.required > .label:after {
1082-
color: #e22626;
1083-
font-size: 16px;
1084-
font-weight: 500;
1085-
position: absolute;
1086-
margin-left: 10px;
1081+
.form-inline div:not([class*='fields-group']) > .field > .label,
1082+
.form-inline .fieldset > .field > .label {
1083+
color: #303030;
1084+
font-size: 14px;
1085+
font-weight: 600;
1086+
line-height: 3.2rem;
1087+
padding: 0 30px 0 0;
1088+
white-space: nowrap;
1089+
1090+
&:before {
1091+
content: '.';
1092+
margin-left: -7px;
1093+
overflow: hidden;
1094+
visibility: hidden;
1095+
width: 0;
1096+
}
1097+
1098+
span {
1099+
display: inline-block;
1100+
line-height: 1.33;
1101+
vertical-align: middle;
1102+
white-space: normal;
1103+
}
10871104
}
10881105

1106+
.fieldset > .field.required > .label {
1107+
&:after {
1108+
content:'';
1109+
}
1110+
padding-left: 1.5rem;
1111+
.form-inline & {
1112+
padding-left: 0;
1113+
}
1114+
span {
1115+
&:after {
1116+
color: #e22626;
1117+
content: '*';
1118+
display: inline-block;
1119+
font-size: 1.6rem;
1120+
font-weight: 500;
1121+
left: 0;
1122+
line-height: 1;
1123+
position: absolute;
1124+
top: .2rem;
1125+
z-index: 1;
1126+
.form-inline & {
1127+
left: auto;
1128+
margin-left: 10px;
1129+
top: 1.2rem;
1130+
}
1131+
}
1132+
}
1133+
}
1134+
1135+
10891136
.with-addon .textarea {
10901137
margin: 0 0 6px;
10911138
}
@@ -1094,7 +1141,7 @@ input.mage-error ~ .addafter {
10941141
.fieldset .control .addon .textarea {
10951142
width: 100%;
10961143
}
1097-
1144+
.details-content > .field > input[type="checkbox"],
10981145
.fieldset > .field > input[type="checkbox"] {
10991146
margin-top: 9px;
11001147
}
@@ -2695,7 +2742,10 @@ tr.dynamic-grid input.input-text {
26952742
}
26962743

26972744
.attribute-popup #edit_form {
2698-
padding-bottom: 80px;
2745+
display: block;
2746+
> div:last-of-type {
2747+
margin-bottom: 150px;
2748+
}
26992749
}
27002750

27012751
.attribute-popup #edit_form > .fieldset > .legend {

app/design/adminhtml/Magento/backend/web/mui/mui_legacy.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ table.loading:after {
12081208
}
12091209

12101210
.field > .label {
1211-
margin: 0 0 6px 6px;
1211+
margin: 0 0 6px;
12121212
}
12131213

12141214
.field > .control {

0 commit comments

Comments
 (0)