- Timestamp:
- 05/10/2016 04:12:06 PM (8 years ago)
- 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/javascript/wordcamp-budgets.js
r2819 r3105 23 23 needsIntermediaryBank.trigger( 'change' ); // Set the initial state 24 24 25 $( '#wcb-save-draft' ).click( app.makeFieldsOptionalForDrafts ); 26 }, 27 28 /** 29 * Make all required input field optional when saving a draft. 30 * 31 * Otherwise the user would have to potentially fill out dozens of fields when they're not ready to. 32 * 33 * @param {object} event 34 */ 35 makeFieldsOptionalForDrafts : function( event ) { 25 $( '#wcb-save-draft' ).click( app.makeFieldsOptional ); 26 $( '#wcb-update' ).click( app.maybeMakeFieldsOptional ); 27 }, 28 29 /** 30 * Make all required fields optional under certain circumstances. 31 */ 32 maybeMakeFieldsOptional : function() { 33 var status = $( '#wcb_status' ).val(); 34 35 if ( 'draft' === status || 'wcb-incomplete' === status ) { 36 app.makeFieldsOptional(); 37 38 if ( 'wcb-incomplete' === status ) { 39 $( '#wcp_mark_incomplete_notes' ).prop( 'required', true ); 40 } 41 } 42 }, 43 44 /** 45 * Make all required input field optional. 46 * 47 * This is used when saving drafts, setting posts to the Incomplete status, etc. Otherwise the user would 48 * have to potentially fill out dozens of fields when they're not ready to. 49 * 50 * @param {object} event 51 */ 52 makeFieldsOptional : function( event ) { 36 53 $( '#poststuff' ).find( ':input[required]' ).each( function( fieldIndex, inputField ) { 37 54 $( inputField ).prop( 'required', false ); -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/metabox-status.php
r2682 r3105 39 39 <?php if ( current_user_can( 'manage_network' ) ) : ?> 40 40 41 <select name="post_status">41 <select id="wcb_status" name="post_status"> 42 42 <?php foreach ( self::get_post_statuses() as $status ) : ?> 43 43 <?php $status = get_post_status_object( $status ); ?> -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/reimbursement-request/metabox-status.php
r2646 r3105 43 43 <?php if ( current_user_can( 'manage_network' ) ) : ?> 44 44 45 <select name="post_status">45 <select id="wcb_status" name="post_status"> 46 46 <?php foreach ( get_post_statuses() as $status ) : ?> 47 47 <?php $status = get_post_status_object( $status ); ?>
Note: See TracChangeset
for help on using the changeset viewer.