Skip to content

Commit

Permalink
ON-43906 # Add enableSubmission to Form
Browse files Browse the repository at this point in the history
  • Loading branch information
kizaonline committed Oct 2, 2024
1 parent 5b2fcff commit feef5c6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Added

- `enableSubmission` to `Form`

## [8.0.0] - 2024-09-25

### Removed
Expand Down
8 changes: 7 additions & 1 deletion OneBlink.SDK/models/Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public Form(
bool continueWithAutosave = false,
List<string> customCssClasses = default,
Guid? pointAddressEnvironmentId = null,
bool? allowGeoscapeAddresses = null
bool? allowGeoscapeAddresses = null,
FormEnableSubmission enableSubmission = null
)
{
if (id.HasValue)
Expand Down Expand Up @@ -151,6 +152,7 @@ public Form(
}
this.pointAddressEnvironmentId = pointAddressEnvironmentId ?? null;
this.allowGeoscapeAddresses = allowGeoscapeAddresses ?? null;
this.enableSubmission = enableSubmission;
}
public long id
{
Expand Down Expand Up @@ -296,5 +298,9 @@ public bool? allowGeoscapeAddresses
{
get; set;
}
public FormEnableSubmission enableSubmission
{
get; set;
}
}
}
16 changes: 16 additions & 0 deletions OneBlink.SDK/models/FormEnableSubmission.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace OneBlink.SDK.Model
{
public class FormEnableSubmission
{
public bool requiresAllConditionalPredicates
{
get; set;
}
public List<ConditionallyShowPredicate> conditionalPredicates
{
get; set;
}
}

}
1 change: 1 addition & 0 deletions docs/models/Form.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
| `pointAddressEnvironmentId` | No | `Guid?` | Optional except when `elements` contains a Point Address element | `null` |
| `allowGeoscapeAddresses` | No | `bool?` | Optional configuration to allow use of Geoscape elements on the form | `null` |
| `slug` | No | `string` | Unique domain safe text to identify the form | `null` |
| `enableSubmission` | No | `FormEnableSubmission` | Conditionally enable form submission | `null` |

### Other properties

Expand Down

0 comments on commit feef5c6

Please sign in to comment.