2016-04-05 05:42:38 -04: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-04 21:25:38 -04:00
|
|
|
= form_errors(@milestone)
|
2012-04-08 17:28:58 -04:00
|
|
|
.row
|
2013-12-30 16:55:15 -05:00
|
|
|
.col-md-6
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.label :title, "Title", class: "control-label"
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2016-02-12 16:28:53 -05:00
|
|
|
= f.text_field :title, maxlength: 255, class: "form-control", required: true, autofocus: true
|
2014-10-15 03:21:21 -04:00
|
|
|
.form-group.milestone-description
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.label :description, "Description", class: "control-label"
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2015-09-21 17:08:26 -04:00
|
|
|
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
|
2016-04-05 08:23:43 -04:00
|
|
|
= render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...'
|
2015-11-16 09:07:16 -05:00
|
|
|
= render 'projects/notes/hints'
|
2014-05-23 04:22:00 -04:00
|
|
|
.clearfix
|
|
|
|
.error-alert
|
2016-11-15 12:48:30 -05:00
|
|
|
= render "shared/milestones/form_dates", f: f
|
2012-04-08 17:28:58 -04:00
|
|
|
|
2012-04-10 01:51:08 -04:00
|
|
|
.form-actions
|
2012-04-08 17:28:58 -04:00
|
|
|
- if @milestone.new_record?
|
2013-08-01 15:35:40 -04:00
|
|
|
= f.submit 'Create milestone', class: "btn-create btn"
|
2015-01-24 13:02:58 -05:00
|
|
|
= link_to "Cancel", namespace_project_milestones_path(@project.namespace, @project), class: "btn btn-cancel"
|
2016-12-23 05:27:41 -05:00
|
|
|
- else
|
2013-01-29 15:18:19 -05:00
|
|
|
= f.submit 'Save changes', class: "btn-save btn"
|
2015-01-24 13:02:58 -05:00
|
|
|
= link_to "Cancel", namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-cancel"
|