Plugin Directory

Changeset 3142841


Ignore:
Timestamp:
08/28/2024 10:50:07 AM (19 months ago)
Author:
seshelby
Message:

Releasing version 1.0.9

Location:
simple-accessible-forms/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • simple-accessible-forms/trunk/readme.txt

    r3124227 r3142841  
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    10 Stable tag: 1.0.8
     10Stable tag: 1.0.9
    1111
    1212== Description ==
     
    5555
    5656== Changelog ==
     57= 1.0.9 =
     581. corrected form field names that include a period failing to display error notice
     591. corrected forms list not updating after a new form is added
     60
    5761= 1.0.8 =
    58621. corrected csrf vulnerability
  • simple-accessible-forms/trunk/scripts/jquery_form_validation.js

    r3011004 r3142841  
    422422    if(errorfound === 1){
    423423   
    424       if(jQuery('.'+inputname+'Error').length == 0) {
     424      if(jQuery('.'+inputname.replace(".","_")+'Error').length == 0) {
    425425        jquery_form_validation_place_error_notice(formfield, inputname);
    426426      }
    427427     
    428428      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');
    432432      }
    433433      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');
    436436      }
    437437      jQuery(formfield).attr('aria-invalid','true');
     
    439439      }
    440440      else {
    441         jQuery('.'+inputname+'Error').html('');
     441        jQuery('.'+inputname.replace(".","_")+'Error').html('');
    442442        jQuery(formfield).attr('aria-invalid','false');
    443443      }
     
    513513
    514514
    515   if(jQuery('.'+inputname+'Error').length == 0) {
     515  if(jQuery('.'+inputname.replace(".","_")+'Error').length == 0) {
    516516    jquery_form_validation_place_error_notice(filefield, inputname);
    517517  }
     
    523523 
    524524  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');
    528528  }
    529529  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');
    532532  }
    533533  if(error1==='File attached')
     
    701701    if(errorfound === 1){
    702702   
    703     if(jQuery('.'+inputname+'Error').length == 0) {
     703    if(jQuery('.'+inputname.replace(".","_")+'Error').length == 0) {
    704704      jquery_form_validation_place_error_notice(formfield, inputname);
    705705    }
    706706   
    707707    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');
    711711    }
    712712    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');
    715715    }
    716716    jQuery(formfield).attr('aria-invalid','true');
     
    718718    }
    719719    else {
    720       jQuery('.'+inputname+'Error').html('');
     720      jQuery('.'+inputname.replace(".","_")+'Error').html('');
    721721      jQuery(formfield).attr('aria-invalid','false');
    722722    }
     
    827827     **************************************************************/
    828828    function jquery_form_validation_place_error_notice(formfield, inputname){
     829      inputname= inputname.replace(".","_");
    829830      if(jQuery(formfield).closest('fieldset').html() !== undefined && (jQuery(formfield).attr('type') === 'radio' || jQuery(formfield).attr('type') === 'checkbox') ) { 
    830831        jQuery(formfield).closest('fieldset').append('<br><span class="'+inputname+'Error formerror"  aria-live="polite"></span>');
  • simple-accessible-forms/trunk/scripts/scripts.js

    r2837643 r3142841  
    404404        error: function(){ return true; },
    405405        success: function(data){
     406     
    406407            if(data.indexOf('null') === -1) jQuery('#simple_accessible_forms_page_wrapper').html(data);
    407408            jQuery('.simple_accessible_forms_savemessage').html(simpleaccessibleformsVariables[action]);
  • simple-accessible-forms/trunk/simple-accessible-forms.php

    r3064576 r3142841  
    44 * Plugin URI: https://wordpress.org/plugins/simple-accessible-forms/
    55 * 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.8
     6 * Version: 1.0.9
    77 * Author: AlumniOnline Web Services LLC
    88 * Author URI: https://www.alumnionlineservices.com/php-scripts/simple-accessible-forms/
     
    9494function simple_accessible_forms_formbuilder_page() {
    9595
    96     if ( ! isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ) ) ) {
     96    if ( ! isset( $_REQUEST['_wpnonce'] ) || wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ) ) ) {
    9797        echo '<div id="simple_accessible_forms_page_wrapper">';
    9898    }
     
    180180    ?>
    181181</form>
    182     <?php
     182<?php
    183183    if ( ! isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ) ) ) {
    184184        echo '</div>';
     
    909909            if ( '' !== $row['formid'] && '' !== $row['formurl'] ) {
    910910                $path = parse_url( $row['formurl'], PHP_URL_PATH );
     911   
    911912                if ( strstr( $serveruri, $path ) ) {
    912913                    echo " ['" . esc_attr( $row['formid'] ) . "', '" . esc_attr( $row['formnicename'] ) . "',";
Note: See TracChangeset for help on using the changeset viewer.