Changeset 18814 for extensions/ContactForm
- Timestamp:
- Oct 30, 2012, 12:17:34 AM (11 years ago)
- Location:
- extensions/ContactForm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/include/functions.inc.php
r18331 r18814 12 12 { 13 13 $page['section'] = 'contact'; 14 $page['title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>';14 $page['title'] = $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>'; 15 15 } 16 16 } … … 160 160 $comment_action='reject'; 161 161 } 162 else if (strlen($comm['subject']) < 4)163 {164 array_push($page['errors'], sprintf(l10n('%s must not be less than %d characters long'), l10n('Subject'), 4));165 $comment_action='reject';166 }167 162 else if (strlen($comm['subject']) > 100) 168 163 { … … 183 178 { 184 179 array_push($page['errors'], l10n('Please enter a message')); 185 $comment_action='reject';186 }187 else if (strlen($comm['content']) < 20)188 {189 array_push($page['errors'], sprintf(l10n('%s must not be less than %d characters long'), l10n('Message'), 20));190 180 $comment_action='reject'; 191 181 } … … 260 250 } 261 251 262 $comm['show_ip'] = isset($conf['contact_form_show_ip']) ? $conf['contact_form_show_ip'] : true;252 $comm['show_ip'] = isset($conf['contact_form_show_ip']) ? $conf['contact_form_show_ip'] : false; 263 253 264 254 $template->assign(array( -
extensions/ContactForm/template/contact_form.tpl
r17945 r18814 21 21 var subject = new LiveValidation('subject', {ldelim} onlyOnSubmit: true }); 22 22 subject.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a subject'|@translate}" }); 23 subject.add(Validate.Length, {ldelim} minimum: 4, maximum: 100, 24 tooShortMessage: "{'%s must not be less than %d characters long'|@translate|@sprintf:'':4}", 23 subject.add(Validate.Length, {ldelim} maximum: 100, 25 24 tooLongMessage: "{'%s must not be more than %d characters long'|@translate|@sprintf:'':100}" 26 25 }); … … 28 27 var content = new LiveValidation('cf_content', {ldelim} onlyOnSubmit: true }); 29 28 content.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter a message'|@translate}" }); 30 content.add(Validate.Length, {ldelim} minimum: 20, maximum: 2000, 31 tooShortMessage: "{'%s must not be less than %d characters long'|@translate|@sprintf:'':20}", 29 content.add(Validate.Length, {ldelim} maximum: 2000, 32 30 tooLongMessage: "{'%s must not be more %d characters long'|@translate|@sprintf:'':2000}", 33 31 });
Note: See TracChangeset
for help on using the changeset viewer.