Changeset 7475
- Timestamp:
- 07/18/2018 07:39:47 PM (7 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/javascript/wcpt-wordcamp/admin.js
r7260 r7475 11 11 self.initialize = function() { 12 12 var createSiteCheckbox = $( '#wcpt_create-site-in-network' ), 13 $mentorUserName = $( '#wcpt_mentor_wordpress_org_user_name' ); 13 $mentorUserName = $( '#wcpt_mentor_wordpress_org_user_name' ), 14 hasContributor = $( '#wcpt_contributor_day' ); 14 15 15 16 // Sponsor region 16 17 createSiteCheckbox.change( self.toggleSponsorRegionRequired ); 17 18 createSiteCheckbox.trigger( 'change' ); 19 20 // Contributor day info 21 hasContributor.change( self.toggleContributorInfo ); 22 hasContributor.trigger( 'change' ); 18 23 19 24 // Date fields … … 95 100 }; 96 101 102 /** 103 * Toggle the display of the Contributor Day Info fields 104 * 105 * @param {object} event 106 */ 107 self.toggleContributorInfo = function( event ) { 108 109 // Selects all the div enclosing input elements for contributing info, 110 // except for the one which has the checkbox with ID wcpt_contributor_day 111 var contributorInputElements = $( "#wcpt_contributor_info .inside .inside:not( :has( #wcpt_contributor_day ) )" ); 112 113 if ( $( '#wcpt_contributor_day' ).is( ':checked' ) ) { 114 contributorInputElements.slideDown(); 115 } else { 116 contributorInputElements.slideUp(); 117 } 118 119 }; 120 97 121 /** 98 122 * Update the Mentor fields with the data for the mentor chosen in the picker. -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r7260 r7475 88 88 __( 'Venue Information', 'wcpt' ), 89 89 'wcpt_venue_metabox', 90 WCPT_POST_TYPE_ID, 91 'advanced', 92 'high' 93 ); 94 95 add_meta_box( 96 'wcpt_contributor_info', 97 __( 'Contributor Day Information', 'wcpt' ), 98 'wcpt_contributor_metabox', 90 99 WCPT_POST_TYPE_ID, 91 100 'advanced', … … 442 451 break; 443 452 453 case 'contributor': 454 // These fields names need to be unique, hence the 'Contributor' prefix on each one 455 $retval = array ( 456 'Contributor Day' => 'checkbox', 457 'Contributor Day Date (YYYY-mm-dd)' => 'date', 458 'Contributor Venue Name' => 'text', 459 'Contributor Venue Address' => 'textarea', 460 'Contributor Venue Capacity' => 'text', 461 'Contributor Venue Website URL' => 'text', 462 'Contributor Venue Contact Info' => 'textarea', 463 ); 464 break; 465 444 466 case 'wordcamp': 445 467 $retval = array ( … … 522 544 'Contact Information' => 'textarea', 523 545 'Exhibition Space Available' => 'checkbox', 546 547 'Contributor Day' => 'checkbox', 548 'Contributor Day Date (YYYY-mm-dd)' => 'date', 549 'Contributor Venue Name' => 'text', 550 'Contributor Venue Address' => 'textarea', 551 'Contributor Venue Capacity' => 'text', 552 'Contributor Venue Website URL' => 'text', 553 'Contributor Venue Contact Info' => 'textarea', 524 554 ); 525 555 break; … … 1155 1185 function wcpt_venue_metabox() { 1156 1186 $meta_keys = $GLOBALS['wordcamp_admin']->meta_keys( 'venue' ); 1187 wcpt_metabox( $meta_keys ); 1188 } 1189 1190 function wcpt_contributor_metabox() { 1191 $meta_keys = $GLOBALS['wordcamp_admin']->meta_keys( 'contributor' ); 1157 1192 wcpt_metabox( $meta_keys ); 1158 1193 }
Note: See TracChangeset
for help on using the changeset viewer.