Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 5299

Show
Ignore:
Timestamp:
08/18/08 00:55:06 (3 months ago)
Author:
r0bby
Message:

groovyforms: fix a the modappcontext so that the formentry page loads.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/groovyforms/metadata/moduleApplicationContext.xml

    r5224 r5299  
    2525        </property> 
    2626        <property name="formView"> 
    27             <value>/module/@MODULE_ID@/formEntry.form</value> 
     27            <value>/module/@MODULE_ID@/formEntry</value> 
    2828        </property> 
    2929        <property name="successView"> 
  • openmrs-modules/groovyforms/web/module/formEntry.jsp

    r5237 r5299  
    1414--%> 
    1515 
     16<%@ include file="/WEB-INF/template/include.jsp" %> 
     17<%@ include file="/WEB-INF/template/header.jsp" %> 
     18 
    1619<openmrs:require privilege="View Groovy Forms" otherwise="/login.htm" 
    1720                 redirect="/module/groovyforms/manageGroovyForms.form"/> 
    18  
    19 <%@ include file="/WEB-INF/template/header.jsp" %> 
    20  
    21 <openmrs:htmlInclude file="/dwr/interface/DWRGroovyFormsService.js"/> 
    22 <openmrs:htmlInclude file="/dwr/engine.js"/> 
    23 <openmrs:htmlInclude file="/dwr/util.js"/> 
    2421 
    2522<script type="text/javascript" 
    2623        src="${pageContext.request.contextPath}/moduleResources/groovyforms/jquery-1.2.6.js"></script> 
    2724 
    28 <script type="text/javascript">     
    29     function renderForm(id) { 
    30             var str = "<%@ include file=\"/WEB-INF/view/module/groovyforms/forms/"+id+"/form.jsp\" %>"; 
    31             $("#form").html(str); 
    32     } 
    33 </script> 
     25<%-- we only display 'published' forms here --%> 
    3426 
    35 <%-- we only display 'published' forms here --%
    36 <table cellpadding="2" cellspacing="0" id="groovyFormTable" border="1" border-style="solid"> 
    37     <tr> 
    38         <th><spring:message code="groovyforms.ui.heading.name"/></th> 
    39         <th><spring:message code="groovyforms.ui.heading.desc"/></th> 
    40         <th><spring:message code="groovyforms.ui.heading.version"/</th> 
     27<center
     28    <table cellpadding="2" cellspacing="0" id="groovyFormTable" border="1" border-style="solid"> 
     29        <tr> 
     30            <th><spring:message code="groovyforms.ui.heading.name"/></th> 
     31            <th><spring:message code="groovyforms.ui.heading.desc"/></th> 
     32            <th><spring:message code="groovyforms.ui.heading.version"/></th> 
    4133 
    42     </tr> 
    43     <c:forEach var="form" items="${groovyForms}" varStatus="status"> 
    44         <c:if test="${form.published }"> 
    45             <td>${form.name}</td> 
    46             <td>${form.description}</td> 
    47             <td>${form.version}</td> 
    48             <td><input type="submit" onClick="renderForm('${form.id}');" id="render" value="<spring:message code=" groovyforms.render-form"/>"/></td> 
    49         </c:if> 
    50     </c:forEach> 
    51 </table> 
     34        </tr> 
     35        <c:forEach var="form" items="${groovyForms}" varStatus="status"> 
     36            <c:if test="${form.published }"> 
     37                <td>${form.name}</td> 
     38                <td>${form.description}</td> 
     39                <td>${form.version}</td> 
     40                <td><input type="submit" id="render" value="<spring:message code="groovyforms.render-form"/>"/></td> 
     41            </c:if> 
     42        </c:forEach> 
     43    </table> 
     44</center> 
    5245 
    53 <br /><br> 
    54 <div id="form"> 
    55   <%-- the form will render in this div --%> 
    56 </div> 
     46<br/><br/> 
     47 
    5748<%@ include file="/WEB-INF/template/footer.jsp" %>