Making WordPress.org


Ignore:
Timestamp:
07/10/2018 09:33:48 PM (8 years ago)
Author:
coreymckrill
Message:

WordCamp Tickets: Add required attribute to allergy, accessibility, CoC fields

Having the required attribute on the input fields helps ensure that the
Stripe checkout overlay won't appear if required fields haven't been filled
out yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/camptix-tweaks/addons/allergy.php

    r7253 r7414  
    8787
    8888                        <td class="tix-right">
    89                                 <label><input name="tix_attendee_info[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="yes" <?php checked( 'yes', $current_data[ self::SLUG ] ); ?> /> <?php echo esc_html( $this->options['yes'] ); ?></label>
     89                                <label>
     90                                        <input name="tix_attendee_info[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="yes" <?php checked( 'yes', $current_data[ self::SLUG ] ); ?> required />
     91                                        <?php echo esc_html( $this->options['yes'] ); ?>
     92                                </label>
    9093                                <br />
    91                                 <label><input name="tix_attendee_info[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="no" <?php checked( 'no', $current_data[ self::SLUG ] ); ?> /> <?php echo esc_html( $this->options['no'] ); ?></label>
     94                                <label>
     95                                        <input name="tix_attendee_info[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="no" <?php checked( 'no', $current_data[ self::SLUG ] ); ?> required />
     96                                        <?php echo esc_html( $this->options['no'] ); ?>
     97                                </label>
    9298                        </td>
    9399                </tr>
    … …  
    205211
    206212                        <td class="tix-right">
    207                                 <label><input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="yes" <?php checked( 'yes', $current_data[ self::SLUG ] ); ?> /> <?php echo esc_html( $this->options['yes'] ); ?></label>
     213                                <label>
     214                                        <input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="yes" <?php checked( 'yes', $current_data[ self::SLUG ] ); ?> required />
     215                                        <?php echo esc_html( $this->options['yes'] ); ?>
     216                                </label>
    208217                                <br />
    209                                 <label><input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="no" <?php checked( 'no', $current_data[ self::SLUG ] ); ?> /> <?php echo esc_html( $this->options['no'] ); ?></label>
     218                                <label>
     219                                        <input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="no" <?php checked( 'no', $current_data[ self::SLUG ] ); ?> required />
     220                                        <?php echo esc_html( $this->options['no'] ); ?>
     221                                </label>
    210222                        </td>
    211223                </tr>
Note: See TracChangeset for help on using the changeset viewer.