svn commit: r772610 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r772610 - /ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl

ashish-18
Author: ashish
Date: Thu May  7 11:18:30 2009
New Revision: 772610

URL: http://svn.apache.org/viewvc?rev=772610&view=rev
Log:
"Update" button was not working https://localhost:8443/projectmgr/control/EditWorkEffortSurveyAppls?workEffortId=9103.

Thanks to Vikas Mayur for reporting this bug.

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl?rev=772610&r1=772609&r2=772610&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/survey/ListSurveys.ftl Thu May  7 11:18:30 2009
@@ -24,7 +24,6 @@
   </div>
   <div class="screenlet-body">
     <#if workEffortSurveyAppls?has_content>
-      <form method="post" action="<@ofbizUrl>updateWorkEffortSurveyAppl</@ofbizUrl>" name="editWorkEffortSurveyAppl">
       <table class="basic-table hover-bar" cellspacing="0">
         <tr class="header-row">
           <td>${uiLabelMap.ContentSurveySurveyId}</td>
@@ -34,34 +33,37 @@
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
+        <#assign line = 0>
         <#list workEffortSurveyAppls as workEffortSurveyAppl>
+        <#assign line = line + 1>
           <#if workEffortSurveyAppl?has_content>
             <#assign productStoreSurveyAppls = workEffortSurveyAppl.getRelated("ProductStoreSurveyAppl")>
             <#list productStoreSurveyAppls as productStoreSurveyAppl>
               <#if productStoreSurveyAppl?has_content>
                 <#assign survey = productStoreSurveyAppl.getRelatedOne("Survey")>
+                <form method="post" action="<@ofbizUrl>updateWorkEffortSurveyAppl</@ofbizUrl>" name="editWorkEffortSurveyAppl${line}">
                 <tr>
                   <td><a href="/content/control/EditSurvey?surveyId=${workEffortSurveyAppl.surveyId?if_exists}" class="buttontext">${workEffortSurveyAppl.surveyId?if_exists} - ${survey.surveyName?if_exists}</a></td>
                   <td>${workEffortSurveyAppl.fromDate?if_exists}</td>
                   <td>
                     <input type="text" size="20" name="thruDate" value="${(workEffortSurveyAppl.thruDate)?if_exists}" <#if isReadable?exists> readonly="readonly"</#if>>
-                    <a href="javascript:call_cal(document.editWorkEffortSurveyAppl.thruDate, '${nowTimeStampString}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a>
+                    <a href="javascript:call_cal(document.editWorkEffortSurveyAppl${line}.thruDate, '${nowTimeStampString}');"><img src="<@ofbizContentUrl>/images/cal.gif</@ofbizContentUrl>" width="16" height="16" border="0" alt="Calendar"></a>
                     </td>
                   <td><a href="<@ofbizUrl>testWorkEffortSurvey?productStoreSurveyId=${productStoreSurveyAppl.productStoreSurveyId?if_exists}&workEffortId=${workEffortSurveyAppl.workEffortId?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.EcommerceTakeSurvey}</a></td>
                   <#if !isReadable?exists>
                     <input type="hidden" name="surveyId" value="${workEffortSurveyAppl.surveyId?if_exists}"/>
                     <input type="hidden" name="workEffortId" value="${workEffortSurveyAppl.workEffortId?if_exists}"/>
                     <input type="hidden" name="fromDate" value="${workEffortSurveyAppl.fromDate?if_exists}"/>
-                    <td><input type="submit" name="submitBtn" value='${uiLabelMap.CommonUpdate}'> </td>
+                    <td><input type="submit" name="submitBtn" value='${uiLabelMap.CommonUpdate}'> </td>
                     <td><a href="<@ofbizUrl>deleteWorkEffortSurveyAppl?surveyId=&workEffortId=${workEffortSurveyAppl.workEffortId?if_exists}&fromDate=${workEffortSurveyAppl.fromDate?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a></td>
                   </#if>
                 </tr>
+                </form>                
               </#if>
             </#list>
           </#if>
         </#list>
       </table>
-      </form>
     </#if>
   </div>
 </div>