Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KG - Datepicker Modifications #132

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f02307f
SLA and Fulfillemnt
Feb 4, 2016
9a58ed4
all changes to pickers
Feb 9, 2016
d2ee6bd
Merge branch 'master' into kg-fulfillment_date_selector
Feb 9, 2016
dc53370
specs, and quick bug fix
Feb 9, 2016
095e053
Update create_task_spec.rb
Feb 9, 2016
1ca1442
fixing cookie js
amcates Feb 23, 2016
3173c41
fixing default hidden columns
Feb 23, 2016
2f6050c
fixed reinitialization of deleted procedures
Feb 23, 2016
ad91ed3
deleted commented out test
Feb 24, 2016
4fe6928
deleted commented out method
Feb 24, 2016
0ccfe0d
standard ruby convention to add empty line at end of file
Feb 24, 2016
6db0de0
removed trailing whitespace
Feb 24, 2016
c5e8587
fixed specs
Feb 24, 2016
2c30754
consistency, removed parens
Feb 24, 2016
9354b91
identity_views_reports_tab_spec
Feb 25, 2016
e2c3bdb
identity_manages_notes_spec
Feb 25, 2016
d6b637b
Validations were added and the spec file was not updated.
jleonardw9 Mar 25, 2016
886bb09
Required data was not being created.
jleonardw9 Mar 25, 2016
c34bb75
Data should be created within the 'it' block.
jleonardw9 Mar 25, 2016
5555b41
Code was changed in the controller but the spec was not updated.
jleonardw9 Mar 25, 2016
099d0f6
Test not needed, too granular.
jleonardw9 Mar 25, 2016
1412e84
Date was formatted incorrectly
jleonardw9 Mar 25, 2016
7ada5ba
fixed failing date specs
Mar 25, 2016
81ff528
Resolving merge conflicts
jleonardw9 Mar 28, 2016
c9b89af
Merge pull request #139 from sparc-request/wth-fix-identity-views-rep…
jleonardw9 Mar 28, 2016
a9a2bfb
fixed specs
Mar 28, 2016
0f7c376
updated displays in reports
Mar 29, 2016
d3fa27e
Merge pull request #137 from sparc-request/ac-ml-bootstrap_table_cookie
jleonardw9 Mar 30, 2016
2abf571
changed route from put to post
Apr 1, 2016
a67d44d
removed before block and instance var
Apr 1, 2016
29fd7e0
pushing up to share
Apr 1, 2016
c52b9e7
reverted to put route
Apr 1, 2016
ad13d3f
set one_time_fee to false, line items were failing on validations
Apr 1, 2016
b493f00
removed before block, moved data setup to within tests
Apr 1, 2016
0d00430
removed commented out code
Apr 1, 2016
1f59cab
Merge pull request #142 from sparc-request/ml-wth-refactor_multiple_l…
marklohr Apr 5, 2016
a459a4d
Merge pull request #136 from sparc-request/kg-procedures_in_appt_cale…
jleonardw9 Apr 5, 2016
efa4b5e
Merge pull request #141 from sparc-request/kg-date_time_zones
jleonardw9 Apr 5, 2016
75bdea1
Fixing multiple line items controller spec.
jleonardw9 Apr 6, 2016
91f9859
These specs had scenarios that could be combined and redundant ones w…
jleonardw9 Apr 6, 2016
ff076c5
invoice report was erroring out before generating invoice, removed mo…
Apr 11, 2016
fb2551f
added 2 extra columns for alignment
Apr 11, 2016
0a8ac0a
aligned column headers for study lvl charges
Apr 12, 2016
6be7c33
aligned display costs
Apr 12, 2016
90453ef
needed to pass time object instead of string
Apr 12, 2016
01b1199
Fix for protocol controller spec
jleonardw9 Apr 14, 2016
c120dff
corrections to date sorter
Apr 14, 2016
f10858c
Merge pull request #144 from sparc-request/kg-date_sorter_corrections
jleonardw9 Apr 14, 2016
384072a
Merge pull request #143 from sparc-request/ml-fulfillment_invoice_rpt…
jleonardw9 Apr 14, 2016
a7ebcde
merge conflicts
Apr 19, 2016
c0cbcef
finally got it working again
Apr 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'autoprefixer-rails'
gem 'axlsx_rails'
gem 'bootstrap-sass'
gem 'bootstrap-select-rails'
gem 'bootstrap3-datetimepicker-rails', '~> 4.0.0'
gem 'bootstrap3-datetimepicker-rails', '~> 4.17.37'
gem 'coffee-rails', '~> 4.0.0'
gem 'daemons'
gem 'delayed_job_active_record'
Expand All @@ -23,7 +23,7 @@ gem 'haml-rails'
gem 'hashie-forbidden_attributes'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'momentjs-rails', '>= 2.8.1'
gem 'momentjs-rails', '>= 2.9.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you need to update the libraries?

gem 'mysql2'
gem 'net-ldap'
gem 'omniauth'
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ GEM
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
bootstrap-select-rails (1.6.3)
bootstrap3-datetimepicker-rails (4.0.0)
bootstrap3-datetimepicker-rails (4.17.37)
momentjs-rails (>= 2.8.1)
builder (3.2.2)
capistrano (3.4.0)
Expand Down Expand Up @@ -420,7 +420,7 @@ DEPENDENCIES
axlsx_rails
bootstrap-sass
bootstrap-select-rails
bootstrap3-datetimepicker-rails (~> 4.0.0)
bootstrap3-datetimepicker-rails (~> 4.17.37)
capistrano (~> 3.0)
capistrano-passenger
capistrano-rails (~> 1.1)
Expand All @@ -445,7 +445,7 @@ DEPENDENCIES
jbuilder (~> 2.0)
jquery-rails
launchy
momentjs-rails (>= 2.8.1)
momentjs-rails (>= 2.9.0)
mysql2
net-ldap
omniauth
Expand Down
15 changes: 9 additions & 6 deletions app/assets/javascripts/appointments.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ $ ->
url: "/appointments/#{appointment_id}.js"

# Procedure buttons

$(document).on 'dp.hide', ".completed_date_field", ->
procedure_id = $(this).parents(".procedure").data("id")
completed_date = $(this).children("input").val()
completed_date = $(this).val()
data = procedure:
completed_date: completed_date
$.ajax
Expand All @@ -118,8 +117,8 @@ $ ->
data: data

$(document).on 'dp.hide', ".followup_procedure_datepicker", ->
task_id = $(this).children("input").data("taskId")
due_at = $(this).children("input").val()
task_id = $(this).data("taskId")
due_at = $(this).val()
data = task:
due_at: due_at
$.ajax
Expand Down Expand Up @@ -295,7 +294,9 @@ $ ->
url: "/procedures/#{procedure_id}.js"

window.start_date_init = (date) ->
$('#start_date').datetimepicker(defaultDate: date)
$('#start_date').datetimepicker
defaultDate: date
ignoreReadonly: true
$('#start_date').on 'dp.hide', (e) ->
appointment_id = $(this).parents('.row.appointment').data('id')
data = appointment: start_date: e.date.toDate().toUTCString()
Expand All @@ -308,7 +309,9 @@ $ ->
$('#completed_date').data("DateTimePicker").minDate(e.date)

window.completed_date_init = (date) ->
$('#completed_date').datetimepicker(defaultDate: date)
$('#completed_date').datetimepicker
defaultDate: date
ignoreReadonly: true
$('#start_date').data("DateTimePicker").maxDate($('#completed_date').data("DateTimePicker").date())
$('#completed_date').data("DateTimePicker").minDate($('#start_date').data("DateTimePicker").date())
$('#completed_date').on 'dp.hide', (e) ->
Expand Down
6 changes: 2 additions & 4 deletions app/views/appointments/_followup_calendar.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
- if procedure.task.present?
.input-group.date.followup_procedure_datepicker
%input{type: "text", class: "form-control", value: format_date(procedure.task.due_at), id: "follow_up_datepicker_#{procedure.id}", data:{task_id: procedure.task.id}}
%span.input-group-addon
%span.glyphicon.glyphicon-calendar
.input-group.date
%input{type: "text", class: "form-control followup_procedure_datepicker", value: format_date(procedure.task.due_at), id: "follow_up_datepicker_#{procedure.id}", readonly: true, data:{task_id: procedure.task.id}}
- else
-# div used for capturing click events when button is disabled
.btn-group{class: "#{ procedure.appt_started? ? '' : 'pre_start_disabled' }"}
Expand Down
6 changes: 2 additions & 4 deletions app/views/appointments/_procedure.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
%td.followup{id: "follow_up_#{procedure.id}"}
= render partial: "/appointments/followup_calendar", locals: { procedure: procedure }
%td.completed-date
.input-group.date.completed_date_field
%input.datetimepicker{type: "text", class: "form-control", disabled: !(procedure.appt_started? && procedure.complete?), value: format_date(procedure.completed_date)}
%span.input-group-addon{ class: "#{ procedure.appt_started? ? '' : 'pre_start_disabled' }" }
%span.glyphicon.glyphicon-calendar
.input-group.date
%input.datetimepicker{type: "text", class: "form-control completed_date_field", disabled: !(procedure.appt_started? && procedure.complete?), value: format_date(procedure.completed_date), readonly: true}
%td.performed-by
= select_tag "performed-by-#{procedure.id}", options_for_select(procedure.performable_by, procedure.performer_id), include_blank: "N/A", class: "performed-by-dropdown selectpicker", data: { width: '125px' }, 'showIcon' => false
%td.notes
Expand Down
6 changes: 4 additions & 2 deletions app/views/appointments/_start_complete_buttons.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
%form.form-horizontal
.form-group
%label.col-xs-1.control-label#start-date-label{for: 'start_date'}= t(:appointment)[:start_date]
.col-xs-6= text_field_tag 'start_date', '', class: 'form-control'
.col-xs-6
= text_field_tag 'start_date', '', class: 'form-control', readonly: true
.col-xs-1.reset_button
%button.btn.btn-warning.reset_visit{type: "button"}= t(:appointment)[:reset_visit]

Expand All @@ -15,7 +16,8 @@
%form.form-horizontal
.form-group
%label.col-xs-1.control-label#completed-date-label{for: 'completed_date'}= t(:appointment)[:completed_date]
.col-xs-6= text_field_tag 'completed_date', '', class: 'form-control'
.col-xs-6
= text_field_tag 'completed_date', '', class: 'form-control', readonly: true
.col-xs-1#remove_completed_date_button
%button.btn.btn-danger.uncomplete_visit{type: "button"}
%span.glyphicon.glyphicon-remove
Expand Down
9 changes: 7 additions & 2 deletions app/views/appointments/show.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ statuses[statuses.length] = "<%= status %>"
$('#appointment_indications').selectpicker()
$('#appointment_indications').selectpicker('val', statuses)

$(".followup_procedure_datepicker").datetimepicker(format: 'MM-DD-YYYY')
$(".completed_date_field").datetimepicker(format: 'MM-DD-YYYY')
$(".followup_procedure_datepicker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true

$(".completed_date_field").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true

$('.row.appointment [data-toggle="tooltip"]').tooltip()
4 changes: 3 additions & 1 deletion app/views/fulfillments/edit.js.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$("#modal_area").html("<%= escape_javascript(render(:partial =>'study_level_activities/fulfillment_form', locals: {line_item: @line_item, fulfillment: @fulfillment, clinical_providers: @clinical_providers, header_text: 'Edit Fulfillment'})) %>");
$("#modal_place").modal 'show'
$("#date_fulfilled_field").datetimepicker(format: 'MM-DD-YYYY')
$("#date_fulfilled_field").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$(".selectpicker").selectpicker()
4 changes: 3 additions & 1 deletion app/views/fulfillments/new.js.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$("#modal_area").html("<%= escape_javascript(render(:partial =>'study_level_activities/fulfillment_form', locals: {line_item: @line_item, fulfillment: @fulfillment, component: @component, clinical_providers: @clinical_providers, header_text: 'Create New Fulfillment'})) %>");
$("#modal_place").modal 'show'
$("#date_fulfilled_field").datetimepicker(format: 'MM-DD-YYYY')
$("#date_fulfilled_field").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$(".selectpicker").selectpicker()
4 changes: 3 additions & 1 deletion app/views/line_items/edit.js.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<% if @otf %> # study level activities line item edit
$("#modal_area").html("<%= escape_javascript(render(:partial =>'study_level_activities/study_level_activity_form', locals: {protocol: @protocol, line_item: @line_item, header_text: t(:line_item)[:edit]})) %>");
$("#date_started_field").datetimepicker(format: 'MM-DD-YYYY')
$("#date_started_field").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
<% else %> # study schedule line item edit
$("#modal_area").html("<%= escape_javascript(render(:partial =>'study_schedule/management/manage_services/change_service_form', locals: {line_item: @line_item})) %>");
<% end %>
Expand Down
4 changes: 3 additions & 1 deletion app/views/line_items/new.js.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$("#modal_area").html("<%= escape_javascript(render(:partial =>'study_level_activities/study_level_activity_form', locals: {protocol: @protocol, line_item: @line_item, header_text: t(:line_item)[(is_protocol_type_study?(@protocol)) ? :create : :create_project]})) %>");
$("#modal_place").modal 'show'
$("#date_started_field").datetimepicker(format: 'MM-DD-YYYY')
$("#date_started_field").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$(".selectpicker").selectpicker()
5 changes: 1 addition & 4 deletions app/views/participants/_participant_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
.form-group
= p.label "date_of_birth", t(:participant)[:dob]+t(:actions)[:required], class: "col-sm-4 control-label "
.col-sm-7
.input-group#dob_time_picker
= p.text_field "date_of_birth", {class: 'form-control datetimepicker', value: format_date(participant.date_of_birth)}
%span.input-group-addon
%span.glyphicon.glyphicon-calendar
= p.text_field "date_of_birth", {id: 'dob_time_picker', class: 'form-control datetimepicker', value: format_date(participant.date_of_birth), readonly: true}
.form-group
= p.label "gender", t(:participant)[:gender]+t(:actions)[:required], class: "col-sm-4 control-label"
.col-sm-7= p.select "gender", Participant::GENDER_OPTIONS, {include_blank: true}, :class => "form-control selectpicker"
Expand Down
5 changes: 4 additions & 1 deletion app/views/participants/edit.js.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
$("#modal_area").html("<%= escape_javascript(render(:partial =>'participants/participant_form', locals: {protocol: @protocol, participant: @participant, header_text: 'Edit Participant'})) %>");
$("#modal_place").modal 'show'
$("#dob_time_picker").datetimepicker(format: 'MM-DD-YYYY', viewMode: 'years')
$("#dob_time_picker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
viewMode: 'years'
$(".selectpicker").selectpicker()

5 changes: 4 additions & 1 deletion app/views/participants/new.js.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
$("#modal_area").html("<%= escape_javascript(render(:partial =>'participants/participant_form', locals: {protocol: @protocol, participant: @participant, header_text: 'Create New Participant'})) %>");
$("#modal_place").modal 'show'
$("#dob_time_picker").datetimepicker(format: 'MM-DD-YYYY', viewMode: 'years')
$("#dob_time_picker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
viewMode: 'years'
$(".selectpicker").selectpicker()
5 changes: 1 addition & 4 deletions app/views/procedures/_edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
.form-group
= form.label "due_at", t(:procedure)[:follow_up_date], class: "col-sm-3 control-label"
.col-sm-8
.input-group.date#follow_up_procedure_datepicker
= form.text_field :due_at, {class: 'form-control'}
%span.input-group-addon
%span.glyphicon.glyphicon-calendar
= form.text_field :due_at, {class: 'form-control datetimepicker', id: "follow_up_procedure_datepicker", readonly: true}
.form-group
= form.fields_for :notes, Note.new do |notes_form|
= notes_form.hidden_field :notable_type, value: 'Procedure'
Expand Down
6 changes: 4 additions & 2 deletions app/views/procedures/create.js.coffee
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
core = $(".core[data-core-id='<%= @procedures.first.sparc_core_id %>']")

$(".completed_date_field").datetimepicker(format: 'MM-DD-YYYY')

if core.length == 0
$(".row.calendar .col-xs-12").append("<%= escape_javascript(render partial: 'appointments/core', locals: {core_id: @procedures.first.sparc_core_id, procedures: @procedures, appointment: @appointment}) %>")
else
core.find("tbody").append("<%= escape_javascript(render partial: 'appointments/procedure', collection: @procedures, as: :procedure) %>")

$(".selectpicker").selectpicker()

$(".completed_date_field").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true

update_complete_visit_button(<%= @appointment.can_finish? %>)
4 changes: 3 additions & 1 deletion app/views/procedures/edit.js.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
$("#modal_area").html("<%= escape_javascript(render(partial: 'edit', locals: { procedure: @procedure, task: @task, clinical_providers: @clinical_providers})) %>")
$("#follow_up_procedure_datepicker").datetimepicker(format: 'MM-DD-YYYY')
$("#follow_up_procedure_datepicker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$("#modal_place").modal 'show'

$(".selectpicker").selectpicker()
6 changes: 4 additions & 2 deletions app/views/reports/_auditing_report.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
.col-sm-9= text_field_tag "title", title, class: "form-control"
.form-group
= label_tag "start_date", t(:reports)[:start_date], class: "col-sm-3 control-label"
.col-sm-9= text_field_tag "start_date", nil, class: "datepicker form-control"
.col-sm-9
= text_field_tag "start_date", nil, class: "datepicker form-control", readonly: true
.form-group
= label_tag "end_date", t(:reports)[:end_date], class: "col-sm-3 control-label"
.col-sm-9= text_field_tag "end_date", nil, class: "datepicker form-control"
.col-sm-9
= text_field_tag "end_date", nil, class: "datepicker form-control", readonly: true
.form-group
= label_tag "protocol", t(:reports)[:protocols], class: "col-sm-3 control-label"
.col-sm-9
Expand Down
4 changes: 2 additions & 2 deletions app/views/reports/_invoice_report.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
.form-group
= label_tag "start_date", t(:reports)[:start_date], class: "col-sm-3 control-label"
.col-sm-9
= text_field_tag "start_date", nil, class: "datepicker form-control"
= text_field_tag "start_date", nil, class: "datepicker form-control", readonly: true
.form-group
= label_tag "end_date", t(:reports)[:end_date], class: "col-sm-3 control-label"
.col-sm-9
= text_field_tag "end_date", nil, class: "datepicker form-control"
= text_field_tag "end_date", nil, class: "datepicker form-control", readonly: true
.form-group
= label_tag "protocol", t(:reports)[:protocols], class: "col-sm-3 control-label"
.col-sm-9
Expand Down
6 changes: 4 additions & 2 deletions app/views/reports/_project_summary_report.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
.col-sm-9= text_field_tag "title", title, class: "form-control"
.form-group
= label_tag "start_date", t(:reports)[:start_date], class: "col-sm-3 control-label"
.col-sm-9= text_field_tag "start_date", nil, class: "datepicker form-control"
.col-sm-9
= text_field_tag "start_date", nil, class: "datepicker form-control", readonly: true
.form-group
= label_tag "end_date", t(:reports)[:end_date], class: "col-sm-3 control-label"
.col-sm-9= text_field_tag "end_date", nil, class: "datepicker form-control"
.col-sm-9
= text_field_tag "end_date", nil, class: "datepicker form-control", readonly: true
.form-group
= label_tag "protocol", t(:reports)[:protocol], class: "col-sm-3 control-label"
.col-sm-9
Expand Down
8 changes: 6 additions & 2 deletions app/views/reports/new.js.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
$("#modal_area").html("<%= escape_javascript(render(partial: @report_type, locals: { title: @title, report_type: @report_type, time_zone: @time_zone })) %>")
$("#modal_place").modal('show')
$('#start_date').datetimepicker(format: 'MM-DD-YYYY')
$('#end_date').datetimepicker(format: 'MM-DD-YYYY')
$('#start_date').datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$('#end_date').datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$(".modal-content .selectpicker").selectpicker()
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.form-group
= form.label "fulfilled_at", t(:fulfillment)[:fulfillment_date]+t(:actions)[:required], class: "col-sm-4 control-label"
.col-sm-7
= form.text_field "fulfilled_at", {class: 'form-control datetimepicker', id: 'date_fulfilled_field', value: format_date(fulfillment.fulfilled_at)}
= form.text_field "fulfilled_at", {class: 'form-control datetimepicker', id: 'date_fulfilled_field', value: format_date(fulfillment.fulfilled_at), readonly: true}
.form-group
= form.label "quantity", t(:fulfillment)[:quantity]+t(:actions)[:required], class: "col-sm-4 control-label"
.col-sm-7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.form-group
= form.label "started_at", t(:line_item)[:started], class: "col-sm-4 control-label "
.col-sm-7
= form.text_field "started_at", {class: 'form-control datetimepicker', id: 'date_started_field', value: format_date(line_item.started_at)}
= form.text_field "started_at", {class: 'form-control datetimepicker', id: 'date_started_field', value: format_date(line_item.started_at), readonly: true}
.form-group
= form.label "account_number", t(:line_item)[:account_number], class: "col-sm-4 control-label"
.col-sm-7
Expand Down
10 changes: 4 additions & 6 deletions app/views/tasks/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@
.form-group
= f.label "assignee_id", t(:task)[:assignee_name]+t(:actions)[:required], class: "col-sm-4 control-label"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. New Syntax.

.col-sm-7
= f.select :assignee_id, options_from_collection_for_select(clinical_providers.map(&:identity), 'id', 'full_name'), { include_blank: true }, :class => "form-control selectpicker"
= f.select :assignee_id, options_from_collection_for_select(clinical_providers.map(&:identity), 'id', 'full_name'), { include_blank: true }, class: "form-control selectpicker"
.form-group
= f.label "follow_up_date", t(:task)[:due_at]+t(:actions)[:required], class: "col-sm-4 control-label"
.col-sm-7
.input-group.date#follow_up_datepicker
= f.text_field :due_at, {class: 'form-control'}
%span.input-group-addon
%span.glyphicon.glyphicon-calendar
= f.text_field :due_at, {id: 'follow_up_datepicker', class: 'form-control', readonly: true}
.form-group
= f.label "task_body", t(:task)[:object], class: "col-sm-4 control-label"
.col-sm-7= f.text_area :body, { class: "form-control", rows: 4 }
.col-sm-7
= f.text_area :body, { class: "form-control", rows: 4 }
.modal-footer
.center-block
%button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}}
Expand Down
5 changes: 1 addition & 4 deletions app/views/tasks/_task_reschedule_modal.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
.form-group
= t.label "due_at", t(:task)[:due_at], class: "col-sm-4 control-label"
.col-sm-7
.input-group.date#reschedule_datepicker
= t.text_field "due_at", {class: 'form-control datetimepicker', value: format_date(task.due_at)}
%span.input-group-addon
%span.glyphicon.glyphicon-calendar
= t.text_field "due_at", {id: 'reschedule_datepicker', class: 'form-control datetimepicker', value: format_date(task.due_at), readonly: true}
.modal-footer
.center-block
%button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}}= t(:actions)[:close]
Expand Down
4 changes: 3 additions & 1 deletion app/views/tasks/create.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ $("#modal_place").modal 'hide'
$("#follow_up_<%= @procedure.id %>").html("<%= escape_javascript(render(:partial =>'appointments/followup_calendar', locals: {procedure: @procedure})) %>")
update_complete_visit_button(<%= @procedure.appointment.can_finish? %>)
<% end %>
$(".followup_procedure_datepicker").datetimepicker(format: 'MM-DD-YYYY')
$(".followup_procedure_datepicker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
<% end %>
4 changes: 3 additions & 1 deletion app/views/tasks/new.js.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$("#modal_area").html("<%= escape_javascript(render(partial: 'form', locals: {task: @task, clinical_providers: @clinical_providers})) %>")
$("#modal_place").modal 'show'
$("#follow_up_datepicker").datetimepicker(format: 'MM-DD-YYYY')
$("#follow_up_datepicker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$(".selectpicker").selectpicker()
4 changes: 3 additions & 1 deletion app/views/tasks/task_reschedule.js.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
$("#modal_area").html("<%= escape_javascript(render(:partial =>'task_reschedule_modal', locals: {task: @task})) %>");
$("#reschedule_datepicker").datetimepicker(format: 'MM-DD-YYYY')
$("#reschedule_datepicker").datetimepicker
format: 'MM-DD-YYYY'
ignoreReadonly: true
$("#modal_place").modal 'show'

$(".selectpicker").selectpicker()
1 change: 0 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the schema checked in?

ActiveRecord::Schema.define(version: 20160120150958) do


create_table "appointment_statuses", force: :cascade do |t|
t.string "status", limit: 255
t.datetime "created_at"
Expand Down