Skip to content

Commit

Permalink
phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Barny-Thorpe committed Apr 5, 2024
1 parent e4fdb96 commit dd216ed
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/GfGiftAidField.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function run(): void
GFAddOn::register(AddOn::class);

add_action('gform_field_standard_settings', [static::class, 'addSelectedPriceFieldSetting'], 10, 2);
add_action('gform_editor_js', [static::class, 'addSelectedPriceFieldScript']);
add_action('gform_editor_js', [static::class, 'addSelectedPriceFieldScript']);
}

/**
Expand All @@ -43,13 +43,17 @@ public static function addSelectedPriceFieldSetting(int $position, int $form_id)
return;
}

?>
?>
<li class="selected_price_field_setting field_setting">
<label for="selected_price_field_dropdown" class="section_label">
<?php esc_html_e('Price Field', 'itineris-gf-giftaid-field'); ?>
</label>

<select name="donation_total" id="selected_price_field_dropdown" onchange="SetFieldProperty('selectedPriceField', this.value);">
<select
name="donation_total"
id="selected_price_field_dropdown"
onchange="SetFieldProperty('selectedPriceField', this.value);"
>
<option value="">--Please select a field--</option>

<?php foreach ($field_options as $field_id => $field_label) : ?>
Expand All @@ -65,12 +69,12 @@ public static function addSelectedPriceFieldSetting(int $position, int $form_id)
<?php endforeach; ?>
</select>
</li>
<?php
<?php
}

public static function addSelectedPriceFieldScript()
public static function addSelectedPriceFieldScript(): void
{
?>
?>
<script type='text/javascript'>
//adding setting to fields of type "text"
fieldSettings.text += ', .selected_price_field_setting';
Expand All @@ -90,7 +94,7 @@ public static function addSelectedPriceFieldScript()
selectedPriceDropdown.value = savedValue;
});
</script>
<?php
<?php
}

/**
Expand Down

0 comments on commit dd216ed

Please sign in to comment.