2016-04-05 09:42:38 +00:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, @milestone], html: {class: 'form-horizontal milestone-form common-note-form js-quick-submit js-requires-input'} 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
|
2013-12-30 23:27:02 +00:00
|
|
|
.form-group
|
2012-08-10 22:07:50 +00:00
|
|
|
= f.label :title, "Title", class: "control-label"
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2016-02-12 21:28:53 +00:00
|
|
|
= f.text_field :title, maxlength: 255, class: "form-control", required: true, autofocus: true
|
2014-10-15 07:21:21 +00:00
|
|
|
.form-group.milestone-description
|
2012-08-10 22:07:50 +00:00
|
|
|
= f.label :description, "Description", class: "control-label"
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2015-09-21 21:08:26 +00:00
|
|
|
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
|
2016-04-05 12:23:43 +00:00
|
|
|
= render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...'
|
2015-11-16 14:07:16 +00:00
|
|
|
= render 'projects/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?
|
2013-08-01 19:35:40 +00:00
|
|
|
= f.submit 'Create milestone', class: "btn-create btn"
|
2015-01-24 18:02:58 +00:00
|
|
|
= link_to "Cancel", namespace_project_milestones_path(@project.namespace, @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"
|
2015-01-24 18:02:58 +00:00
|
|
|
= link_to "Cancel", namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-cancel"
|