debian-mirror-gitlab/app/views/projects/milestones/_form.html.haml

31 lines
1.6 KiB
Text
Raw Normal View History

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)
2021-09-30 23:02:18 +05:30
.form-group.row
.col-form-label.col-sm-2
= f.label :title, _('Title')
.col-sm-10
= f.text_field :title, maxlength: 255, class: 'form-control gl-form-input', data: { qa_selector: 'milestone_title_field' }, required: true, autofocus: true
= render 'shared/milestones/form_dates', f: f
.form-group.row.milestone-description
.col-form-label.col-sm-2
= f.label :description, _('Description')
.col-sm-10
= render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project) } do
= render 'shared/zen', f: f, attr: :description,
classes: 'note-textarea',
qa_selector: 'milestone_description_field',
supports_autocomplete: true,
placeholder: _('Write milestone description...')
= render 'shared/notes/hints'
.clearfix
.error-alert
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'