2018-04-12 16:11:22 -04:00
|
|
|
= form_for @label, as: :label, url: url, html: { class: 'label-form js-quick-submit js-requires-input' } do |f|
|
2016-04-04 21:25:38 -04:00
|
|
|
= form_errors(@label)
|
2014-07-30 06:27:29 -04:00
|
|
|
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row
|
2019-02-03 09:29:34 -05:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :title
|
2014-07-30 06:27:29 -04:00
|
|
|
.col-sm-10
|
2019-04-02 06:48:20 -04:00
|
|
|
= f.text_field :title, class: "form-control js-label-title qa-label-title", required: true, autofocus: true
|
|
|
|
= render_if_exists 'shared/labels/create_label_help_text'
|
|
|
|
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row
|
2019-02-03 09:29:34 -05:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :description
|
2016-02-17 08:52:12 -05:00
|
|
|
.col-sm-10
|
2018-10-17 08:17:32 -04:00
|
|
|
= f.text_field :description, class: "form-control js-quick-submit qa-label-description"
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row
|
2019-02-03 09:29:34 -05:00
|
|
|
.col-sm-2.col-form-label
|
|
|
|
= f.label :color, "Background color"
|
2014-07-30 06:27:29 -04:00
|
|
|
.col-sm-10
|
|
|
|
.input-group
|
2018-04-12 16:32:55 -04:00
|
|
|
.input-group-prepend
|
|
|
|
.input-group-text.label-color-preview
|
2018-10-17 08:17:32 -04:00
|
|
|
= f.text_field :color, class: "form-control qa-label-color"
|
2018-04-11 14:26:37 -04:00
|
|
|
.form-text.text-muted
|
2015-03-24 12:27:26 -04:00
|
|
|
Choose any color.
|
2014-07-30 06:27:29 -04:00
|
|
|
%br
|
2018-06-01 12:41:31 -04:00
|
|
|
Or you can choose one of the suggested colors below
|
2019-05-15 17:23:56 -04:00
|
|
|
= render_suggested_colors
|
2014-07-30 06:27:29 -04:00
|
|
|
.form-actions
|
2015-12-02 08:33:14 -05:00
|
|
|
- if @label.persisted?
|
2020-09-29 02:09:45 -04:00
|
|
|
= f.submit 'Save changes', class: 'btn gl-button btn-success js-save-button'
|
2015-12-02 08:33:14 -05:00
|
|
|
- else
|
2020-09-29 02:09:45 -04:00
|
|
|
= f.submit 'Create label', class: 'btn gl-button btn-success js-save-button qa-label-create-button'
|
|
|
|
= link_to 'Cancel', back_path, class: 'btn gl-button btn-cancel'
|