|
23 | 23 | ~ (type is defined ? " ibexa-input-text-wrapper--type-#{type}") |
24 | 24 | ~ (extra_btn.label ? ' ibexa-input-text-wrapper--extra-btn') |
25 | 25 | ~ (is_multiline ? ' ibexa-input-text-wrapper--multiline') |
| 26 | + ~ (right_side_label is defined ? ' ibexa-input-text-wrapper--has-right-side-label') |
26 | 27 | )|trim |
27 | 28 | }) %} |
28 | 29 |
|
29 | 30 | <div {{ html.attributes(wrapper_attr) }}> |
30 | | - {% block content %}{% endblock %} |
31 | | - <div class="ibexa-input-text-wrapper__actions"> |
32 | | - {% block actions %} |
33 | | - <button |
34 | | - type="button" |
35 | | - class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--clear" |
36 | | - tabindex="-1" |
37 | | - {{ is_disabled ? 'disabled' }} |
38 | | - {% if should_clear_button_send_form %}data-send-form-after-clearing{% endif %} |
39 | | - > |
40 | | - <svg class="ibexa-icon ibexa-icon--tiny-small"> |
41 | | - <use xlink:href="{{ ibexa_icon_path('discard') }}"></use> |
42 | | - </svg> |
43 | | - </button> |
44 | | - {% if is_password_input %} |
45 | | - <button |
46 | | - type="button" |
47 | | - class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--password-toggler" |
48 | | - tabindex="5" |
49 | | - {{ is_disabled ? 'disabled' }} |
50 | | - > |
51 | | - <svg class="ibexa-icon ibexa-icon--small ibexa-input-text-wrapper__password-show"> |
52 | | - <use xlink:href="{{ ibexa_icon_path('view') }}"></use> |
53 | | - </svg> |
54 | | - <svg class="ibexa-icon ibexa-icon--small ibexa-input-text-wrapper__password-hide d-none"> |
55 | | - <use xlink:href="{{ ibexa_icon_path('view-hide') }}"></use> |
56 | | - </svg> |
57 | | - </button> |
58 | | - {% elseif has_search %} |
| 31 | + <div class="ibexa-input-text-wrapper__input-wrapper"> |
| 32 | + {% block content %}{% endblock %} |
| 33 | + <div class="ibexa-input-text-wrapper__actions"> |
| 34 | + {% block actions %} |
59 | 35 | <button |
60 | | - type="{{ search_button_type|default('submit') }}" |
61 | | - class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--search" |
62 | | - tabindex="-1" |
| 36 | + type="button" |
| 37 | + class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--clear" |
| 38 | + tabindex="-1" |
63 | 39 | {{ is_disabled ? 'disabled' }} |
| 40 | + {% if should_clear_button_send_form %}data-send-form-after-clearing{% endif %} |
64 | 41 | > |
65 | | - <svg class="ibexa-icon ibexa-icon--small"> |
66 | | - <use xlink:href="{{ ibexa_icon_path('search') }}"></use> |
| 42 | + <svg class="ibexa-icon ibexa-icon--tiny-small"> |
| 43 | + <use xlink:href="{{ ibexa_icon_path('discard') }}"></use> |
67 | 44 | </svg> |
68 | 45 | </button> |
69 | | - {% elseif extra_btn.label is not empty %} |
70 | | - <button {{html.attributes(extra_btn.attr)}}> |
71 | | - {{- extra_btn.label -}} |
72 | | - </button> |
73 | | - {% endif %} |
74 | | - {% endblock %} |
| 46 | + {% if is_password_input %} |
| 47 | + <button |
| 48 | + type="button" |
| 49 | + class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--password-toggler" |
| 50 | + tabindex="5" |
| 51 | + {{ is_disabled ? 'disabled' }} |
| 52 | + > |
| 53 | + <svg class="ibexa-icon ibexa-icon--small ibexa-input-text-wrapper__password-show"> |
| 54 | + <use xlink:href="{{ ibexa_icon_path('view') }}"></use> |
| 55 | + </svg> |
| 56 | + <svg class="ibexa-icon ibexa-icon--small ibexa-input-text-wrapper__password-hide d-none"> |
| 57 | + <use xlink:href="{{ ibexa_icon_path('view-hide') }}"></use> |
| 58 | + </svg> |
| 59 | + </button> |
| 60 | + {% elseif has_search %} |
| 61 | + <button |
| 62 | + type="{{ search_button_type|default('submit') }}" |
| 63 | + class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--search" |
| 64 | + tabindex="-1" |
| 65 | + {{ is_disabled ? 'disabled' }} |
| 66 | + > |
| 67 | + <svg class="ibexa-icon ibexa-icon--small"> |
| 68 | + <use xlink:href="{{ ibexa_icon_path('search') }}"></use> |
| 69 | + </svg> |
| 70 | + </button> |
| 71 | + {% elseif extra_btn.label is not empty %} |
| 72 | + <button {{html.attributes(extra_btn.attr)}}> |
| 73 | + {{- extra_btn.label -}} |
| 74 | + </button> |
| 75 | + {% endif %} |
| 76 | + {% endblock %} |
| 77 | + </div> |
75 | 78 | </div> |
| 79 | + {% block right_side_label %} |
| 80 | + {% if right_side_label is defined %} |
| 81 | + <div class="ibexa-input-text-wrapper__right-side-label-wrapper"> |
| 82 | + <div class="ibexa-input-text-wrapper__right-side-label"> |
| 83 | + {{ right_side_label }} |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + {% endif %} |
| 87 | + {% endblock %} |
76 | 88 | {% block extra_content %}{% endblock %} |
77 | 89 | </div> |
0 commit comments