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

31 lines
1.5 KiB
Text
Raw Normal View History

2016-06-02 11:05:42 +05:30
= form_for [@project.namespace.becomes(Namespace), @project, @milestone], html: {class: 'form-horizontal milestone-form common-note-form js-quick-submit js-requires-input'} do |f|
= form_errors(@milestone)
2014-09-02 18:07:02 +05:30
.row
.col-md-6
.form-group
= f.label :title, "Title", class: "control-label"
.col-sm-10
2016-06-02 11:05:42 +05:30
= f.text_field :title, maxlength: 255, class: "form-control", required: true, autofocus: true
2015-04-26 12:48:37 +05:30
.form-group.milestone-description
2014-09-02 18:07:02 +05:30
= f.label :description, "Description", class: "control-label"
.col-sm-10
2015-09-25 12:07:36 +05:30
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
2016-06-02 11:05:42 +05:30
= render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...'
2015-11-26 14:37:03 +05:30
= render 'projects/notes/hints'
2014-09-02 18:07:02 +05:30
.clearfix
.error-alert
.col-md-6
.form-group
= f.label :due_date, "Due Date", class: "control-label"
.col-sm-10
= f.text_field :due_date, class: "datepicker form-control", placeholder: "Select due date"
2016-06-22 15:30:34 +05:30
%a.inline.prepend-top-5.js-clear-due-date{ href: "#" } Clear due date
2014-09-02 18:07:02 +05:30
.form-actions
- if @milestone.new_record?
= f.submit 'Create milestone', class: "btn-create btn"
2015-04-26 12:48:37 +05:30
= link_to "Cancel", namespace_project_milestones_path(@project.namespace, @project), class: "btn btn-cancel"
2014-09-02 18:07:02 +05:30
-else
= f.submit 'Save changes', class: "btn-save btn"
2015-04-26 12:48:37 +05:30
= link_to "Cancel", namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-cancel"