<table class="form-table">
	<tbody>
	<tr class="subEventHide">
		<th scope="row">
			<label for="notify_user">
				<?php echo rsvp_pro_get_admin_string( 'settings_notify_when_rsvp_label' ); ?>
			</label>
		</th>
		<td>
			<input type="checkbox" name="notify_user" id="notify_user"
				   value="Y" <?php echo ( $notifyUser == 'Y' ) ? ' checked="checked"' : ''; ?> />
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="notify_email">
				<?php echo rsvp_pro_get_admin_string( 'settings_admin_notification_email_label' ); ?>
			</label>
		</th>
		<td>
			<input type="text" name="notify_email" id="notify_email" value="<?php echo esc_attr( $notifyEmail ); ?>"
				   class="regular-text"/>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="rsvp_guest_email_confirmation">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_guest_when_rsvp_label' ); ?>
			</label>
		</th>
		<td>
			<input type="checkbox" name="rsvp_guest_email_confirmation" id="rsvp_guest_email_confirmation"
				   value="Y" <?php echo ( $guestEmailConfirm == 'Y' ) ? ' checked="checked"' : ''; ?> />
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_TEXT; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_guest_eamil_text_label' ); ?>
			</label>
		</th>
		<td>
			<textarea name="<?php echo RSVP_PRO_OPTION_EMAIL_TEXT; ?>" id="<?php echo RSVP_PRO_OPTION_EMAIL_TEXT; ?>"
					  rows="5" cols="60"><?php echo esc_html( $rsvpEmailText ); ?></textarea>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_FROM; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_from_label' ); ?>
			</label>
		</th>
		<td>
			<input type="text" name="<?php echo RSVP_PRO_OPTION_EMAIL_FROM; ?>"
				   id="<?php echo RSVP_PRO_OPTION_EMAIL_FROM; ?>" value="<?php echo esc_attr( $emailFrom ); ?>"
				   class="regular-text"/>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_from_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_CC_ASSOCIATED; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_cc_associated_label' ); ?>
			</label>
		</th>
		<td>
			<input type="checkbox" name="<?php echo RSVP_PRO_OPTION_EMAIL_CC_ASSOCIATED; ?>"
				   id="<?php echo RSVP_PRO_OPTION_EMAIL_CC_ASSOCIATED; ?>"
				   value="Y" <?php echo ( $emailCCAssociated == 'Y' ) ? ' checked="checked"' : ''; ?> />
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_ASSOCIATED_INDIVIDUALLY; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_associated_separately_label' ); ?>
			</label>
		</th>
		<td>
			<input type="checkbox" name="<?php echo RSVP_PRO_OPTION_EMAIL_ASSOCIATED_INDIVIDUALLY; ?>"
				   id="<?php echo RSVP_PRO_OPTION_EMAIL_ASSOCIATED_INDIVIDUALLY; ?>"
				   value="Y" <?php echo ( $email_associated_individually == 'Y' ) ? ' checked="checked"' : ''; ?> />
		</td>
	</tr>
	<tr>
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_INCLUDE_ICS; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_include_ics_label' ); ?>
			</label>
		</th>
		<td>
			<input type="checkbox" name="<?php echo RSVP_PRO_OPTION_EMAIL_INCLUDE_ICS; ?>"
				   id="<?php echo RSVP_PRO_OPTION_EMAIL_INCLUDE_ICS; ?>"
				   value="Y" <?php echo ( $email_include_ics == 'Y' ) ? ' checked="checked"' : ''; ?> />
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_include_ics_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_BCC_ADDRESS; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_to_bcc_label' ); ?>
			</label>
		</th>
		<td>
			<input type="text" name="<?php echo RSVP_PRO_OPTION_EMAIL_BCC_ADDRESS; ?>"
				   id="<?php echo RSVP_PRO_OPTION_EMAIL_BCC_ADDRESS; ?>"
				   value="<?php echo esc_attr( $emailBCCAddresses ); ?>" class="regular-text"/>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_to_bcc_description' ); ?>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_ADMIN_EMAIL_SUBJECT; ?>"><?php echo rsvp_pro_get_admin_string( 'settings_email_admin_subject_label' ); ?></label>
		</th>
		<td>
			<input type="text" name="<?php echo RSVP_PRO_OPTION_ADMIN_EMAIL_SUBJECT; ?>"
				   id="<?php echo RSVP_PRO_OPTION_ADMIN_EMAIL_SUBJECT; ?>"
				   value="<?php echo esc_attr( $admin_email_subject ); ?>" class="regular-text"/>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_admin_subject_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_SUBJECT; ?>"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_subject_label' ); ?></label>
		</th>
		<td>
			<input type="text" name="<?php echo RSVP_PRO_OPTION_EMAIL_SUBJECT; ?>"
				   id="<?php echo RSVP_PRO_OPTION_EMAIL_SUBJECT; ?>" value="<?php echo esc_attr( $emailSubject ); ?>"
				   class="regular-text"/>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_subject_description' ); ?></span>
		</td>
	</tr>
	<?php
	if(isset($_GET['id'])){
		rsvp_pro_admin_message_variables( $_GET['id'], 'subEventHide', rsvp_pro_get_admin_string( 'settings_available_email_fields_description' ) );
	}

	?>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_EMAIL_BODY; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_label' ); ?>
			</label>
		</th>
		<td>
			<?php wp_editor( $email_body, 'rsvp_email_body', $settings = array() ); ?>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_NO_EMAIL_BODY; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_no_label' ); ?>
			</label>
		</th>
		<td>
			<?php wp_editor( $no_email_body, 'rsvp_no_email_body', $settings = array() ); ?>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_no_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_MAYBE_EMAIL_BODY; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_maybe_label' ); ?>
			</label>
		</th>
		<td>
			<?php wp_editor( $maybe_email_body, 'rsvp_maybe_email_body', $settings = array() ); ?>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_maybe_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_WAITLIST_EMAIL_BODY; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_waitlist_label' ); ?>
			</label>
		</th>
		<td>
			<?php wp_editor( $waitlist_email_body, RSVP_PRO_OPTION_WAITLIST_EMAIL_BODY, $settings = array() ); ?>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_body_waitlist_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_ADMIN_EMAIL_BODY; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_admin_email_body_label' ); ?>
			</label>
		</th>
		<td>
			<?php wp_editor( $admin_email_body, RSVP_PRO_OPTION_ADMIN_EMAIL_BODY, $settings = array() ); ?>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_admin_email_body_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_send_attendee_list_label' ); ?>
			</label>
		</th>
		<td>
			<input type="checkbox" name="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST; ?>"
				   id="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST; ?>" value="Y"
				<?php echo ( $sendAttendeeList == 'Y' ) ? 'checked="checked" ' : ''; ?> />
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_send_attendee_list_description' ); ?>
				<?php
				if ( strtotime( $attendee_list_sent_on ) ) {
					echo '<br /><b>' . __( 'Attendee list sent on ', 'rsvp-pro-plugin' ) . $attendee_list_sent_on . '</b>';
				}
				?>
					</span>
			<p>
				<a href="<?php echo admin_url( 'admin.php?page=rsvp-pro-top-level&action=send_attendee_list&eventID=' . $eventID ); ?>"
				   class="button-primary">
					<?php echo rsvp_pro_get_admin_string( 'settings_send_attendee_list_button' ); ?>
				</a>
			</p>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_EMAIL; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_list_to_label' ); ?>
			</label>
		</th>
		<td>
			<input type="text" name="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_EMAIL; ?>"
				   id="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_EMAIL; ?>"
				   value="<?php echo esc_attr( $sendAttendeeListEmail ); ?>"/>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_email_attendee_list_to_description' ); ?></span>
		</td>
	</tr>
	<tr class="subEventHide">
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_NOTE; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_attendee_list_message_label' ); ?>
			</label>
		</th>
		<td>
			<textarea name="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_NOTE; ?>"
					  id="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_NOTE; ?>" rows="5"
					  cols="60"><?php echo esc_html( $sendAttendeeListNote ); ?></textarea>
			<br/>
			<span class="description"><?php echo rsvp_pro_get_admin_string( 'settings_attendee_list_message_description' ); ?></span>
		</td>
	</tr>
	<?php
	if(isset($_GET['id'])){
		rsvp_pro_admin_message_variables( $_GET['id'], 'subEventHide', rsvp_pro_get_admin_string( 'settings_data_fields_label' ) );
	}
	?>
	<tr class="subEventHide">
		<th scope="row">
			<?php
			if ( empty( $sendAttendeeListFormat ) ) {
				$sendAttendeeListFormat = '[[FirstName]],[[LastName]],[[Email]]';
			}
			?>
			<label for="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_FORMAT; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_attendee_list_format_label' ); ?>
			</label>
		</th>
		<td>
			<input type="text" name="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_FORMAT; ?>"
				   id="<?php echo RSVP_PRO_OPTION_SEND_ATTENDEE_LIST_FORMAT; ?>"
				   value="<?php echo esc_attr( $sendAttendeeListFormat ); ?>" class="large-text"/>
		</td>
	</tr>
	<tr>
		<th scope="row">
			<label for="<?php echo RSVP_PRO_OPTION_WAITLIST_STATUS_CHANGE_EMAIL; ?>">
				<?php echo rsvp_pro_get_admin_string( 'settings_attendee_list_format_description' ); ?>
			</label>
		</th>
		<td>
			<?php wp_editor( $waitlistStatusEmail, RSVP_PRO_OPTION_WAITLIST_STATUS_CHANGE_EMAIL, $settings = array() ); ?>
		</td>
	</tr>
	</tbody>
</table>
