WordPress.org

Making WordPress.org


Ignore:
Timestamp:
11/01/2017 04:33:47 PM (3 years ago)
Author:
iandunn
Message:

WordCamp Payments: Add missing ISO 4217 currencies.

This also cleans up and normalizes the dropdown rendering across payments modules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/reimbursement-request/metabox-general-information.php

    r2705 r6067  
    33namespace WordCamp\Budgets\Reimbursement_Requests;
    44defined( 'WPINC' ) or die();
     5
     6/** @var \WP_Post $post */
     7/** @var string   $name_of_payer */
     8/** @var array    $available_currencies */
     9/** @var string   $selected_currency  */
     10/** @var array    $available_reasons */
     11/** @var string   $selected_reason */
     12/** @var string   $other_reason */
     13/** @var int      $date_paid */
    514
    615?>
     
    3140
    3241            <select id="_wcbrr_currency" name="_wcbrr_currency">
    33                 <option value="null-select-one">
     42                <option value="">
    3443                    <?php _e( '-- Select a Currency --', 'wordcamporg' ); ?>
    3544                </option>
    36                 <option value="null-separator1"></option>
     45                <option value=""></option>
    3746
    3847                <?php foreach ( $available_currencies as $currency_key => $currency_name ) : ?>
    3948                    <option value="<?php echo esc_attr( $currency_key ); ?>" <?php selected( $currency_key, $selected_currency ); ?> >
    4049                        <?php echo esc_html( $currency_name ); ?>
    41                         <?php // todo - For better UX, prepend the code to the name (USD - United States Dollar), and sort by the code. Updating the sorting in get_currencies(). Also make this change other places this is used ?>
     50                        <?php if ( $currency_key ) : ?>
     51                            (<?php echo esc_html( $currency_key ); ?>)
     52                        <?php endif; ?>
    4253                    </option>
    4354                <?php endforeach; ?>
     
    5364
    5465            <select id="_wcbrr_reason" name="_wcbrr_reason">
    55                 <option value="null-select-one">
     66                <option value="">
    5667                    <?php _e( '-- Select a Reason --', 'wordcamporg' ); ?>
    5768                </option>
    58                 <option value="null-separator1"></option>
     69                <option value=""></option>
    5970
    6071                <?php foreach ( $available_reasons as $reason_key => $reason_name ) : ?>
Note: See TracChangeset for help on using the changeset viewer.