2018-07-06 18:49:33 +00:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, @milestone],
|
|
|
|
html: {class: 'milestone-form common-note-form js-quick-submit js-requires-input'},
|
|
|
|
data: { markdown_version: @milestone.cached_markdown_version } do |f|
|
2016-04-05 01:25:38 +00:00
|
|
|
= form_errors(@milestone)
|
2012-04-08 21:28:58 +00:00
|
|
|
.row
|
2013-12-30 21:55:15 +00:00
|
|
|
.col-md-6
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2018-04-12 23:16:56 +00:00
|
|
|
= f.label :title, "Title", class: "col-form-label col-sm-2"
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2018-07-11 14:59:00 +00:00
|
|
|
= f.text_field :title, maxlength: 255, class: "qa-milestone-title form-control", required: true, autofocus: true
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row.milestone-description
|
2018-04-12 23:16:56 +00:00
|
|
|
= f.label :description, "Description", class: "col-form-label col-sm-2"
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2016-11-16 11:09:09 +00:00
|
|
|
= render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project) } do
|
2018-07-11 14:59:00 +00:00
|
|
|
= render 'projects/zen', f: f, attr: :description, classes: 'qa-milestone-description note-textarea', placeholder: 'Write milestone description...'
|
2017-05-03 08:48:01 +00:00
|
|
|
= render 'shared/notes/hints'
|
2014-05-23 08:22:00 +00:00
|
|
|
.clearfix
|
|
|
|
.error-alert
|
2016-11-15 17:48:30 +00:00
|
|
|
= render "shared/milestones/form_dates", f: f
|
2012-04-08 21:28:58 +00:00
|
|
|
|
2012-04-10 05:51:08 +00:00
|
|
|
.form-actions
|
2012-04-08 21:28:58 +00:00
|
|
|
- if @milestone.new_record?
|
2018-07-11 14:59:00 +00:00
|
|
|
= f.submit 'Create milestone', class: "btn-create btn qa-milestone-create-button"
|
2017-06-29 17:06:35 +00:00
|
|
|
= link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel"
|
2016-12-23 10:27:41 +00:00
|
|
|
- else
|
2013-01-29 20:18:19 +00:00
|
|
|
= f.submit 'Save changes', class: "btn-save btn"
|
2017-06-29 17:06:35 +00:00
|
|
|
= link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn btn-cancel"
|