КОНТРОЛЫ/switcher.md
Исходный код
Twig код
<div class="switcher_wrapper{% if switcher_wrapper_class %} {{switcher_wrapper_class}}{% endif %}{% if blue %} controls-switcher-blue{% endif %}">
{% if label_class_name is defined %}
{% set label_class_name = label_class_name ~ ' switcher' %}
{% else %}
{% set label_class_name = 'switcher' %}
{% endif %}
{% set checkbox_class_name = 'switcher__checkbox' %}
{% if disabled %}
{% set label_class_name = label_class_name ~ ' js-disabled' %}
{% set checkbox_class_name = checkbox_class_name ~ ' js-disabled' %}
{% endif %}
{% if checked %}
{% set label_class_name = label_class_name ~ ' switcher__on' %}
{% else %}
{% set label_class_name = label_class_name ~ ' switcher__off' %}
{% endif %}
{% if class_name %}
{% set checkbox_class_name = checkbox_class_name ~ ' ' ~ class_name %}
{% endif %}
{% if custom_class_name %}
{% set label_class_name = label_class_name ~ ' ' ~ custom_class_name %}
{% endif %}
<label for="{{id}}" class="{{ label_class_name }}" id=""></label>
<input type="checkbox" value="{% if value %}{{ value }}{% else %}Y{% endif %}" name="{{name}}" {% if id %}id="{{id}}"{% endif %} class="{{ checkbox_class_name }}" {% if checked %}checked{% endif %} {% if disabled %}disabled="disabled"{% endif %}>
</div>
Ссылка на вики репозиторий
- Страницы
- add_button
- budget
- button
- cancel_button
- chained_list
- checkbox
- checkboxes_dropdown
- checkboxes_dropdown_single
- checkboxes_string
- color_picker
- contenteditable
- date_field
- date_filter
- date_time_field
- deadline_select
- delete_button
- drive_field
- feed_note_main_buttons
- file
- input
- legal_entity
- line_toggler
- multiselect
- payer
- phone
- pipeline_toggler
- radio
- responsive_toggler
- select
- select_with_subtext
- smart_address
- status_chat
- suggest
- supplier
- switcher
- tags
- textarea
- textarea_code
- time
- time_field
- toggler
- updater
- users
- wysiwyg
Ссылка на вики репозиторий
- add_button
- budget
- button
- cancel_button
- chained_list
- checkbox
- checkboxes_dropdown
- checkboxes_dropdown_single
- checkboxes_string
- color_picker
- contenteditable
- date_field
- date_filter
- date_time_field
- deadline_select
- delete_button
- drive_field
- feed_note_main_buttons
- file
- input
- legal_entity
- line_toggler
- multiselect
- payer
- phone
- pipeline_toggler
- radio
- responsive_toggler
- select
- select_with_subtext
- smart_address
- status_chat
- suggest
- supplier
- switcher
- tags
- textarea
- textarea_code
- time
- time_field
- toggler
- updater
- users
- wysiwyg