Making WordPress.org


Ignore:
Timestamp:
09/28/2016 12:52:27 PM (9 years ago)
Author:
kovshenin
Message:

WordCamp.org: Convert spaces to tabs, and fix an array key.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/sponsor-payment/main.php

    r4155 r4156  
    66
    77<div id="container">
    8     <div id="content" class="wcorg-sponsor-payment" role="main">
     8    <div id="content" class="wcorg-sponsor-payment" role="main">
    99
    10         <h1 class="entry-title">Sponsorship Payment</h1>
     10        <h1 class="entry-title">Sponsorship Payment</h1>
    1111
    12         <?php if ( ! empty( $data['errors'] ) ) : ?>
    13             <?php foreach ( $data['errors'] as $error ) : ?>
    14                 <p><strong>Error:</strong> <?php echo esc_html( $error ); ?></p>
    15             <?php endforeach; ?>
    16         <?php endif; ?>
     12        <?php if ( ! empty( $data['errors'] ) ) : ?>
     13            <?php foreach ( $data['errors'] as $error ) : ?>
     14                <p><strong>Error:</strong> <?php echo esc_html( $error ); ?></p>
     15            <?php endforeach; ?>
     16        <?php endif; ?>
    1717
    18         <?php if ( $data['step'] == STEP_SELECT_INVOICE ) : ?>
     18        <?php if ( $data['step'] == STEP_SELECT_INVOICE ) : ?>
    1919
    20             <p>Use this form to pay your WordCamp sponsorship fee to WordPress Community Support, PBC. If you did not receive an invoice ID yet, please get in touch with the event's Sponsorships Coordinator for more information.</p>
     20            <p>Use this form to pay your WordCamp sponsorship fee to WordPress Community Support, PBC. If you did not receive an invoice ID yet, please get in touch with the event's Sponsorships Coordinator for more information.</p>
    2121
    22             <form method="POST">
    23                 <input type="hidden" name="step" value="<?php echo STEP_SELECT_INVOICE; ?>" />
    24                 <input type="hidden" name="sponsor_payment_submit" value="1" />
     22            <form method="POST">
     23                <input type="hidden" name="step" value="<?php echo STEP_SELECT_INVOICE; ?>" />
     24                <input type="hidden" name="sponsor_payment_submit" value="1" />
    2525
    26                 <label>Event</label>
    27                 <div class="control">
    28                     <select name="wordcamp_id">
    29                         <option value="" disabled selected>Select a WordCamp</option>
    30                         <?php foreach ( $data['wordcamps'] as $wordcamp ) : ?>
    31                         <option value="<?php echo esc_attr( $wordcamp->ID ); ?>"><?php echo esc_html( $wordcamp->post_title ); ?></option>
    32                         <?php endforeach; ?>
    33                     </select>
    34                 </div>
     26                <label>Event</label>
     27                <div class="control">
     28                    <select name="wordcamp_id">
     29                        <option value="" disabled selected>Select a WordCamp</option>
     30                        <?php foreach ( $data['wordcamps'] as $wordcamp ) : ?>
     31                        <option value="<?php echo esc_attr( $wordcamp->ID ); ?>"><?php echo esc_html( $wordcamp->post_title ); ?></option>
     32                        <?php endforeach; ?>
     33                    </select>
     34                </div>
    3535
    36                 <label>Invoice ID</label>
    37                 <div class="control">
    38                     <input type="text" name="invoice_id" />
    39                 </div>
     36                <label>Invoice ID</label>
     37                <div class="control">
     38                    <input type="text" name="invoice_id" />
     39                </div>
    4040
    41                 <label>Currency</label>
    42                 <div class="control">
    43                     <select name="currency">
    44                         <option value="" disabled selected>Select a Currency</option>
    45                         <?php foreach ( $data['currencies'] as $currency_key => $currency_name ) : ?>
    46                         <option value="<?php echo esc_attr( $currency_key ); ?>">
    47                             <?php echo esc_html( $currency_name ); ?>
    48                         </option>
    49                         <?php endforeach; ?>
    50                     </select>
    51                 </div>
     41                <label>Currency</label>
     42                <div class="control">
     43                    <select name="currency">
     44                        <option value="" disabled selected>Select a Currency</option>
     45                        <?php foreach ( $data['currencies'] as $currency_key => $currency_name ) : ?>
     46                        <option value="<?php echo esc_attr( $currency_key ); ?>">
     47                            <?php echo esc_html( $currency_name ); ?>
     48                        </option>
     49                        <?php endforeach; ?>
     50                    </select>
     51                </div>
    5252
    53                 <label>Amount</label>
    54                 <div class="control">
    55                     <input type="text" name="amount" />
    56                 </div>
     53                <label>Amount</label>
     54                <div class="control">
     55                    <input type="text" name="amount" />
     56                </div>
    5757
    58                 <div class="clear"></div>
     58                <div class="clear"></div>
    5959
    60                 <input type="submit" value="Continue" />
    61             </form>
     60                <input type="submit" value="Continue" />
     61            </form>
    6262
    63         <?php elseif ( $data['step'] == STEP_PAYMENT_DETAILS ) : ?>
     63        <?php elseif ( $data['step'] == STEP_PAYMENT_DETAILS ) : ?>
    6464
    65             <p>Please review the details below and hit "Make a Payment" when you're ready.</p>
     65            <p>Please review the details below and hit "Make a Payment" when you're ready.</p>
    6666
    67             <table>
    68                 <tr>
    69                     <td>Invoice</td>
    70                     <td><?php echo esc_html( $data['payment']['invoice_id'] ); ?></td>
    71                 </tr>
    72                 <tr>
    73                     <td>Event</td>
    74                     <td><?php echo esc_html( $data['payment']['wordcamp_obj']->post_title ); ?></td>
    75                 </tr>
    76                 <tr>
    77                     <td>Currency</td>
    78                     <td><?php echo esc_html( $data['payment']['currency'] ); ?></td>
    79                 </tr>
    80                 <tr>
    81                     <td>Amount</td>
    82                     <td><?php echo number_format( round( $data['payment']['amount'], 2 ), 2, '.', ' ' ); ?></td>
    83                 </tr>
    84             </table>
     67            <table>
     68                <tr>
     69                    <td>Invoice</td>
     70                    <td><?php echo esc_html( $data['payment']['invoice_id'] ); ?></td>
     71                </tr>
     72                <tr>
     73                    <td>Event</td>
     74                    <td><?php echo esc_html( $data['payment']['wordcamp_obj']->post_title ); ?></td>
     75                </tr>
     76                <tr>
     77                    <td>Currency</td>
     78                    <td><?php echo esc_html( $data['payment']['currency'] ); ?></td>
     79                </tr>
     80                <tr>
     81                    <td>Amount</td>
     82                    <td><?php echo number_format( round( $data['payment']['amount'], 2 ), 2, '.', ' ' ); ?></td>
     83                </tr>
     84            </table>
    8585
    86             <form method="POST">
    87                 <input type="hidden" name="step" value="<?php echo STEP_PAYMENT_DETAILS; ?>" />
    88                 <input type="hidden" name="sponsor_payment_submit" value="1" />
    89                 <input type="hidden" name="payment_data_json" value="<?php echo esc_attr( $data['payment_data_json'] ); ?>" />
    90                 <input type="hidden" name="payment_data_signature" value="<?php echo esc_attr( $data['payment_data_signature'] ); ?>" />
     86            <form method="POST">
     87                <input type="hidden" name="step" value="<?php echo STEP_PAYMENT_DETAILS; ?>" />
     88                <input type="hidden" name="sponsor_payment_submit" value="1" />
     89                <input type="hidden" name="payment_data_json" value="<?php echo esc_attr( $data['payment_data_json'] ); ?>" />
     90                <input type="hidden" name="payment_data_signature" value="<?php echo esc_attr( $data['payment_data_signature'] ); ?>" />
    9191
    92                 <script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
    93                     data-key="<?php echo esc_attr( $data['keys']['publishable'] ); ?>"
    94                     data-amount="<?php echo esc_attr( round( $data['payment']['amount'], 2 ) * 100 ); ?>"
    95                     data-currency="<?php echo esc_attr( $data['payment']['currency'] ); ?>"
    96                     data-name="WordPress Community Support, PBC"
    97                     data-description="Event Sponsorship Payment"
    98                     data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
    99                     data-locale="auto"
    100                     data-panel-label="Pay"
    101                     data-label="Make a Payment"
    102                     data-zip-code="true">
    103                 </script>
    104             </form>
     92                <script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
     93                    data-key="<?php echo esc_attr( $data['keys']['publishable'] ); ?>"
     94                    data-amount="<?php echo esc_attr( round( $data['payment']['amount'], 2 ) * 100 ); ?>"
     95                    data-currency="<?php echo esc_attr( $data['payment']['currency'] ); ?>"
     96                    data-name="WordPress Community Support, PBC"
     97                    data-description="Event Sponsorship Payment"
     98                    data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
     99                    data-locale="auto"
     100                    data-panel-label="Pay"
     101                    data-label="Make a Payment"
     102                    data-zip-code="true">
     103                </script>
     104            </form>
    105105
    106         <?php elseif ( $data['step'] == STEP_PAYMENT_SUCCESS ) : ?>
     106        <?php elseif ( $data['step'] == STEP_PAYMENT_SUCCESS ) : ?>
    107107
    108             <p><strong>Success!</strong> Your payment has been received, thank you!</p>
     108            <p><strong>Success!</strong> Your payment has been received, thank you!</p>
    109109
    110             <ul>
    111                 <li><a href="<?php echo esc_url( add_query_arg( 'again', 1 ) ); ?>">Make another payment</a></li>
    112                 <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Go back to Central</a></li>
    113             </ul>
     110            <ul>
     111                <li><a href="<?php echo esc_url( add_query_arg( 'again', 1 ) ); ?>">Make another payment</a></li>
     112                <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Go back to Central</a></li>
     113            </ul>
    114114
    115         <?php endif; ?>
     115        <?php endif; ?>
    116116
    117     </div><!-- #content -->
     117    </div><!-- #content -->
    118118</div><!-- #container -->
    119119
Note: See TracChangeset for help on using the changeset viewer.