Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: extract the feature flag for option-based form editor from campaigns domain into the core #7593

Merged
merged 9 commits into from
Nov 20, 2024
85 changes: 84 additions & 1 deletion assets/src/css/admin/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,90 @@ div.give-field-description {
}
}

.give_option_based_form_editor_notice {
display: flex;
margin: -2rem 0;
gap: 0.3rem;
padding: 0.5rem;
background-color: #fffaf2;
border-radius: 4px;
border: 1px solid #f29718;
border-left-width: 4px;
font-size: 0.875rem;
font-weight: 500;
color: #1a0f00;
line-height: 1.25rem;
max-width: 60rem;
width: 100%;

svg {
margin: 0.4rem 0.3rem;
height: 1.25rem;
width: 1.25rem;
}
}

.give-setting-tab-body-general,
.give-setting-tab-body-display,
.give-settings-advanced-tab {
label {
display: flex;
gap: 0.4rem;
padding: 1.25rem 1rem;
position: relative;
jonwaldstein marked this conversation as resolved.
Show resolved Hide resolved

.give-settings-section-group-helper {
--popout-display: none;
display: flex;
cursor: help;

img {
max-width: 18.9px;
}

&:hover {
--popout-display: block;
}

&__popout {
background-color: #fff;
border: 1px solid #e6e6e6;
border-radius: 4px;
box-shadow: 0 4px 8px 0 #0000000D;
color: #404040;
display: var(--popout-display, none);
left: 100%;
overflow: hidden;
position: absolute;
top: 0;
transform: translateX(10px);
z-index: 9999;

img {
max-width: initial;
display: block;
}

h5 {
font-size: 0.875rem;
font-weight: 700;
line-height: 1.5;
margin: 0;
padding: 1rem 1.5rem 0.5rem;
}

p {
font-size: 0.75rem;
font-weight: 500;
line-height: 1.5;
margin: 0;
padding: 0 1.5rem 1.5rem;
}
}
}
}
}

.give-payment-gateways-settings {
&.give-settings-section-content {
.give-settings-section-group-menu {
Expand Down Expand Up @@ -917,7 +1001,6 @@ a.give-delete {
}

img {
object-fit: contain;
width: 100%;
}

Expand Down
3 changes: 2 additions & 1 deletion give.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ final class Give
Give\BetaFeatures\ServiceProvider::class,
Give\FormTaxonomies\ServiceProvider::class,
Give\DonationSpam\ServiceProvider::class,
Give\Settings\ServiceProvider::class
Give\Settings\ServiceProvider::class,
Give\FeatureFlags\OptionBasedFormEditor\ServiceProvider::class,
];

/**
Expand Down
4 changes: 3 additions & 1 deletion includes/admin/class-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,9 @@ class="give-input-field<?php echo( empty( $value['class'] ) ? '' : ' ' . esc_att
?>
<tr valign="top" <?php echo $wrapper_class; ?>>
<th scope="row" class="titledesc">
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_attr( self::get_field_title( $value ) ); ?></label>
<label for="<?php
echo esc_attr($value['id']); ?>"><?php
echo wp_kses_post(self::get_field_title($value)); ?></label>
</th>
<td class="give-forminp give-forminp-<?php echo esc_attr( $value['type'] ); ?>">
<select
Expand Down
Loading
Loading