Changeset 25214 for extensions
- Timestamp:
- Oct 29, 2013, 5:22:41 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GuestBook/template/guestbook.tpl
r20181 r25214 2 2 {combine_script id="livevalidation" load="footer" path=$GUESTBOOK_PATH|@cat:"template/livevalidation.min.js"} 3 3 4 {footer_script require=' livevalidation'}4 {footer_script require='jquery,livevalidation'} 5 5 {if !$comment_add.IS_LOGGED} 6 6 var author = new LiveValidation('author', {ldelim} onlyOnSubmit: true }); … … 15 15 16 16 var website = new LiveValidation('website', {ldelim} onlyOnSubmit: true }); 17 website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/ (-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/i,17 website.add(Validate.Format, {ldelim} pattern: /^https?:\/\/[^\s\/$.?#].[^\s]*$/i, 18 18 failureMessage: "{'invalid website address'|@translate}"}); 19 19 … … 28 28 jQuery("#addComment").slideDown("slow"); 29 29 }); 30 }); 31 32 jQuery("#website").on('blur', function() { 33 var val = $(this).val(); 34 if (val.substr(0, 4) != 'http') { 35 $(this).val('http://'+ val); 36 } 30 37 }); 31 38 {/footer_script}
Note: See TracChangeset
for help on using the changeset viewer.