Skip to content

Commit

Permalink
Merge pull request #1299 from GrabowskiM/EZP-31447-remove-button-misa…
Browse files Browse the repository at this point in the history
…ligned-in-search

EZP-31447: Remove button in search criteria for 'creator' field is not displayed propertly
  • Loading branch information
lserwatka authored Mar 23, 2020
2 parents 03ac0b9 + d7b960e commit 7e0d2c2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
38 changes: 22 additions & 16 deletions src/bundle/Resources/public/scss/_filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,30 @@
&--creator {
position: relative;

.ez-filters__input {
+ .ez-icon {
display: none;
.ez-filters {
&__input-wrapper {
position: relative;
}

&:disabled {
cursor: auto;
background-color: $ez-color-base-pale;
color: $ez-black;
padding-right: calculateRem(32px);
text-overflow: ellipsis;

& + .ez-icon {
display: block;
position: absolute;
bottom: calculateRem(7px);
right: calculateRem(6px);
cursor: pointer;
&__input {
+ .ez-icon {
display: none;
}

&:disabled {
cursor: auto;
background-color: $ez-color-base-pale;
color: $ez-black;
padding-right: calculateRem(32px);
text-overflow: ellipsis;

& + .ez-icon {
display: block;
position: absolute;
bottom: calculateRem(7px);
right: calculateRem(6px);
cursor: pointer;
}
}
}
}
Expand Down
22 changes: 12 additions & 10 deletions src/bundle/Resources/views/themes/admin/ui/search/form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,18 @@
<div class="ez-filters__item ez-filters__item--creator">
<label class="ez-filters__item-label">{{ 'search.creator'|trans|desc('Creator:') }}</label>
{% set creator = form.vars.data.creator %}
<input type="text"
class="form-control ez-filters__input"
data-content-type-identifiers="{{ user_content_type_identifier|join(',') }}"
value="{{ creator is not empty ? ez_content_name(creator) }}"
placeholder="{{ 'search.creator_input.placeholder'|trans|desc('Type creator\'s name') }}"
{{ creator is not empty ? 'disabled' }}
>
<svg class="ez-icon ez-icon--dark ez-icon--medium ez-icon--reset">
<use xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#circle-close"></use>
</svg>
<div class="ez-filters__input-wrapper">
<input type="text"
class="form-control ez-filters__input"
data-content-type-identifiers="{{ user_content_type_identifier|join(',') }}"
value="{{ creator is not empty ? ez_content_name(creator) }}"
placeholder="{{ 'search.creator_input.placeholder'|trans|desc('Type creator\'s name') }}"
{{ creator is not empty ? 'disabled' }}
>
<svg class="ez-icon ez-icon--dark ez-icon--medium ez-icon--reset">
<use xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#circle-close"></use>
</svg>
</div>
<ul class="ez-filters__user-list ez-filters__user-list--hidden"></ul>
</div>
</div>
Expand Down

0 comments on commit 7e0d2c2

Please # to comment.