Making WordPress.org

Changeset 2373


Ignore:
Timestamp:
01/26/2016 08:23:16 PM (11 years ago)
Author:
iandunn
Message:

WordCamp Budgets: Allow Payment Method fields to be disabled.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php

    r2366 r2373  
    277277
    278278                $this->meta_key_prefix   = $box['args']['meta_key_prefix'];
     279
     280                if ( ! isset( $box['args']['fields_enabled'] ) ) {
     281                        $box['args']['fields_enabled'] = true;
     282                }
     283
    279284                $selected_payment_method = get_post_meta( $post->ID, "_{$this->meta_key_prefix}_payment_method", true );
    280285
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-payment.php

    r995 r2373  
    1 <table class="form-table">
    2         <?php $this->render_radio_input( $post, 'Payment Method', 'payment_method' ); ?>
    3         <?php $this->render_checkbox_input( $post, 'Reimbursing Personal Expense', 'requesting_reimbursement', 'Check this box if you paid for this expense out of pocket. Please attach the original payment support below with the vendor attached (if any), and proof of disbursed funds.' ); ?>
    4 </table>
    5 
    6 <table id="payment_method_check_fields" class="form-table payment_method_fields <?php echo 'Check' == $selected_payment_method ? 'active' : 'hidden'; ?>">
    7         <?php $this->render_text_input( $post, 'Payable To', 'payable_to' ); ?>
    8 </table>
    9 
    10 <p id="payment_method_credit_card_fields" class="description payment_method_fields <?php echo 'Credit Card' == $selected_payment_method ? 'active' : 'hidden'; ?>">
    11         <?php _e( 'Please make sure that you upload an authorization form below, if one is required by the vendor.', 'wordcamporg' ); ?>
    12 </p>
    13 
    14 <div id="payment_method_wire_fields" class="form-table payment_method_fields <?php echo 'Wire' == $selected_payment_method ? 'active' : 'hidden'; ?>">
    15         <table>
    16                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank Name',              'bank_name' ); ?>
    17                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank Street Address',    'bank_street_address' ); ?>
    18                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank City',              'bank_city' ); ?>
    19                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank State / Province',  'bank_state' ); ?>
    20                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank ZIP / Postal Code', 'bank_zip_code' ); ?>
    21                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank Country',           'bank_country' ); ?>
    22                 <?php $this->render_text_input( $post, 'Beneficiary’s Bank SWIFT BIC',         'bank_bic' ); ?>
    23                 <?php $this->render_text_input( $post, 'Beneficiary’s Account Number or IBAN', 'beneficiary_account_number' ); ?>
     1<fieldset <?php disabled( $box['args']['fields_enabled'], false ); ?> >
     2        <table class="form-table">
     3                <?php $this->render_radio_input( $post, 'Payment Method', 'payment_method' ); ?>
     4                <?php $this->render_checkbox_input( $post, 'Reimbursing Personal Expense', 'requesting_reimbursement', 'Check this box if you paid for this expense out of pocket. Please attach the original payment support below with the vendor attached (if any), and proof of disbursed funds.' ); ?>
    245        </table>
    256
    26         <table>
    27                 <?php $this->render_text_input( $post, 'Beneficiary’s Name',              'beneficiary_name' ); ?>
    28                 <?php $this->render_text_input( $post, 'Beneficiary’s Street Address',    'beneficiary_street_address' ); ?>
    29                 <?php $this->render_text_input( $post, 'Beneficiary’s City',              'beneficiary_city' ); ?>
    30                 <?php $this->render_text_input( $post, 'Beneficiary’s State / Province',  'beneficiary_state' ); ?>
    31                 <?php $this->render_text_input( $post, 'Beneficiary’s ZIP / Postal Code', 'beneficiary_zip_code' ); ?>
    32                 <?php $this->render_text_input( $post, 'Beneficiary’s Country',           'beneficiary_country' ); ?>
     7        <table id="payment_method_check_fields" class="form-table payment_method_fields <?php echo 'Check' == $selected_payment_method ? 'active' : 'hidden'; ?>">
     8                <?php $this->render_text_input( $post, 'Payable To', 'payable_to' ); ?>
    339        </table>
    34 </div>
     10
     11        <p id="payment_method_credit_card_fields" class="description payment_method_fields <?php echo 'Credit Card' == $selected_payment_method ? 'active' : 'hidden'; ?>">
     12                <?php _e( 'Please make sure that you upload an authorization form below, if one is required by the vendor.', 'wordcamporg' ); ?>
     13        </p>
     14
     15        <div id="payment_method_wire_fields" class="form-table payment_method_fields <?php echo 'Wire' == $selected_payment_method ? 'active' : 'hidden'; ?>">
     16                <table>
     17                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank Name',              'bank_name' ); ?>
     18                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank Street Address',    'bank_street_address' ); ?>
     19                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank City',              'bank_city' ); ?>
     20                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank State / Province',  'bank_state' ); ?>
     21                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank ZIP / Postal Code', 'bank_zip_code' ); ?>
     22                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank Country',           'bank_country' ); ?>
     23                        <?php $this->render_text_input( $post, 'Beneficiary’s Bank SWIFT BIC',         'bank_bic' ); ?>
     24                        <?php $this->render_text_input( $post, 'Beneficiary’s Account Number or IBAN', 'beneficiary_account_number' ); ?>
     25                </table>
     26
     27                <table>
     28                        <?php $this->render_text_input( $post, 'Beneficiary’s Name',              'beneficiary_name' ); ?>
     29                        <?php $this->render_text_input( $post, 'Beneficiary’s Street Address',    'beneficiary_street_address' ); ?>
     30                        <?php $this->render_text_input( $post, 'Beneficiary’s City',              'beneficiary_city' ); ?>
     31                        <?php $this->render_text_input( $post, 'Beneficiary’s State / Province',  'beneficiary_state' ); ?>
     32                        <?php $this->render_text_input( $post, 'Beneficiary’s ZIP / Postal Code', 'beneficiary_zip_code' ); ?>
     33                        <?php $this->render_text_input( $post, 'Beneficiary’s Country',           'beneficiary_country' ); ?>
     34                </table>
     35        </div>
     36</fieldset>
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/wordcamp-budgets/field-attached-files.php

    r2346 r2373  
    99                <?php _e( 'Add files', 'wordcamporg' ); ?>
    1010        </a>
     11
     12        <?php // todo: change from link to button, b/c more semantic and will respect fieldset:disabled ?>
    1113</p>
    1214
Note: See TracChangeset for help on using the changeset viewer.