Ignore:
Timestamp:
Dec 9, 2013, 5:34:37 PM (10 years ago)
Author:
mistic100
Message:

update for 2.6

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"}
    33
    44{footer_script require='livevalidation'}
    55{if $contact.mandatory_name and !$contact.is_logged}
    66var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true });
    7 author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a name'|@translate}" });
     7author.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a name'|translate}" });
    88{/if}
    99
    1010{if $contact.mandatory_mail and (!$contact.is_logged or empty($contact.email))}
    1111var 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}" });
     12email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter an e-mail'|translate}" });
     13email.add(Validate.Email, {ldelim} failureMessage: "{'mail address must be like xxx@yyy.eee (example : jack@altern.org)'|translate}" });
    1414{/if}
    1515
    1616{if $GROUPS}
    1717var group = new LiveValidation('group', {ldelim} onlyOnSubmit: true })
    18 group.add(Validate.Exclusion, {ldelim} within: ['-1'], failureMessage: "{'Please choose a category'|@translate}" });
     18group.add(Validate.Exclusion, {ldelim} within: ['-1'], failureMessage: "{'Please choose a category'|translate}" });
    1919{/if}
    2020
    2121var subject = new LiveValidation('subject', {ldelim} onlyOnSubmit: true });
    22 subject.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a subject'|@translate}" });
     22subject.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a subject'|translate}" });
    2323subject.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}"
    2525  });
    2626
    2727var content = new LiveValidation('cf_content', {ldelim} onlyOnSubmit: true });
    28 content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|@translate}" });
     28content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|translate}" });
    2929content.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}",
    3131  });
    3232{/footer_script}
    3333
    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}
    5034
    5135{if $ContactForm_before}
     
    5741    <table>
    5842      <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>
    6044        <td>
    6145        {if $contact.is_logged}
     
    6852      </tr>
    6953      <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>
    7155        <td>
    7256        {if $contact.is_logged and !empty($contact.email)}
     
    8064      {if $GROUPS}
    8165      <tr>
    82         <td class="title"><label for="group">{'Category'|@translate}</label></td>
     66        <td class="title"><label for="group">{'Category'|translate}</label></td>
    8367        <td>
    8468          <select name="group" id="group">
     
    9074      {/if}
    9175      <tr>
    92         <td class="title"><label for="subject">{'Subject'|@translate}</label></td>
     76        <td class="title"><label for="subject">{'Subject'|translate}</label></td>
    9377        <td><input type="text" name="subject" id="subject" style="width:400px;" value="{$contact.subject}"></td>
    9478      </tr>
    9579      <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>
    9781        <td><textarea name="content" id="cf_content" rows="10" style="width:400px;">{$contact.content}</textarea></td>
    9882      </tr>
     
    10084        <td class="title">&nbsp;</td>
    10185        <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>
    10488        </td>
    10589      </tr>
    10690    </table>
    107    
     91
    10892    <input type="hidden" name="key" value="{$KEY}" />
    10993  </form>
     
    11397<div class="contact desc">{$ContactForm_after}</div>
    11498{/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.