debian-mirror-gitlab/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml
2018-11-18 11:00:15 +05:30

8 lines
585 B
Text

- protected_tag = local_assigns.fetch(:protected_tag)
- create_access_level = local_assigns.fetch(:create_access_level)
- dropdown_label = create_access_level&.humanize || 'Select'
= hidden_field_tag "allowed_to_create_#{protected_tag.id}", create_access_level&.access_level
= dropdown_tag(dropdown_label,
options: { toggle_class: 'js-allowed-to-create', dropdown_class: 'dropdown-menu-selectable capitalize-header js-allowed-to-create-container',
data: { field_name: "allowed_to_create_#{protected_tag.id}", access_level_id: create_access_level&.id }})