Make WordPress Core

Ticket #37331: 37331-1.diff

File 37331-1.diff, 3.7 KB (added by jackreichert, 9 years ago)

Building upon @dipesh.kakadiya's patch added note: "Required fields are marked"

  • src/wp-admin/network/site-new.php

    diff --git src/wp-admin/network/site-new.php src/wp-admin/network/site-new.php
    index 0be051e..bec42db 100644
    if ( ! empty( $messages ) ) { 
    191191        foreach ( $messages as $msg )
    192192                echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
    193193} ?>
    194 <form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
     194<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>">
    195195<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
     196        <?php echo sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' ); ?>
    196197        <table class="form-table">
    197198                <tr class="form-field form-required">
    198                         <th scope="row"><label for="site-address"><?php _e( 'Site Address (URL)' ) ?></label></th>
     199                        <th scope="row"><label for="site-address"><?php _e( 'Site Address (URL)' ) ?> <span class="required"><?php  _e( '*' ) ?></span></label></th>
    199200                        <td>
    200201                        <?php if ( is_subdomain_install() ) { ?>
    201                                 <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
     202                                <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" aria-required="true" required="required" /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
    202203                        <?php } else {
    203                                 echo get_network()->domain . get_network()->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc"  autocapitalize="none" autocorrect="off" />
     204                                echo get_network()->domain . get_network()->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc"  autocapitalize="none" autocorrect="off" aria-required="true" required="required"/>
    204205                        <?php }
    205206                        echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
    206207                        ?>
    if ( ! empty( $messages ) ) { 
    208209                </tr>
    209210                <tr class="form-field form-required">
    210211                        <th scope="row"><label for="site-title"><?php _e( 'Site Title' ) ?></label></th>
    211                         <td><input name="blog[title]" type="text" class="regular-text" id="site-title" /></td>
     212                        <td><input name="blog[title]" type="text" class="regular-text" id="site-title"/></td>
    212213                </tr>
    213214                <?php
    214215                $languages    = get_available_languages();
    if ( ! empty( $messages ) ) { 
    240241                        </tr>
    241242                <?php endif; // Languages. ?>
    242243                <tr class="form-field form-required">
    243                         <th scope="row"><label for="admin-email"><?php _e( 'Admin Email' ) ?></label></th>
    244                         <td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" /></td>
     244                        <th scope="row"><label for="admin-email"><?php _e( 'Admin Email' ) ?> <span class="required"><?php  _e( '*' ) ?></span></label></th>
     245                        <td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" aria-required="true" required="required" /></td>
    245246                </tr>
    246247                <tr class="form-field">
    247248                        <td colspan="2"><?php _e( 'A new user will be created if the above email address is not in the database.' ) ?><br /><?php _e( 'The username and password will be mailed to this email address.' ) ?></td>