summaryrefslogtreecommitdiff
path: root/app/views/groups/milestones/new.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/groups/milestones/new.html.haml')
-rw-r--r--app/views/groups/milestones/new.html.haml46
1 files changed, 46 insertions, 0 deletions
diff --git a/app/views/groups/milestones/new.html.haml b/app/views/groups/milestones/new.html.haml
new file mode 100644
index 00000000000..287f89a7074
--- /dev/null
+++ b/app/views/groups/milestones/new.html.haml
@@ -0,0 +1,46 @@
+%h3.page-title
+ New Milestone
+
+%p.light
+ This will create milestone in every selected project
+%hr
+
+= form_for @group_milestone, as: :milestone, url: group_milestones_path(@group), html: { class: 'form-horizontal milestone-form gfm-form js-requires-input' } do |f|
+ .row
+ .col-md-6
+ .form-group
+ = f.label :title, "Title", class: "control-label"
+ .col-sm-10
+ = f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true
+ %p.hint Required
+ .form-group.milestone-description
+ = f.label :description, "Description", class: "control-label"
+ .col-sm-10
+ = render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
+ = render 'projects/zen', f: f, attr: :description, classes: 'description form-control js-quick-submit'
+ = render 'projects/notes/hints'
+ .clearfix
+ .error-alert
+ .form-group
+ = f.label :projects, "Projects", class: "control-label"
+ .col-sm-10
+ = f.collection_select :project_ids, @group.projects, :id, :name,
+ { selected: @group.projects.map(&:id) }, multiple: true, class: 'select2'
+
+ .col-md-6
+ .form-group
+ = f.label :due_date, "Due Date", class: "control-label"
+ .col-sm-10= f.hidden_field :due_date
+ .col-sm-10
+ .datepicker
+
+ .form-actions
+ = f.submit 'Create Milestone', class: "btn-create btn"
+ = link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel"
+
+
+:javascript
+ $( ".datepicker" ).datepicker({
+ dateFormat: "yy-mm-dd",
+ onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) }
+ }).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#milestone_due_date').val()));