Making WordPress.org

Changeset 7414


Ignore:
Timestamp:
07/10/2018 09:33:48 PM (7 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.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/camptix-tweaks/addons
Files:
3 edited

Legend:

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

    r7253 r7414  
    8989
    9090            <td class="tix-right">
    91                 <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 esc_html( _ex( 'Yes (we will contact you)', 'ticket registration option', 'wordcamporg' ) ); ?></label>
     91                <label>
     92                    <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 />
     93                    <?php echo esc_html( $this->options['yes'] ); ?>
     94                </label>
    9295                <br />
    93                 <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 esc_html( _ex( 'No', 'ticket registration option', 'wordcamporg' ) ); ?></label>
     96                <label>
     97                    <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 />
     98                    <?php echo esc_html( $this->options['no'] ); ?>
     99                </label>
    94100            </td>
    95101        </tr>
     
    207213
    208214            <td class="tix-right">
    209                 <label><input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="yes" <?php checked( 'yes', $current_data[ self::SLUG ] ); ?> /> <?php esc_html( _ex( 'Yes (we will contact you)', 'ticket registration option', 'wordcamporg' ) ); ?></label>
     215                <label>
     216                    <input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="yes" <?php checked( 'yes', $current_data[ self::SLUG ] ); ?> required />
     217                    <?php echo esc_html( $this->options['yes'] ); ?>
     218                </label>
    210219                <br />
    211                 <label><input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="no" <?php checked( 'no', $current_data[ self::SLUG ] ); ?> /> <?php esc_html( _ex( 'No', 'ticket registration option', 'wordcamporg' ) ); ?></label>
     220                <label>
     221                    <input name="tix_ticket_info[<?php echo esc_attr( self::SLUG ); ?>]" type="radio" value="no" <?php checked( 'no', $current_data[ self::SLUG ] ); ?> required />
     222                    <?php echo esc_html( $this->options['no'] ); ?>
     223                </label>
    212224            </td>
    213225        </tr>
  • 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>
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/camptix-tweaks/addons/code-of-conduct.php

    r7228 r7414  
    6666
    6767            <td class="tix-right">
    68                 <label><input name="tix_attendee_info[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( self::SLUG ); ?>]" type="checkbox" <?php checked( $current_data[ self::SLUG ] ); ?> /> <?php echo esc_html_x( 'Yes', 'ticket registration option', 'wordcamporg' ); ?></label>
     68                <label>
     69                    <input name="tix_attendee_info[<?php echo esc_attr( $i ); ?>][<?php echo esc_attr( self::SLUG ); ?>]" type="checkbox" <?php checked( $current_data[ self::SLUG ] ); ?> required />
     70                    <?php echo esc_html_x( 'Yes', 'ticket registration option', 'wordcamporg' ); ?>
     71                </label>
    6972            </td>
    7073        </tr>
Note: See TracChangeset for help on using the changeset viewer.