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

28 lines
1.4 KiB
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
= form_for [@project.namespace.becomes(Namespace), @project, @milestone],
html: {class: 'milestone-form common-note-form js-quick-submit js-requires-input'},
data: { markdown_version: @milestone.cached_markdown_version } 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
= f.label :title, "Title", class: "col-form-label col-sm-2"
2014-09-02 18:07:02 +05:30
.col-sm-10
2018-11-18 11:00:15 +05:30
= f.text_field :title, maxlength: 255, class: "qa-milestone-title form-control", required: true, autofocus: true
2018-11-08 19:23:39 +05:30
.form-group.row.milestone-description
= f.label :description, "Description", class: "col-form-label col-sm-2"
2014-09-02 18:07:02 +05:30
.col-sm-10
2017-08-17 22:00:37 +05:30
= render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project) } do
2018-11-18 11:00:15 +05:30
= render 'projects/zen', f: f, attr: :description, classes: 'qa-milestone-description note-textarea', 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
2017-08-17 22:00:37 +05:30
= render "shared/milestones/form_dates", f: f
2014-09-02 18:07:02 +05:30
.form-actions
- if @milestone.new_record?
2018-11-18 11:00:15 +05:30
= f.submit 'Create milestone', class: "btn-create btn qa-milestone-create-button"
2017-09-10 17:25:29 +05:30
= link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel"
2017-08-17 22:00:37 +05:30
- else
2014-09-02 18:07:02 +05:30
= f.submit 'Save changes', class: "btn-save btn"
2017-09-10 17:25:29 +05:30
= link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn btn-cancel"