Skip to content

Commit

Permalink
Forms: Fix redirect field styles (#41030)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Jan 14, 2025
1 parent 1f47685 commit 9dd6362
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Forms: Fix redirect field styles
11 changes: 3 additions & 8 deletions projects/packages/forms/src/blocks/contact-form/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@wordpress/block-editor';
import { createBlock, registerBlockVariation } from '@wordpress/blocks';
import {
BaseControl,
Button,
Modal,
PanelBody,
Expand Down Expand Up @@ -198,18 +197,14 @@ export const JetpackContactFormEdit = forwardRef(
) }

{ 'redirect' === customThankyou && (
<BaseControl
label={ __( 'Redirect Address', 'jetpack-forms' ) }
id={ `contact-form-${ instanceId }-thankyou-url` }
__nextHasNoMarginBottom={ true }
>
<div>
<URLInput
id={ `contact-form-${ instanceId }-thankyou-url` }
label={ __( 'Redirect Address', 'jetpack-forms' ) }
value={ customThankyouRedirect }
className="jetpack-contact-form__thankyou-redirect-url"
onChange={ newURL => setAttributes( { customThankyouRedirect: newURL } ) }
/>
</BaseControl>
</div>
) }
</>
);
Expand Down
6 changes: 5 additions & 1 deletion projects/packages/forms/src/blocks/contact-form/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,16 @@
width: 100%;
}

.jetpack-contact-form__thankyou-redirect-url {
min-width: auto;
}

.jetpack-contact-form__thankyou-redirect-url input[type='text'] {
width: 100%;
}

.jetpack-contact-form__thankyou-redirect-url__suggestions {
width: 260px;
width: 230px;
}

.jetpack-contact-form__integration-panel {
Expand Down

0 comments on commit 9dd6362

Please sign in to comment.