Changeset 4914
- Timestamp:
- 07/11/08 22:15:04 (6 months ago)
- Files:
-
- openmrs-modules/registration/metadata/moduleApplicationContext.xml (modified) (2 diffs)
- openmrs-modules/registration/web/module/registerPatient.jsp (modified) (1 diff)
- openmrs-modules/registration/web/module/registrationForm.jsp (modified) (1 diff)
- openmrs-modules/registration/web/module/resources/scripts/registration.js (modified) (3 diffs)
- openmrs-modules/registration/web/src/org/openmrs/module/registration/web/controller/RegisterPatientFormController.java (moved) (moved from openmrs-modules/registration/web/src/org/openmrs/module/registration/web/controller/NewPatientFormController.java) (1 diff)
- openmrs-modules/registration/web/src/org/openmrs/module/registration/web/controller/RegistrationSearchServlet.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs-modules/registration/metadata/moduleApplicationContext.xml
r4904 r4914 10 10 <props> 11 11 <prop key="module/@MODULE_ID@/registration.form">registrationForm</prop> 12 <prop key="module/@MODULE_ID@/ newPatient.form">newPatientForm</prop>12 <prop key="module/@MODULE_ID@/registerPatient.form">registerPatient</prop> 13 13 </props> 14 14 </property> … … 23 23 <property name="formView"><value>/module/@MODULE_ID@/registrationForm</value></property> 24 24 </bean> 25 <bean id="newPatientForm" class="@MODULE_PACKAGE@.web.controller.NewPatientFormController"> 26 <property name="sessionForm"><value>true</value></property> 27 <property name="commandName"><value>newPatientForm</value></property> 28 <property name="successView"><value>newPatient.form</value></property> 29 <property name="formView"><value>/module/@MODULE_ID@/newPatientForm</value></property> 25 <bean id="registerPatient" class="@MODULE_PACKAGE@.web.controller.RegisterPatientFormController"> 26 <property name="commandName"><value>registerPatient</value></property> 27 <property name="successView"><value>registerPatient.form</value></property> 28 <property name="formView"><value>/module/@MODULE_ID@/registerPatient</value></property> 30 29 </bean> 31 30 openmrs-modules/registration/web/module/registerPatient.jsp
r4904 r4914 1 <%-- 2 Document : registerPatient 3 Created on : 10 Jul, 2008, 2:37:55 PM 4 Author : Sunbon 5 --%> 6 7 <%@page contentType="text/html" pageEncoding="UTF-8"%> 8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 9 "http://www.w3.org/TR/html4/loose.dtd"> 10 11 <html> 12 <head> 13 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 14 <title>JSP Page</title> 15 </head> 16 <body> 17 <h2>Hello World!</h2> 18 </body> 19 </html> 1 <%@ include file="/WEB-INF/template/include.jsp"%> 2 <%@ include file="/WEB-INF/template/header.jsp"%> 3 <h2>Do you want to register a patient?</h2> 4 <%@ include file="/WEB-INF/template/footer.jsp"%> openmrs-modules/registration/web/module/registrationForm.jsp
r4904 r4914 54 54 <div class="box"> 55 55 <spring:message code="registration.msg.registerInstructions" /><br/><br/> 56 <form method="post" onsubmit="return validateRegistration()" action="registerPatient. htm">56 <form method="post" onsubmit="return validateRegistration()" action="registerPatient.form"> 57 57 <table> 58 58 <tbody> openmrs-modules/registration/web/module/resources/scripts/registration.js
r4904 r4914 25 25 26 26 $(document).ready(function() { 27 $("#i18n").datepicker($.extend({}, 28 $.datepicker.regional[''], { 29 showStatus: true, 30 showOn: "both", 31 buttonImage: "/openmrs/moduleResources/registration/images/calendar.gif", 32 buttonImageOnly: true 33 })); 27 $("#searchField").focus(); 28 $("#i18n").datepicker($.extend({}, 29 $.datepicker.regional[''], { 30 showStatus: true, 31 showOn: "both", 32 buttonImage: "/openmrs/moduleResources/registration/images/calendar.gif", 33 buttonImageOnly: true 34 })); 34 35 }); 35 36 … … 46 47 return true; 47 48 } 48 /*else if(ch==13){ 49 /*else if(ch==13){ 49 50 return true; 50 51 }*/ … … 60 61 var searchWord = $("#searchField").attr("value"); 61 62 if(prevPhrase!=searchWord) 62 $("#searchResults").load('/openmrs/moduleServlet/registration/RegistrationSearchServlet?phrase='+searchWord); 63 $.ajax({ 64 type:"POST", 65 url:"/openmrs/moduleServlet/registration/RegistrationSearchServlet", 66 data:"phrase="+searchWord, 67 success: function(output){ 68 $("#searchResults").html(output); 69 } 70 }); 63 71 loaded++; 64 72 prevPhrase = searchWord; openmrs-modules/registration/web/src/org/openmrs/module/registration/web/controller/RegisterPatientFormController.java
r4904 r4914 29 29 30 30 /** 31 * This controller backs the /web/module/registration Form.jsp page.31 * This controller backs the /web/module/registrationPatientForm.jsp page. 32 32 * This controller is tied to that jsp page in the /metadata/moduleApplicationContext.xml file 33 33 * 34 34 */ 35 public class NewPatientFormController extends SimpleFormController {35 public class RegisterPatientFormController extends SimpleFormController { 36 36 37 37 /** Logger for this class and subclasses */ openmrs-modules/registration/web/src/org/openmrs/module/registration/web/controller/RegistrationSearchServlet.java
r4901 r4914 146 146 protected void doGet(HttpServletRequest request, HttpServletResponse response) 147 147 throws ServletException, IOException { 148 processRequest(request, response); 148 //do Nothing... Can prevent XST 149 //processRequest(request, response); 149 150 } 150 151