Changeset 3142841
- Timestamp:
- 08/28/2024 10:50:07 AM (19 months ago)
- Location:
- simple-accessible-forms/trunk
- Files:
-
- 4 edited
-
readme.txt (modified) (2 diffs)
-
scripts/jquery_form_validation.js (modified) (7 diffs)
-
scripts/scripts.js (modified) (1 diff)
-
simple-accessible-forms.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-accessible-forms/trunk/readme.txt
r3124227 r3142841 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 Stable tag: 1.0. 810 Stable tag: 1.0.9 11 11 12 12 == Description == … … 55 55 56 56 == Changelog == 57 = 1.0.9 = 58 1. corrected form field names that include a period failing to display error notice 59 1. corrected forms list not updating after a new form is added 60 57 61 = 1.0.8 = 58 62 1. corrected csrf vulnerability -
simple-accessible-forms/trunk/scripts/jquery_form_validation.js
r3011004 r3142841 422 422 if(errorfound === 1){ 423 423 424 if(jQuery('.'+inputname +'Error').length == 0) {424 if(jQuery('.'+inputname.replace(".","_")+'Error').length == 0) { 425 425 jquery_form_validation_place_error_notice(formfield, inputname); 426 426 } 427 427 428 428 setTimeout(() => { 429 if(! jQuery('.'+inputname +'Error').hasClass('setnext')){430 jQuery('.'+inputname +'Error').html(error1);431 jQuery('.'+inputname +'Error').addClass('setnext');429 if(! jQuery('.'+inputname.replace(".","_")+'Error').hasClass('setnext')){ 430 jQuery('.'+inputname.replace(".","_")+'Error').html(error1); 431 jQuery('.'+inputname.replace(".","_")+'Error').addClass('setnext'); 432 432 } 433 433 else{ 434 jQuery('.'+inputname +'Error').html(error2);435 jQuery('.'+inputname +'Error').removeClass('setnext');434 jQuery('.'+inputname.replace(".","_")+'Error').html(error2); 435 jQuery('.'+inputname.replace(".","_")+'Error').removeClass('setnext'); 436 436 } 437 437 jQuery(formfield).attr('aria-invalid','true'); … … 439 439 } 440 440 else { 441 jQuery('.'+inputname +'Error').html('');441 jQuery('.'+inputname.replace(".","_")+'Error').html(''); 442 442 jQuery(formfield).attr('aria-invalid','false'); 443 443 } … … 513 513 514 514 515 if(jQuery('.'+inputname +'Error').length == 0) {515 if(jQuery('.'+inputname.replace(".","_")+'Error').length == 0) { 516 516 jquery_form_validation_place_error_notice(filefield, inputname); 517 517 } … … 523 523 524 524 setTimeout(() => { 525 if(! jQuery('.'+inputname +'Error').hasClass('setnext')){526 jQuery('.'+inputname +'Error').html(error1);527 jQuery('.'+inputname +'Error').addClass('setnext');525 if(! jQuery('.'+inputname.replace(".","_")+'Error').hasClass('setnext')){ 526 jQuery('.'+inputname.replace(".","_")+'Error').html(error1); 527 jQuery('.'+inputname.replace(".","_")+'Error').addClass('setnext'); 528 528 } 529 529 else{ 530 jQuery('.'+inputname +'Error').html(error2);531 jQuery('.'+inputname +'Error').removeClass('setnext');530 jQuery('.'+inputname.replace(".","_")+'Error').html(error2); 531 jQuery('.'+inputname.replace(".","_")+'Error').removeClass('setnext'); 532 532 } 533 533 if(error1==='File attached') … … 701 701 if(errorfound === 1){ 702 702 703 if(jQuery('.'+inputname +'Error').length == 0) {703 if(jQuery('.'+inputname.replace(".","_")+'Error').length == 0) { 704 704 jquery_form_validation_place_error_notice(formfield, inputname); 705 705 } 706 706 707 707 setTimeout(() => { 708 if(! jQuery('.'+inputname +'Error').hasClass('setnext')){709 jQuery('.'+inputname +'Error').html(error1);710 jQuery('.'+inputname +'Error').addClass('setnext');708 if(! jQuery('.'+inputname.replace(".","_")+'Error').hasClass('setnext')){ 709 jQuery('.'+inputname.replace(".","_")+'Error').html(error1); 710 jQuery('.'+inputname.replace(".","_")+'Error').addClass('setnext'); 711 711 } 712 712 else{ 713 jQuery('.'+inputname +'Error').html(error2);714 jQuery('.'+inputname +'Error').removeClass('setnext');713 jQuery('.'+inputname.replace(".","_")+'Error').html(error2); 714 jQuery('.'+inputname.replace(".","_")+'Error').removeClass('setnext'); 715 715 } 716 716 jQuery(formfield).attr('aria-invalid','true'); … … 718 718 } 719 719 else { 720 jQuery('.'+inputname +'Error').html('');720 jQuery('.'+inputname.replace(".","_")+'Error').html(''); 721 721 jQuery(formfield).attr('aria-invalid','false'); 722 722 } … … 827 827 **************************************************************/ 828 828 function jquery_form_validation_place_error_notice(formfield, inputname){ 829 inputname= inputname.replace(".","_"); 829 830 if(jQuery(formfield).closest('fieldset').html() !== undefined && (jQuery(formfield).attr('type') === 'radio' || jQuery(formfield).attr('type') === 'checkbox') ) { 830 831 jQuery(formfield).closest('fieldset').append('<br><span class="'+inputname+'Error formerror" aria-live="polite"></span>'); -
simple-accessible-forms/trunk/scripts/scripts.js
r2837643 r3142841 404 404 error: function(){ return true; }, 405 405 success: function(data){ 406 406 407 if(data.indexOf('null') === -1) jQuery('#simple_accessible_forms_page_wrapper').html(data); 407 408 jQuery('.simple_accessible_forms_savemessage').html(simpleaccessibleformsVariables[action]); -
simple-accessible-forms/trunk/simple-accessible-forms.php
r3064576 r3142841 4 4 * Plugin URI: https://wordpress.org/plugins/simple-accessible-forms/ 5 5 * Description: Easily make any html form accessible using the Simple Accessible Forms Plugin. The Simple Accessible Forms Plugin allows you to define form field validation information which will be used to add the necessary features to make the form accessible. It will add form field labels, required field markings, add form field validation and display screen reader friendly error message when a user navigates away from a field, moves focus to the first field in error in the event of a form submission failure. 6 * Version: 1.0. 86 * Version: 1.0.9 7 7 * Author: AlumniOnline Web Services LLC 8 8 * Author URI: https://www.alumnionlineservices.com/php-scripts/simple-accessible-forms/ … … 94 94 function simple_accessible_forms_formbuilder_page() { 95 95 96 if ( ! isset( $_REQUEST['_wpnonce'] ) &&wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ) ) ) {96 if ( ! isset( $_REQUEST['_wpnonce'] ) || wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ) ) ) { 97 97 echo '<div id="simple_accessible_forms_page_wrapper">'; 98 98 } … … 180 180 ?> 181 181 </form> 182 <?php182 <?php 183 183 if ( ! isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ) ) ) { 184 184 echo '</div>'; … … 909 909 if ( '' !== $row['formid'] && '' !== $row['formurl'] ) { 910 910 $path = parse_url( $row['formurl'], PHP_URL_PATH ); 911 911 912 if ( strstr( $serveruri, $path ) ) { 912 913 echo " ['" . esc_attr( $row['formid'] ) . "', '" . esc_attr( $row['formnicename'] ) . "',";
Note: See TracChangeset
for help on using the changeset viewer.