Skip to content

IBX-10002: Fix warning styles in discounts wizard #1550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/bundle/Resources/public/scss/_tag-view-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,20 @@
margin-top: calculateRem(24px);
}

&.is-invalid {
@include input-invalid();

#{$self} {
&__info {
color: $ibexa-color-danger-600;
}

&__btn-select-path {
background-color: $ibexa-color-white;
}
}
}

&:disabled,
&[disabled] {
@include colorful-tags($ibexa-color-dark-400, $ibexa-color-light-300);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{% set is_dynamic = is_dynamic|default(false) %}
{% set is_disabled = is_disabled|default(false) or attr.readonly|default(false) %}
{% set is_selector = is_selector|default(false) %}
{% set is_invalid = is_invalid|default(false) %}
{% set has_select_all_toggler = has_select_all_toggler|default(false) %}
{% set item_icon = item_icon|default() %}
{% set item_icon_class = item_icon_class|default('') %}
Expand All @@ -36,6 +37,7 @@
~ (is_ghost|default(false) ? 'ibexa-dropdown--ghost ')
~ (is_selector ? 'ibexa-dropdown--selector ')
~ (no_items and not is_dynamic or is_disabled ? 'ibexa-dropdown--disabled ')
~ (is_invalid ? 'is-invalid ')
~ class|default('') ~ ' '
~ attr.class|default('') ~ ' ')|trim,
hidden: attr.hidden|default(is_hidden|default(false) ? 'hidden' : false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
{% set separator = separator|default(',') %}
{% set values = form.vars.value|split(separator)|filter(value => value is not empty) %}
{% set has_value = values|length > 0 %}
{% set has_errors = form.vars.errors|length > 0 %}
{% set can_be_empty = can_be_empty is defined ? can_be_empty : false %}
{% set is_single_select = is_single_select is defined ? is_single_select : false %}
{% set is_delete_visible = can_be_empty or values|length != 1 %}
{% set default_title = 'tag_view_select.info'|trans|desc('Select location') %}
{% set is_disabled = attr.disabled is defined ? attr.disabled : false %}
{% set is_invalid = is_invalid|default(has_errors) %}
{% set default_type = 'tag_view_select.default_type'|trans|desc('path') %}
{% set type = type|default(default_type) %}
{% set show_title = show_title ?? true %}

{% set class = 'ibexa-tag-view-select '
~ (is_invalid ? 'is-invalid ')
~ class|default('') %}

<div
class="ibexa-tag-view-select {{ class|default('') }}"
class="{{ class }}"
data-is-single-select="{{ is_single_select }}"
data-can-be-empty="{{ can_be_empty }}"
{% if is_disabled %}disabled{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{% set source %}
{{- block('choice_widget_collapsed') -}}
{% endset %}
{% set has_errors = form.vars.errors|length > 0 %}

{% include '@ibexadesign/ui/component/dropdown/dropdown.html.twig' with {
source: source,
Expand All @@ -25,6 +26,7 @@
is_ghost: attr.is_ghost|default(false),
is_selector: attr.is_selector|default(false),
is_dynamic: attr.is_dynamic|default(false),
is_invalid: attr.is_invalid|default(has_errors),
has_select_all_toggler: attr.has_select_all_toggler|default(false),
placeholder: attr.placeholder|default(placeholder),
selected_item_template_path: selected_item_template_path|default(null),
Expand Down
Loading