| 1 |
<?php |
| 2 |
$current_user = wp_get_current_user(); |
| 3 |
?> |
| 4 |
<h1>Emailing <?php echo $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> |
| 5 |
|
| 6 |
<table class="form-table"> |
| 7 |
|
| 8 |
<tr valign="top"> |
| 9 |
<th scope="row" class="titledesc"><?php echo __( 'To', 'propertyhive' ); ?></th> |
| 10 |
<td class="forminp"> |
| 11 |
<?php |
| 12 |
foreach ( $_POST['email_contact_applicant_profile_id'] as $contact_applicant_profile_id ) |
| 13 |
{ |
| 14 |
$explode_contact_applicant_profile_id = explode("|", $contact_applicant_profile_id); |
| 15 |
|
| 16 |
$contact_id = $explode_contact_applicant_profile_id[0]; |
| 17 |
$applicant_profile_id = $explode_contact_applicant_profile_id[1]; |
| 18 |
|
| 19 |
echo get_the_title($contact_id) . ' (' . get_post_meta( $contact_id, '_email_address', TRUE ) . ')<br>'; |
| 20 |
} |
| 21 |
?> |
| 22 |
</td> |
| 23 |
</tr> |
| 24 |
|
| 25 |
<tr valign="top"> |
| 26 |
<th scope="row" class="titledesc"><?php echo __( 'From Name', 'propertyhive' ); ?></th> |
| 27 |
<td class="forminp"> |
| 28 |
<input type="text" name="from_name" value="<?php |
| 29 |
|
| 30 |
echo get_bloginfo('name'); |
| 31 |
|
| 32 |
?>" style="width:100%;"> |
| 33 |
</td> |
| 34 |
</tr> |
| 35 |
|
| 36 |
<tr valign="top"> |
| 37 |
<th scope="row" class="titledesc"><?php echo __( 'From Email Address', 'propertyhive' ); ?></th> |
| 38 |
<td class="forminp"> |
| 39 |
<input type="text" name="from_email_address" value="<?php |
| 40 |
|
| 41 |
if ( trim($current_user->user_email) != '' ) |
| 42 |
{ |
| 43 |
echo $current_user->user_email; |
| 44 |
} |
| 45 |
|
| 46 |
?>" style="width:100%;"> |
| 47 |
</td> |
| 48 |
</tr> |
| 49 |
|
| 50 |
<tr valign="top"> |
| 51 |
<th scope="row" class="titledesc"><?php echo __( 'Subject', 'propertyhive' ); ?></th> |
| 52 |
<td class="forminp"> |
| 53 |
<input type="text" name="subject" value="<?php echo $subject; ?>" style="width:100%;"> |
| 54 |
</td> |
| 55 |
</tr> |
| 56 |
|
| 57 |
<tr valign="top"> |
| 58 |
<th scope="row" class="titledesc"><?php echo __( 'Email Body', 'propertyhive' ); ?></th> |
| 59 |
<td class="forminp"> |
| 60 |
<textarea name="body" style="width:100%; height:300px;"><?php echo $body; ?></textarea> |
| 61 |
</td> |
| 62 |
</tr> |
| 63 |
|
| 64 |
</table> |