Changeset 25872 for extensions/ContactForm/template/contact_form.tpl
- Timestamp:
- Dec 9, 2013, 5:34:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/template/contact_form.tpl
r19180 r25872 1 {combine_css path=$CONTACT_FORM_PATH| @cat:"template/style.css"}2 {combine_script id="livevalidation" load="footer" path=$CONTACT_FORM_PATH| @cat:"template/livevalidation.min.js"}1 {combine_css path=$CONTACT_FORM_PATH|cat:"template/style.css"} 2 {combine_script id="livevalidation" load="footer" path=$CONTACT_FORM_PATH|cat:"template/livevalidation.min.js"} 3 3 4 4 {footer_script require='livevalidation'} 5 5 {if $contact.mandatory_name and !$contact.is_logged} 6 6 var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true }); 7 author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a name'| @translate}" });7 author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a name'|translate}" }); 8 8 {/if} 9 9 10 10 {if $contact.mandatory_mail and (!$contact.is_logged or empty($contact.email))} 11 11 var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true }); 12 email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter an e-mail'| @translate}" });13 email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'| @translate}" });12 email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter an e-mail'|translate}" }); 13 email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|translate}" }); 14 14 {/if} 15 15 16 16 {if $GROUPS} 17 17 var group = new LiveValidation('group', {ldelim} onlyOnSubmit: true }) 18 group.add(Validate.Exclusion, {ldelim} within: ['-1'], failureMessage: "{'Please choose a category'| @translate}" });18 group.add(Validate.Exclusion, {ldelim} within: ['-1'], failureMessage: "{'Please choose a category'|translate}" }); 19 19 {/if} 20 20 21 21 var subject = new LiveValidation('subject', {ldelim} onlyOnSubmit: true }); 22 subject.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a subject'| @translate}" });22 subject.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a subject'|translate}" }); 23 23 subject.add(Validate.Length, {ldelim} maximum: 100, 24 tooLongMessage: "{'%s must not be more than %d characters long'| @translate|@sprintf:'':100}"24 tooLongMessage: "{'%s must not be more than %d characters long'|translate:'':100}" 25 25 }); 26 26 27 27 var content = new LiveValidation('cf_content', {ldelim} onlyOnSubmit: true }); 28 content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'| @translate}" });28 content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|translate}" }); 29 29 content.add(Validate.Length, {ldelim} maximum: 2000, 30 tooLongMessage: "{'%s must not be more %d characters long'|@translate|@sprintf:'':2000}",30 tooLongMessage: "{'%s must not be more than %d characters long'|translate:'':2000}", 31 31 }); 32 32 {/footer_script} 33 33 34 35 {* <!-- Menubar & titrePage --> *}36 {if $themeconf.name == "stripped" or $themeconf.parent == "stripped"}37 {include file=$CONTACT_FORM_ABS_PATH|@cat:'template/themes/stripped.tpl'}38 {assign var="clear" value="true"}39 {elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"}40 {include file=$CONTACT_FORM_ABS_PATH|@cat:'template/themes/simple.tpl'}41 {assign var="clear" value="true"}42 {else}43 {include file=$CONTACT_FORM_ABS_PATH|@cat:'template/themes/default.tpl'}44 {/if}45 46 47 {if isset($errors) or not empty($infos)}48 {include file='infos_errors.tpl'}49 {/if}50 34 51 35 {if $ContactForm_before} … … 57 41 <table> 58 42 <tr> 59 <td class="title"><label for="author">{'Your name'| @translate}</label></td>43 <td class="title"><label for="author">{'Your name'|translate}</label></td> 60 44 <td> 61 45 {if $contact.is_logged} … … 68 52 </tr> 69 53 <tr> 70 <td class="title"><label for="email">{'Your e-mail'| @translate}</label></td>54 <td class="title"><label for="email">{'Your e-mail'|translate}</label></td> 71 55 <td> 72 56 {if $contact.is_logged and !empty($contact.email)} … … 80 64 {if $GROUPS} 81 65 <tr> 82 <td class="title"><label for="group">{'Category'| @translate}</label></td>66 <td class="title"><label for="group">{'Category'|translate}</label></td> 83 67 <td> 84 68 <select name="group" id="group"> … … 90 74 {/if} 91 75 <tr> 92 <td class="title"><label for="subject">{'Subject'| @translate}</label></td>76 <td class="title"><label for="subject">{'Subject'|translate}</label></td> 93 77 <td><input type="text" name="subject" id="subject" style="width:400px;" value="{$contact.subject}"></td> 94 78 </tr> 95 79 <tr> 96 <td class="title"><label for="cf_content">{'Message'| @translate}</label></td>80 <td class="title"><label for="cf_content">{'Message'|translate}</label></td> 97 81 <td><textarea name="content" id="cf_content" rows="10" style="width:400px;">{$contact.content}</textarea></td> 98 82 </tr> … … 100 84 <td class="title"> </td> 101 85 <td> 102 <input class="submit" type="submit" name="send_mail" value="{'Send'| @translate}">103 <label><input type="checkbox" name="send_copy"> {'Send copy to my email'| @translate}</label>86 <input class="submit" type="submit" name="send_mail" value="{'Send'|translate}"> 87 <label><input type="checkbox" name="send_copy"> {'Send copy to my email'|translate}</label> 104 88 </td> 105 89 </tr> 106 90 </table> 107 91 108 92 <input type="hidden" name="key" value="{$KEY}" /> 109 93 </form> … … 113 97 <div class="contact desc">{$ContactForm_after}</div> 114 98 {/if} 115 116 {if $clear}<div style="clear: both;"></div>117 </div>{/if}118 </div>{* <!-- content --> *}
Note: See TracChangeset
for help on using the changeset viewer.