Skip to content

Commit

Permalink
Fix phone field markup
Browse files Browse the repository at this point in the history
The markup of the phone field on the donor profile was breaking the ability to add/edit mailing addresses. I believe it was related to the `ID` of that field. This cleans up the markup and removes that ID for now.
  • Loading branch information
mathetos authored Dec 17, 2020
1 parent 42ed156 commit e23926d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions donors/add-donor-meta.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<?php
/**
* Add donor meta field to form
*
* @param int $form_id Donation Form ID.
*/
function give_add_donor_phone_form_field( $form_id ) {
?>
<p id="give-email-wrap" class="form-row form-row-wide">
Expand Down Expand Up @@ -83,16 +78,16 @@ function give_save_donor_phone_number( $donation_id ){
function give_show_donor_phone_numbers( $donor ) {
$phone_numbers = $donor->get_meta( 'give_phone', false );
?>
<div id="donor-address-wrapper" class="donor-section clear">
<div class="donor-section clear">
<h3><?php esc_html_e( 'Phone Numbers', 'give' ); ?></h3>

<div class="postbox">
<div class="inside">
<?php if ( empty( $phone_numbers ) ) : ?>
<?php esc_html_e( 'This donor does not have any phone number saved.', 'give' ); ?>
<p><?php esc_html_e( 'This donor does not have any phone number saved.', 'give' ); ?></p>
<?php else: ?>
<?php foreach ( $phone_numbers as $phone_number ) : ?>
<?php echo $phone_number; ?><br>
<p><?php echo $phone_number; ?></p>
<?php endforeach; ?>
<?php endif; ?>
</div>
Expand Down

0 comments on commit e23926d

Please sign in to comment.