debian-mirror-gitlab/app/views/shared/labels/_form.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.7 KiB
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
= form_for @label, as: :label, url: url, html: { class: 'label-form js-quick-submit js-requires-input' } do |f|
2016-06-02 11:05:42 +05:30
= form_errors(@label)
2014-09-02 18:07:02 +05:30
2018-11-08 19:23:39 +05:30
.form-group.row
2022-07-23 23:45:48 +05:30
.col-12
2019-09-04 21:01:54 +05:30
= f.label :title
2022-03-02 08:16:31 +05:30
= f.text_field :title, class: "gl-form-input form-control js-label-title qa-label-title", required: true, autofocus: true
2019-07-07 11:18:12 +05:30
= render_if_exists 'shared/labels/create_label_help_text'
2018-11-08 19:23:39 +05:30
.form-group.row
2022-07-23 23:45:48 +05:30
.col-12
2019-09-04 21:01:54 +05:30
= f.label :description
2022-03-02 08:16:31 +05:30
= f.text_field :description, class: "gl-form-input form-control js-quick-submit qa-label-description"
2018-11-08 19:23:39 +05:30
.form-group.row
2022-07-23 23:45:48 +05:30
.col-12
2022-03-02 08:16:31 +05:30
= f.label :color, _("Background color")
2014-09-02 18:07:02 +05:30
.input-group
2018-11-08 19:23:39 +05:30
.input-group-prepend
.input-group-text.label-color-preview  
2022-03-02 08:16:31 +05:30
= f.text_field :color, class: "gl-form-input form-control qa-label-color"
2018-11-08 19:23:39 +05:30
.form-text.text-muted
2022-03-02 08:16:31 +05:30
= _('Choose any color.')
2014-09-02 18:07:02 +05:30
%br
2022-03-02 08:16:31 +05:30
= _("Or you can choose one of the suggested colors below")
2019-09-04 21:01:54 +05:30
= render_suggested_colors
2022-07-23 23:45:48 +05:30
.gl-display-flex.gl-justify-content-space-between
2022-03-02 08:16:31 +05:30
%div
- if @label.persisted?
2022-07-23 23:45:48 +05:30
= f.submit _('Save changes'), class: 'btn gl-button btn-confirm js-save-button gl-mr-2'
2022-03-02 08:16:31 +05:30
- else
2022-07-23 23:45:48 +05:30
= f.submit _('Create label'), class: 'btn gl-button btn-confirm js-save-button qa-label-create-button gl-mr-2'
= link_to _('Cancel'), back_path, class: 'btn gl-button btn-default btn-cancel gl-mr-2'
2015-12-23 02:04:40 +05:30
- if @label.persisted?
2022-03-02 08:16:31 +05:30
- 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')