| 1 |
<?php |
| 2 |
// If this file is called directly, abort. |
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
global $ife_events; |
| 5 |
?> |
| 6 |
<div class="ife_container"> |
| 7 |
<div class="ife_row"> |
| 8 |
<div class="ife-column ife_well"> |
| 9 |
<h3><?php esc_attr_e( 'Facebook Import', 'import-facebook-events' ); ?></h3> |
| 10 |
<form method="post" id="ife_facebook_form"> |
| 11 |
|
| 12 |
<table class="form-table"> |
| 13 |
<tbody> |
| 14 |
<tr> |
| 15 |
<th scope="row"> |
| 16 |
<?php esc_attr_e( 'Import by','import-facebook-events' ); ?> : |
| 17 |
</th> |
| 18 |
<td> |
| 19 |
<select name="facebook_import_by" id="facebook_import_by"> |
| 20 |
<option value="facebook_event_id"><?php esc_attr_e( 'Facebook Event ID','import-facebook-events' ); ?></option> |
| 21 |
|
| 22 |
<option value="facebook_organization"><?php esc_attr_e( 'Facebook Page','import-facebook-events' ); ?></option> |
| 23 |
|
| 24 |
<?php if( $ife_events->common->has_authorized_user_token() ){ ?> |
| 25 |
<option value="facebook_group"><?php esc_attr_e( 'Facebook Group','import-facebook-events' ); ?></option> |
| 26 |
<?php } ?> |
| 27 |
|
| 28 |
</select> |
| 29 |
<span class="ife_small"> |
| 30 |
<?php _e( 'Select Event source. 1. by Facebook Event ID, 2. Facebook Organization or Page ( import events belonging to a Facebook organization or a Facebook page ).', 'import-facebook-events' ); ?> |
| 31 |
</span> |
| 32 |
</td> |
| 33 |
</tr> |
| 34 |
|
| 35 |
<tr class="facebook_eventid_wrapper"> |
| 36 |
<th scope="row"> |
| 37 |
<?php esc_attr_e( 'Facebook Event IDs','import-facebook-events' ); ?> : |
| 38 |
</th> |
| 39 |
<td> |
| 40 |
<textarea name="facebook_event_ids" class="facebook_event_ids" rows="5" cols="50"></textarea> |
| 41 |
<span class="ife_small"> |
| 42 |
<?php _e( 'One event ID per line, ( Eg. Event ID for https://www.facebook.com/events/123456789/ is "123456789" ).', 'import-facebook-events' ); ?> |
| 43 |
</span> |
| 44 |
</td> |
| 45 |
</tr> |
| 46 |
|
| 47 |
<tr class="facebook_page_wrapper" style="display: none;"> |
| 48 |
<th scope="row"> |
| 49 |
<?php esc_attr_e( 'Page username / ID to fetch events from','import-facebook-events' ); ?> : |
| 50 |
</th> |
| 51 |
<td> |
| 52 |
<input class="ife_text facebook_page_username" name="facebook_page_username" type="text" <?php if( !ife_is_pro() ){ echo 'disabled="disabled"'; } ?>/> |
| 53 |
<span class="ife_small"> |
| 54 |
<?php _e( ' Eg. username for https://www.facebook.com/xylusinfo/ is "xylusinfo".', 'import-facebook-events' ); ?> |
| 55 |
</span> |
| 56 |
<?php do_action( 'ife_render_pro_notice' ); ?> |
| 57 |
</td> |
| 58 |
</tr> |
| 59 |
|
| 60 |
<tr class="facebook_group_wrapper" style="display: none;"> |
| 61 |
<th scope="row"> |
| 62 |
<?php esc_attr_e( 'Facebook Group URL / Numeric ID to fetch events from','import-facebook-events' ); ?> : |
| 63 |
</th> |
| 64 |
<td> |
| 65 |
<input class="ife_text facebook_group" name="facebook_group_id" type="text" <?php if( !ife_is_pro() ){ echo 'disabled="disabled"'; } ?> /> |
| 66 |
<span class="ife_small"> |
| 67 |
<?php _e( ' Eg.Input value for https://www.facebook.com/groups/123456789123456/ <br/>https://www.facebook.com/groups/123456789123456/ OR "123456789123456"', 'import-facebook-events' ); ?> |
| 68 |
</span> |
| 69 |
<?php do_action( 'ife_render_pro_notice' ); ?> |
| 70 |
</td> |
| 71 |
</tr> |
| 72 |
|
| 73 |
<tr class="import_type_wrapper"> |
| 74 |
<th scope="row"> |
| 75 |
<?php esc_attr_e( 'Import type','import-facebook-events' ); ?> : |
| 76 |
</th> |
| 77 |
<td> |
| 78 |
<?php $ife_events->common->render_import_type(); ?> |
| 79 |
</td> |
| 80 |
</tr> |
| 81 |
|
| 82 |
<?php |
| 83 |
$ife_events->common->render_import_into_and_taxonomy(); |
| 84 |
$ife_events->common->render_eventstatus_input(); |
| 85 |
?> |
| 86 |
</tbody> |
| 87 |
</table> |
| 88 |
|
| 89 |
<div class="ife_element"> |
| 90 |
<input type="hidden" name="import_origin" value="facebook" /> |
| 91 |
<input type="hidden" name="ife_action" value="ife_import_submit" /> |
| 92 |
<?php wp_nonce_field( 'ife_import_form_nonce_action', 'ife_import_form_nonce' ); ?> |
| 93 |
<input type="submit" class="button-primary ife_submit_button" style="" value="<?php esc_attr_e( 'Import Event', 'import-facebook-events' ); ?>" /> |
| 94 |
</div> |
| 95 |
</form> |
| 96 |
</div> |
| 97 |
</div> |
| 98 |
</div> |
| 99 |
|