Update of /var/cvs/contributions/natmm/templates/natmm/includes/form
In directory james.mmbase.org:/tmp/cvs-serv27488/templates/natmm/includes/form

Modified Files:
        result.jsp 
Log Message:
NMCMS-233 - Customize the back-button on the forms. This button is given after 
the form is filled in.


See also: 
http://cvs.mmbase.org/viewcvs/contributions/natmm/templates/natmm/includes/form
See also: http://www.mmbase.org/jira/browse/NMCMS-233


Index: result.jsp
===================================================================
RCS file: 
/var/cvs/contributions/natmm/templates/natmm/includes/form/result.jsp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- result.jsp  2 May 2008 12:05:17 -0000       1.17
+++ result.jsp  5 May 2008 11:49:41 -0000       1.18
@@ -18,6 +18,7 @@
 <%
    String okSendTo = "Uw bericht is verstuurd naar";
    String okLink = "Naar de homepage";
+   String formMessageHrefCustom = "";
    String okTitleDefault = "Bedankt voor uw bericht.";
    String okMessageDefault = "We zullen u zo spoedig mogelijk een reactie 
sturen.";
    String responseTextDefault = "E-mail verstuurd vanaf " + 
NatMMConfig.getLiveUrl() + " / pagina: ";
@@ -79,6 +80,10 @@
                extraLineBreak = true;
             }
             
+            if(!thisForm.getStringValue("titel_eng").equals("")) {
+               formMessageHrefCustom = thisForm.getStringValue("titel_eng");
+            }
+            
             String responseText = "<b>" + responseTextDefault + pages_title + 
"</b><br>"
                   + "<br><br>" + 
thisForm.getStringValue("titel").toUpperCase()+ "<br>"
                   + 
"--------------------------------------------------------------------------<br>";
@@ -206,6 +211,12 @@
    if(sRubriekLayout.equals("" + NatMMConfig.DEMO_LAYOUT)) {
       formMessageHref = "portal.jsp";
    }
+   
+   //Override the href is a custom href is set in the title_eng variable
+   if (!formMessageHrefCustom.equals("")) {
+      formMessageHref = formMessageHrefCustom;
+   }
+   
    String formMessageLinktext = okLink;
 
    for(int i = 0; i< 1; i++) {
@@ -260,6 +271,11 @@
    String formMessageHref = "javascript:history.go(-1)";
    String formMessageLinktext = warningLink;
 
+   //Override the href is a custom href is set in the title_eng variable
+   if (!formMessageHrefCustom.equals("")) {
+      formMessageHref = formMessageHrefCustom;
+   }
+   
    %><[EMAIL PROTECTED] file="message.jsp" %><%
 }
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to