2020-10-24 23:57:45 +05:30
|
|
|
= form_for [@project, @milestone],
|
2019-03-02 22:35:43 +05:30
|
|
|
html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f|
|
2016-06-02 11:05:42 +05:30
|
|
|
= form_errors(@milestone)
|
2014-09-02 18:07:02 +05:30
|
|
|
.row
|
|
|
|
.col-md-6
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-group.row
|
2019-03-02 22:35:43 +05:30
|
|
|
.col-form-label.col-sm-2
|
|
|
|
= f.label :title, _('Title')
|
2014-09-02 18:07:02 +05:30
|
|
|
.col-sm-10
|
2021-06-08 01:23:25 +05:30
|
|
|
= f.text_field :title, maxlength: 255, class: 'form-control gl-form-input', data: { qa_selector: 'milestone_title_field' }, required: true, autofocus: true
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-group.row.milestone-description
|
2019-03-02 22:35:43 +05:30
|
|
|
.col-form-label.col-sm-2
|
|
|
|
= f.label :description, _('Description')
|
2014-09-02 18:07:02 +05:30
|
|
|
.col-sm-10
|
2020-06-23 00:09:42 +05:30
|
|
|
= render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project) } do
|
2021-06-08 01:23:25 +05:30
|
|
|
= render 'shared/zen', f: f, attr: :description,
|
|
|
|
classes: 'note-textarea',
|
|
|
|
qa_selector: 'milestone_description_field',
|
|
|
|
supports_autocomplete: true,
|
|
|
|
placeholder: _('Write milestone description...')
|
2017-08-17 22:00:37 +05:30
|
|
|
= render 'shared/notes/hints'
|
2014-09-02 18:07:02 +05:30
|
|
|
.clearfix
|
|
|
|
.error-alert
|
2019-03-02 22:35:43 +05:30
|
|
|
= render 'shared/milestones/form_dates', f: f
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
.form-actions
|
|
|
|
- if @milestone.new_record?
|
2021-04-17 20:07:23 +05:30
|
|
|
= 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'
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2021-04-17 20:07:23 +05:30
|
|
|
= 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'
|