Widget:VisitSchedulerRedux: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 49: | Line 49: | ||
$(this).val(updatedAppointment); | $(this).val(updatedAppointment); | ||
$.each(timeConstraints, function(key, value){ | $.each(timeConstraints, function(key, value){ | ||
$("#visit-"+key).css("border", "5px solid white"); | |||
if(key > modId && key <= 4){ | if(key > modId && key <= 4){ | ||
updatedAppointment = new Date(updatedAppointment.getFullYear(), updatedAppointment.getMonth(), updatedAppointment.getDate()+value[0]); | updatedAppointment = new Date(updatedAppointment.getFullYear(), updatedAppointment.getMonth(), updatedAppointment.getDate()+value[0]); | ||
Line 69: | Line 70: | ||
if((lastInfusion - firstInfusion) > (24*60*60*1000*30)){ | if((lastInfusion - firstInfusion) > (24*60*60*1000*30)){ | ||
alert( | alert("All infusions must occur within 30 days."); | ||
$("#visit-1").css("border", "5px solid red"); | |||
$("#visit-2").css("border", "5px solid red"); | |||
$("#visit-3").css("border", "5px solid red"); | |||
$("#visit-4").css("border", "5px solid red"); | |||
} | } | ||
}; | }; |