SHOW:
|
|
- or go back to the newest paste.
| 1 | ... | |
| 2 | <script id="patient-description-template" type="text/template"> | |
| 3 | <div class="patient-description"> | |
| 4 | <spring:message code='appointment.Appointment.create.patientId'/>{{- patientId}}<br/>
| |
| 5 | <spring:message code='appointment.Appointment.create.patientPhoneNumber'/>{{- phoneNumber}}<br/>
| |
| 6 | <spring:message code='appointment.Appointment.create.patientMissedMeeting'/>{{- dateMissedLastAppointment}}<br/>
| |
| 7 | </div> | |
| 8 | </script> | |
| 9 | ... | |
| 10 | var patientDescriptionTemplate = _.template($j('#patient-description-template').html()); // THIS
| |
| 11 | function updatePatient(formFieldId, patientObj, isPageLoad) {
| |
| 12 | if(patientObj!=null){
| |
| 13 | addPatientLink(patientObj); | |
| 14 | DWRAppointmentService.getPatientDescription(patientObj.patientId, function(details){
| |
| 15 | if(!details){
| |
| 16 | document.getElementById('patientDataCell').innerHTML = "";
| |
| 17 | return; | |
| 18 | } | |
| 19 | if(!details.phoneNumber) | |
| 20 | details.phoneNumber = "<spring:message code='appointment.Appointment.create.patientNoPhoneNumber'/>";; | |
| 21 | if(!details.dateMissedLastAppointment) | |
| 22 | - | |
| 22 | + | |
| 23 | - | var values = [{patientId : details.patientId}, {phoneNumber : details.phoneNumber}, {dateMissedLastAppointment : details.dateMissedLastAppointment}];
|
| 23 | + | var evaluated = patientDescriptionTemplate(details); // THIS |
| 24 | - | var parsed = _.template(${'#patient-description-template'},values);
|
| 24 | + | // now need to display this somewhere |
| 25 | }); | |
| 26 | } | |
| 27 | } |