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

29 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],
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
2019-03-02 22:35:43 +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
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
2017-08-17 22:00:37 +05:30
= render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project) } do
2019-03-02 22:35:43 +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
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?
2019-12-04 20:38:33 +05:30
= f.submit _('Create milestone'), class: 'btn-success btn qa-milestone-create-button'
2019-03-02 22:35:43 +05:30
= link_to _('Cancel'), project_milestones_path(@project), class: 'btn btn-cancel'
2017-08-17 22:00:37 +05:30
- else
2019-03-02 22:35:43 +05:30
= f.submit _('Save changes'), class: 'btn-success btn'
= link_to _('Cancel'), project_milestone_path(@project, @milestone), class: 'btn btn-cancel'