| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
$current_user = wp_get_current_user(); |
| 7 |
?> |
| 8 |
<h1>Emailing <?php echo esc_html($property->get_formatted_full_address()); ?> To <?php echo count($_POST['email_contact_applicant_profile_id']); ?> Suitable Applicant<?php echo count($_POST['email_contact_applicant_profile_id']) != 1 ? 's' : ''; ?></h1> |
| 9 |
|
| 10 |
<table class="form-table"> |
| 11 |
|
| 12 |
<tr valign="top"> |
| 13 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'To', 'propertyhive' )); ?></th> |
| 14 |
<td class="forminp"> |
| 15 |
<?php |
| 16 |
foreach ( $_POST['email_contact_applicant_profile_id'] as $contact_applicant_profile_id ) |
| 17 |
{ |
| 18 |
$explode_contact_applicant_profile_id = explode("|", $contact_applicant_profile_id); |
| 19 |
|
| 20 |
$contact_id = $explode_contact_applicant_profile_id[0]; |
| 21 |
$applicant_profile_id = $explode_contact_applicant_profile_id[1]; |
| 22 |
|
| 23 |
echo get_the_title($contact_id) . ' (' . get_post_meta( $contact_id, '_email_address', TRUE ) . ')<br>'; |
| 24 |
} |
| 25 |
?> |
| 26 |
<div style="margin-top:5px;"><a href="" class="show-cc">Show Cc</a> | <a href="" class="show-bcc">Show Bcc</a></div> |
| 27 |
</td> |
| 28 |
</tr> |
| 29 |
|
| 30 |
<tr valign="top" style="display:none" id="cc_email_address_row"> |
| 31 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'Cc', 'propertyhive' )); ?></th> |
| 32 |
<td class="forminp"> |
| 33 |
<input type="text" name="cc_email_address" value="" style="width:100%;"> |
| 34 |
</td> |
| 35 |
</tr> |
| 36 |
|
| 37 |
<tr valign="top" style="display:none" id="bcc_email_address_row"> |
| 38 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'Bcc', 'propertyhive' )); ?></th> |
| 39 |
<td class="forminp"> |
| 40 |
<input type="text" name="bcc_email_address" value="" style="width:100%;"> |
| 41 |
</td> |
| 42 |
</tr> |
| 43 |
|
| 44 |
<tr valign="top"> |
| 45 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'From Name', 'propertyhive' )); ?></th> |
| 46 |
<td class="forminp"> |
| 47 |
<input type="text" name="from_name" value="<?php echo esc_attr(get_bloginfo('name')); ?>" style="width:100%;"> |
| 48 |
</td> |
| 49 |
</tr> |
| 50 |
|
| 51 |
<tr valign="top"> |
| 52 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'From Email Address', 'propertyhive' )); ?></th> |
| 53 |
<td class="forminp"> |
| 54 |
<input type="text" name="from_email_address" value="<?php echo esc_attr(trim($from_email_address)); ?>" style="width:100%;"> |
| 55 |
</td> |
| 56 |
</tr> |
| 57 |
|
| 58 |
<tr valign="top"> |
| 59 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'Subject', 'propertyhive' )); ?></th> |
| 60 |
<td class="forminp"> |
| 61 |
<input type="text" name="subject" value="<?php echo esc_attr($subject); ?>" style="width:100%;"> |
| 62 |
</td> |
| 63 |
</tr> |
| 64 |
|
| 65 |
<tr valign="top"> |
| 66 |
<th scope="row" class="titledesc"><?php echo esc_html(__( 'Email Body', 'propertyhive' )); ?></th> |
| 67 |
<td class="forminp"> |
| 68 |
<textarea name="body" style="width:100%; height:300px;"><?php echo $body; ?></textarea> |
| 69 |
</td> |
| 70 |
</tr> |
| 71 |
|
| 72 |
</table> |
| 73 |
|
| 74 |
<script> |
| 75 |
|
| 76 |
jQuery(document).ready(function() |
| 77 |
{ |
| 78 |
jQuery('a.show-cc').click(function(e) |
| 79 |
{ |
| 80 |
e.preventDefault(); |
| 81 |
|
| 82 |
jQuery('#cc_email_address_row').fadeIn('fast'); |
| 83 |
jQuery('#cc_email_address_row input').focus(); |
| 84 |
}); |
| 85 |
|
| 86 |
jQuery('a.show-bcc').click(function(e) |
| 87 |
{ |
| 88 |
e.preventDefault(); |
| 89 |
|
| 90 |
jQuery('#bcc_email_address_row').fadeIn('fast'); |
| 91 |
jQuery('#bcc_email_address_row input').focus(); |
| 92 |
}); |
| 93 |
}); |
| 94 |
|
| 95 |
</script> |