Skip to content

Commit

Permalink
fixing result output data url
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Jul 25, 2024
1 parent ded5c1e commit fbc768a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [5.0.4]

### Fixed

- Result output configuration for missing link URL.

## [5.0.3]

### Fixed

- Added field validation to the output of the error msg.
- Additional fixes for legacy output data.

Expand Down Expand Up @@ -603,6 +610,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

- Initial production release.

[5.0.3]: https://github.com/infinum/eightshift-forms/compare/5.0.3...5.0.4
[5.0.2]: https://github.com/infinum/eightshift-forms/compare/5.0.2...5.0.3
[5.0.1]: https://github.com/infinum/eightshift-forms/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/infinum/eightshift-forms/compare/5.0.0...5.0.1
Expand Down
2 changes: 1 addition & 1 deletion eightshift-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Description: Eightshift Forms is a complete form builder plugin that utilizes modern Block editor features with multiple third-party integrations, bringing your project to a new level.
* Author: WordPress team @Infinum
* Author URI: https://eightshift.com/
* Version: 5.0.3
* Version: 5.0.4
* Text Domain: eightshift-forms
*
* @package EightshiftForms
Expand Down
31 changes: 14 additions & 17 deletions src/Blocks/custom/forms/components/forms-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
truncateMiddle,
Repeater,
RepeaterItem,
LinkInput,
Toggle,
} from '@eightshift/frontend-libs/scripts';
import { ConditionalTagsFormsOptions } from '../../../components/conditional-tags/components/conditional-tags-forms-options';
Expand Down Expand Up @@ -230,7 +229,7 @@ export const FormsOptions = ({
>
<TextControl
value={formsVariationData?.title}
label={__('Title', 'eightshift-forms')}
placeholder={__('Title', 'eightshift-forms')}
onChange={(value) => {
const newArray = {...formsVariationData};
newArray.title = value;
Expand All @@ -241,7 +240,7 @@ export const FormsOptions = ({

<TextControl
value={formsVariationData?.subtitle}
label={__('Subtitle', 'eightshift-forms')}
placeholder={__('Subtitle', 'eightshift-forms')}
onChange={(value) => {
const newArray = {...formsVariationData};
newArray.subtitle = value;
Expand All @@ -267,30 +266,28 @@ export const FormsOptions = ({
>
<div className='es-border-t-cool-gray-300 es-mt-2 es-pt-2 es-fifty-fifty-h'>
<TextControl
value={item.title}
label={__('Title', 'eightshift-forms')}
value={item.label}
placeholder={__('Label', 'eightshift-forms')}
onChange={(value) => {
const newArray = [...formsVariationDataFiles];
newArray[index].title = value;
newArray[index].label = value;

setAttributes({ [getAttrKey('formsVariationDataFiles', attributes, manifest)]: newArray });
}}
/>

<TextControl
value={item.label}
label={__('Label', 'eightshift-forms')}
value={item.title}
placeholder={__('Title', 'eightshift-forms')}
onChange={(value) => {
const newArray = [...formsVariationDataFiles];
newArray[index].label = value;
newArray[index].title = value;

setAttributes({ [getAttrKey('formsVariationDataFiles', attributes, manifest)]: newArray });
}}
/>
</div>

<Toggle
value={item.url}
checked={item.asFile}
label={__('Use this item as a file or as a link', 'eightshift-forms')}
reducedBottomSpacing
Expand All @@ -309,12 +306,12 @@ export const FormsOptions = ({
/>

{!formsVariationDataFiles[index].asFile &&
<LinkInput
<TextControl
placeholder={__('Link URL', 'eightshift-forms')}
value={item.url}
hideOpensInNewTab
onChange={({ url }) => {
onChange={(value) => {
const newArray = [...formsVariationDataFiles];
newArray[index].url = url;
newArray[index].url = value;

setAttributes({ [getAttrKey('formsVariationDataFiles', attributes, manifest)]: newArray });
}}
Expand Down Expand Up @@ -361,8 +358,8 @@ export const FormsOptions = ({

<div className='es-border-t-cool-gray-300 es-mt-2 es-pt-2 es-fifty-fifty-h'>
<TextControl
placeholder={__('Field Name', 'eightshift-forms')}
value={item.fieldName}
label={__('Field Name', 'eightshift-forms')}
onChange={(value) => {
const newArray = [...formsVariationDataFiles];
newArray[index].fieldName = value;
Expand All @@ -372,7 +369,7 @@ export const FormsOptions = ({
/>
<TextControl
value={item.fieldValue}
label={__('Field Value', 'eightshift-forms')}
placeholder={__('Field Value', 'eightshift-forms')}
onChange={(value) => {
const newArray = [...formsVariationDataFiles];
newArray[index].fieldValue = value;
Expand Down

0 comments on commit fbc768a

Please sign in to comment.