diff --git wordcamp.org/public_html/wp-content/plugins/wcpt/javascript/wcpt-wordcamp/admin.js wordcamp.org/public_html/wp-content/plugins/wcpt/javascript/wcpt-wordcamp/admin.js
index 5c7d544..91bd1de 100644
|
|
window.wordCampPostType.WcptWordCamp = ( function( $ ) { |
10 | 10 | */ |
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' ); |
18 | 19 | |
| 20 | // Contributor day info |
| 21 | hasContributor.change( self.toggleContributorInfo ); |
| 22 | hasContributor.trigger( 'change' ); |
| 23 | |
19 | 24 | // Date fields |
20 | 25 | $( '.date-field' ).datepicker( { |
21 | 26 | dateFormat: 'yy-mm-dd', |
… |
… |
window.wordCampPostType.WcptWordCamp = ( function( $ ) { |
109 | 114 | } |
110 | 115 | }; |
111 | 116 | |
| 117 | /** |
| 118 | * Toggle the display of the Contributor Day Info fields |
| 119 | * |
| 120 | * @param {object} event |
| 121 | */ |
| 122 | self.toggleContributorInfo = function( event ) { |
| 123 | |
| 124 | if ( $( '#wcpt_contributor_day' ).is( ':checked' ) ) { |
| 125 | $( '#wcpt_contributor_day' ).closest( 'div' ).siblings().slideDown(); |
| 126 | } else { |
| 127 | $( '#wcpt_contributor_day' ).closest( 'div' ).siblings().slideUp(); |
| 128 | } |
| 129 | |
| 130 | }; |
| 131 | |
112 | 132 | /** |
113 | 133 | * Kick things off |
114 | 134 | */ |
diff --git wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
index da6ae5a..a789ab2 100644
|
|
class WordCamp_Admin { |
93 | 93 | ); |
94 | 94 | |
95 | 95 | add_meta_box( |
| 96 | 'wcpt_contributor_info', |
| 97 | __( 'Contributor Day Information', 'wcpt' ), |
| 98 | 'wcpt_contributor_metabox', |
| 99 | WCPT_POST_TYPE_ID, |
| 100 | 'advanced', |
| 101 | 'high' |
| 102 | ); |
| 103 | |
| 104 | add_meta_box( |
96 | 105 | 'wcpt_original_application', |
97 | 106 | 'Original Application', |
98 | 107 | array( $this, 'original_application_metabox' ), |
… |
… |
class WordCamp_Admin { |
441 | 450 | ); |
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 ( |
446 | 468 | 'Start Date (YYYY-mm-dd)' => 'date', |
… |
… |
class WordCamp_Admin { |
521 | 543 | 'Website URL' => 'text', |
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; |
526 | 556 | |
… |
… |
function wcpt_venue_metabox() { |
1155 | 1185 | wcpt_metabox( $meta_keys ); |
1156 | 1186 | } |
1157 | 1187 | |
| 1188 | function wcpt_contributor_metabox() { |
| 1189 | $meta_keys = $GLOBALS['wordcamp_admin']->meta_keys( 'contributor' ); |
| 1190 | wcpt_metabox( $meta_keys ); |
| 1191 | } |
| 1192 | |
1158 | 1193 | /** |
1159 | 1194 | * wcpt_metabox () |
1160 | 1195 | * |