2020-07-27 08:09:50 -04:00
|
|
|
= form_for [@project, @milestone],
|
2019-01-31 03:58:23 -05:00
|
|
|
html: { class: '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
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row
|
2019-01-23 13:17:09 -05:00
|
|
|
.col-form-label.col-sm-2
|
|
|
|
= f.label :title, _('Title')
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2021-04-27 11:09:52 -04:00
|
|
|
= f.text_field :title, maxlength: 255, class: 'form-control gl-form-input', data: { qa_selector: 'milestone_title_field' }, required: true, autofocus: true
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row.milestone-description
|
2019-01-23 13:17:09 -05:00
|
|
|
.col-form-label.col-sm-2
|
|
|
|
= f.label :description, _('Description')
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2020-06-11 11:08:36 -04:00
|
|
|
= render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project) } do
|
2021-05-06 08:10:38 -04:00
|
|
|
= render 'shared/zen', f: f, attr: :description,
|
|
|
|
classes: 'note-textarea',
|
|
|
|
qa_selector: 'milestone_description_field',
|
|
|
|
supports_autocomplete: true,
|
|
|
|
placeholder: _('Write milestone description...')
|
2017-05-03 04:48:01 -04:00
|
|
|
= render 'shared/notes/hints'
|
2014-05-23 04:22:00 -04:00
|
|
|
.clearfix
|
|
|
|
.error-alert
|
2019-01-29 06:49:03 -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?
|
2021-03-12 13:09:23 -05:00
|
|
|
= f.submit _('Create milestone'), class: 'gl-button btn-confirm btn', data: { qa_selector: 'create_milestone_button' }
|
|
|
|
= link_to _('Cancel'), project_milestones_path(@project), class: 'gl-button btn btn-default btn-cancel'
|
2016-12-23 05:27:41 -05:00
|
|
|
- else
|
2021-03-12 13:09:23 -05:00
|
|
|
= f.submit _('Save changes'), class: 'gl-button btn-confirm btn'
|
|
|
|
= link_to _('Cancel'), project_milestone_path(@project, @milestone), class: 'gl-button btn btn-default btn-cancel'
|