Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_form.html.haml « labels « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e6d6d0998dc641a779b365a35d35a22b3def251c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
= form_for @label, as: :label, url: url, html: { class: 'label-form js-quick-submit js-requires-input' } do |f|
  = form_errors(@label)

  .form-group.row
    .col-12
      = f.label :title
      = f.text_field :title, class: "gl-form-input form-control js-label-title", required: true, autofocus: true, data: { qa_selector: 'label_title_field' }
    = render_if_exists 'shared/labels/create_label_help_text'

  .form-group.row
    .col-12
      = f.label :description
      = f.text_field :description, class: "gl-form-input form-control js-quick-submit", data: { qa_selector: 'label_description_field' }
  .form-group.row
    .col-12
      = f.label :color, _("Background color")
      .input-group
        .input-group-prepend
          .input-group-text.label-color-preview  
        = f.text_field :color, class: "gl-form-input form-control", data: { qa_selector: 'label_color_field' }
      .form-text.text-muted
        = _('Choose any color.')
        %br
        = _("Or you can choose one of the suggested colors below")
      = render_suggested_colors
  .gl-display-flex.gl-justify-content-space-between
    %div
      - if @label.persisted?
        = f.submit _('Save changes'), class: 'btn gl-button btn-confirm js-save-button gl-mr-2'
      - else
        = f.submit _('Create label'), class: 'btn gl-button btn-confirm js-save-button gl-mr-2', data: { qa_selector: 'label_create_button' }
      = link_to _('Cancel'), back_path, class: 'btn gl-button btn-default btn-cancel gl-mr-2'
    - if @label.persisted?
      - presented_label = @label.present
      %button.btn.btn-danger.gl-button.btn-danger-secondary.js-delete-label-modal-button{ type: 'button', data: { label_name: presented_label.name, subject_name: presented_label.subject_name, destroy_path: presented_label.destroy_path } }
        %span.gl-button-text= _('Delete')