<?php
global $post;
$blossomthemes_email_newsletter_setting = get_post_meta( $post->ID, 'blossomthemes_email_newsletter_setting', true );
$val = isset($blossomthemes_email_newsletter_setting['field']['select']) ? esc_attr($blossomthemes_email_newsletter_setting['field']['select']):'email';
$gdpr = isset( $blossomthemes_email_newsletter_setting['appearance']['gdpr'] ) ? esc_attr( $blossomthemes_email_newsletter_setting['appearance']['gdpr'] ):'';
?>
<div class="trip-info-meta">
	<div class="trip-info-meta-wrap">
		<label for="blossomthemes_email_newsletter_setting[field][uname-email]"><?php _e('Name and Email: ','blossomthemes-email-newsletter');?></label>
		<input type="radio" id="blossomthemes_email_newsletter_setting[field][uname-email]" name="blossomthemes_email_newsletter_setting[field][select]" value="uname-email" <?php if( $val == 'uname-email' ){echo "checked";}?>>
	</div>
	<div class="trip-info-meta-wrap">
		<label for="blossomthemes_email_newsletter_setting[field][email]"><?php _e('Email: ','blossomthemes-email-newsletter');?></label>
		<input type="radio" id="blossomthemes_email_newsletter_setting[field][email]" name="blossomthemes_email_newsletter_setting[field][select]" value="email" <?php if( $val == 'email' ){echo "checked";}?>>
	</div>
	<div class="trip-info-meta-wrap">
		<label for="blossomthemes_email_newsletter_setting[field][first_name_placeholder]"><?php _e('Name Placeholder: ','blossomthemes-email-newsletter');?></label>
		<input type="text" id="blossomthemes_email_newsletter_setting[field][first_name_placeholder]" name="blossomthemes_email_newsletter_setting[field][first_name_placeholder]" value="<?php echo isset($blossomthemes_email_newsletter_setting['field']['first_name_placeholder']) ? esc_attr($blossomthemes_email_newsletter_setting['field']['first_name_placeholder']):'Your First Name';?>">
	</div>
	<div class="trip-info-meta-wrap">
		<label for="blossomthemes_email_newsletter_setting[field][email_placeholder]"><?php _e('Email Placeholder: ','blossomthemes-email-newsletter');?></label>	
		<input type="text" id="blossomthemes_email_newsletter_setting[field][email_placeholder]" name="blossomthemes_email_newsletter_setting[field][email_placeholder]" value="<?php echo isset($blossomthemes_email_newsletter_setting['field']['email_placeholder']) ? esc_attr($blossomthemes_email_newsletter_setting['field']['email_placeholder']):'Your Email';?>">
	</div>
	<div class="trip-info-meta-wrap">
		<label for="blossomthemes_email_newsletter_setting[field][submit_label]"><?php _e('Submit Button Label: ','blossomthemes-email-newsletter');?></label>	
		<input type="text" id="blossomthemes_email_newsletter_setting[field][submit_label]" name="blossomthemes_email_newsletter_setting[field][submit_label]" value="<?php echo isset($blossomthemes_email_newsletter_setting['field']['submit_label']) ? esc_attr($blossomthemes_email_newsletter_setting['field']['submit_label']):'Subscribe';?>">
	</div>
	<div class="trip-info-meta-wrap">
        <label for="blossomthemes_email_newsletter_setting[appearance][gdpr]"><?php _e('Enable GDPR checkbox: ','blossomthemes-email-newsletter');?></label>
        <input type="checkbox" class="blossomthemes-email-newsletter-gdpr" id="blossomthemes_email_newsletter_setting[appearance][gdpr]" name="blossomthemes_email_newsletter_setting[appearance][gdpr]" value="0" <?php echo checked($gdpr,1);?>>
    </div>
	<div class="trip-info-meta-wrap">
		<label for="blossomthemes_email_newsletter_setting[appearance][note]"><?php _e('Form Note: ','blossomthemes-email-newsletter');?></label>	
		<textarea id="blossomthemes_email_newsletter_setting[appearance][note]" name="blossomthemes_email_newsletter_setting[appearance][note]"><?php echo isset($blossomthemes_email_newsletter_setting['appearance']['note']) ? esc_attr($blossomthemes_email_newsletter_setting['appearance']['note']):''?></textarea>
		<div class="blossomthemes-email-newsletter-note"><?php _e('Short note to show above the input fields of the form.','blossomthemes-email-newsletter') ?></div>
	</div>
</div>