Making WordPress.org


Ignore:
Timestamp:
05/09/2020 04:05:35 PM (6 years ago)
Author:
ocean90
Message:

Rosetta: Add dropdown with available locales for locale associations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/admin/network/class-locale-associations-view.php

    r8430 r9838  
    119119            <p>
    120120                <label for="locale"><?php _e( 'Locale:', 'rosetta' ); ?></label>
    121                 <input type="text" id="locale" name="locale" class="code" />
     121                <select id="locale" name="locale" required>
     122                    <option value=""><?php _e( '&mdash; Select &mdash;', 'rosetta' ); ?></option>
     123                    <?php
     124                    foreach ( $this->page->get_available_wp_locales() as $locale ) {
     125                        printf(
     126                            '<option value="%s">%s</option>',
     127                            esc_attr( $locale ),
     128                            esc_html( $locale )
     129                        );
     130                    }
     131                    ?>
     132                </select>
    122133
    123134                <label for="subdomain"><?php _e( 'Subdomain:', 'rosetta' ); ?></label>
    124                 <input type="text" id="subdomain" name="subdomain" class="code" />
     135                <input type="text" id="subdomain" name="subdomain" class="code" required />
    125136            </p>
    126137
Note: See TracChangeset for help on using the changeset viewer.