2016-09-20 16:07:56 -04:00
|
|
|
= form_for @label, as: :label, url: url, html: { class: 'form-horizontal 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
|
|
|
|
|
|
|
.form-group
|
|
|
|
= f.label :title, class: 'control-label'
|
|
|
|
.col-sm-10
|
2016-02-12 16:28:53 -05:00
|
|
|
= f.text_field :title, class: "form-control", required: true, autofocus: true
|
2016-02-17 08:52:12 -05:00
|
|
|
.form-group
|
|
|
|
= f.label :description, class: 'control-label'
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :description, class: "form-control js-quick-submit"
|
2014-07-30 06:27:29 -04:00
|
|
|
.form-group
|
2015-12-02 08:30:12 -05:00
|
|
|
= f.label :color, "Background color", class: 'control-label'
|
2014-07-30 06:27:29 -04:00
|
|
|
.col-sm-10
|
|
|
|
.input-group
|
|
|
|
.input-group-addon.label-color-preview
|
2016-09-28 13:07:30 -04:00
|
|
|
= f.text_field :color, class: "form-control"
|
2014-07-30 06:27:29 -04:00
|
|
|
.help-block
|
2015-03-24 12:27:26 -04:00
|
|
|
Choose any color.
|
2014-07-30 06:27:29 -04:00
|
|
|
%br
|
|
|
|
Or you can choose one of suggested colors below
|
|
|
|
|
|
|
|
.suggest-colors
|
|
|
|
- suggested_colors.each do |color|
|
|
|
|
= link_to '#', style: "background-color: #{color}", data: { color: color } do
|
|
|
|
|
|
|
|
|
|
|
|
.form-actions
|
2015-12-02 08:33:14 -05:00
|
|
|
- if @label.persisted?
|
|
|
|
= f.submit 'Save changes', class: 'btn btn-save js-save-button'
|
|
|
|
- else
|
2017-04-06 09:55:11 -04:00
|
|
|
= f.submit 'Create label', class: 'btn btn-create js-save-button'
|
2016-10-10 23:04:15 -04:00
|
|
|
= link_to 'Cancel', back_path, class: 'btn btn-cancel'
|