pvollenweider    2005/06/30 16:11:21 CEST

  Modified files:        (Branch: JAHIA-4-1-BRANCH)
    src/view/jsp/include simple_form_generator_definitions.inc 
                         simple_form_generator_display_form.inc 
                         simple_form_generator_process_post.inc 
  Log:
  Add resources for simple form generator
  
  Revision  Changes    Path
  1.1.2.3   +4 -4      
corporate_portal_templates/src/view/jsp/include/simple_form_generator_definitions.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/simple_form_generator_definitions.inc.diff?r1=1.1.2.2&r2=1.1.2.3&f=h
  1.1.2.3   +15 -7     
corporate_portal_templates/src/view/jsp/include/simple_form_generator_display_form.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/simple_form_generator_display_form.inc.diff?r1=1.1.2.2&r2=1.1.2.3&f=h
  1.1.2.3   +9 -2      
corporate_portal_templates/src/view/jsp/include/simple_form_generator_process_post.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/simple_form_generator_process_post.inc.diff?r1=1.1.2.2&r2=1.1.2.3&f=h
  
  
  
  Index: simple_form_generator_definitions.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/simple_form_generator_definitions.inc,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- simple_form_generator_definitions.inc     24 Jun 2005 14:45:58 -0000      
1.1.2.2
  +++ simple_form_generator_definitions.inc     30 Jun 2005 14:11:21 -0000      
1.1.2.3
  @@ -10,9 +10,9 @@
           bundleKey="<%=resBundleID%>"/>
       <content:declareField name="subject" title="Subject" 
type="SharedSmallText"
           titleKey="form.Subject" bundleKey="<%=resBundleID%>"/>
  -    <content:declareField name="pageRedirected"
  -        title="Page redirected to after submission" type="Page"
  -        titleKey="form.pageRedirected" bundleKey="<%=resBundleID%>"/>
  +    <content:declareField name="displayTextAfterPost"
  +        title="Text to display after a post" type="BigText"
  +        titleKey="form.displayTextAfterPost" bundleKey="<%=resBundleID%>"/>
   
       <content:declareContainerList name="fields" title="List of fields">
       <content:declareContainer>
  @@ -28,7 +28,7 @@
               titleKey="form.type" bundleKey="<%=resBundleID%>"
               value="<%=getMultivalues(resBundleID,formTypes)%>"/>
           <content:declareField name="defaultValue" title="Default value(s) 
separated by semi-column ':'" type="SmallText"
  -            titleKey="form.isMandatory" bundleKey="<%=resBundleID%>"/>
  +            titleKey="form.defaultValue" bundleKey="<%=resBundleID%>"/>
   
       </content:declareContainer>
       </content:declareContainerList>
  
  
  
  Index: simple_form_generator_display_form.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/simple_form_generator_display_form.inc,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- simple_form_generator_display_form.inc    24 Jun 2005 14:45:58 -0000      
1.1.2.2
  +++ simple_form_generator_display_form.inc    30 Jun 2005 14:11:21 -0000      
1.1.2.3
  @@ -11,7 +11,8 @@
                %>
                <a 
href="javascript:<%=jData.gui().html().drawAddContainerLauncher( forms )%>">
                <img src='<%=theURL%>/images/add.gif' alt='Add form' width='11' 
height='11' border='0'/>
  -             Add sender, recipient, ...</a>
  +             <content:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  +                resourceName="form.addSender"/></a>
                <%
            }
       }
  @@ -29,16 +30,22 @@
               jData.gui().html().drawBeginActionMenu(formBean ,
                   null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
               %>
  -            <strong <%if ("".equals(sender)) { 
%>style="color:red;"<%}%>>Sender: </strong><%=sender%><br/>
  -            <strong <%if ("".equals(recipients)) { 
%>style="color:red;"<%}%>>Recipients: </strong><%=recipients%><br/>
  +            <strong <%if ("".equals(sender)) { 
%>style="color:red;"<%}%>><content:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  +                resourceName="form.sender"/>:
  +                </strong><%=sender%><br/>
  +            <strong <%if ("".equals(recipients)) { 
%>style="color:red;"<%}%>><content:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  +                resourceName="form.recipients"/>:
  +                </strong><%=recipients%><br/>
               <%
               if (! "".equals( recipientsCC )){
                   %>
  -                <strong>Recipients CC: </strong><%=recipientsCC%><br/>
  +                <strong><content:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  +                resourceName="form.recipientsCC"/>: 
</strong><%=recipientsCC%><br/>
                   <%
               }
               jData.gui().html().drawEndActionMenu(formBean ,
  -                null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  +                null, null, true, "", 
"jahiatemplates.Corporate_portal_templates",
  +                null, out);
           }
   
           if (isFormOK) {
  @@ -54,7 +61,8 @@
                   <input type="hidden" name="formId" 
value="<%=form.getID()%>"/>
                   <%
                   if (! emptyMandatoryFields.isEmpty()) {
  -                    %><strong><span style="color:red;">Error: Fields with 
(*) are mandatory</span></strong><br/><br/><%
  +                    %><strong><span 
style="color:red;"><content:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  +                
resourceName="form.fieldIsMandatory"/></span></strong><br/><br/><%
                   }
                   %>
                   <table>
  @@ -115,7 +123,7 @@
                                   }
                                   %>
                                   <textarea 
name="field_<%=currentField.getID()%>"
  -                                    cols="40" 
rows="6"><%=defaultValue%></textarea>
  +                                    cols="40" 
rows="20"><%=defaultValue%></textarea>
                                   <%
                               } else if 
(ResourceBundleMarker.drawMarker(resBundleID,"radioButtons","").equals(type)) {
                                   if (! "".equals(defaultValue)) {
  
  
  
  Index: simple_form_generator_process_post.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/simple_form_generator_process_post.inc,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- simple_form_generator_process_post.inc    24 Jun 2005 14:45:58 -0000      
1.1.2.2
  +++ simple_form_generator_process_post.inc    30 Jun 2005 14:11:21 -0000      
1.1.2.3
  @@ -57,8 +57,15 @@
                   recipientsCC = JahiaTools.html2text(recipientsCC);
                   subject = JahiaTools.html2text(subject);
                   String body = JahiaTools.html2text(mailBody.toString());
  -                ServicesRegistry.getInstance ().getMailService 
().sendMessage (sender, recipients,
  -                    recipientsCC, null, subject, body);
  +                org.jahia.services.mail.MailService mailService =
  +                    ServicesRegistry.getInstance().getMailService();
  +                try {
  +                    mailService.sendMessage (sender, recipients,
  +                        recipientsCC, null, subject, body);
  +                } catch (Throwable th) {
  +                    %>Error while sending mail : <%=th.getMessage()%><%
  +
  +                }
                   logger.debug("Mail sent");
   
               }
  

Reply via email to