Browse Source
Merge pull request #2317 from Budibase/fix/make-feedbackform-comment-optional
Makes the NPS Feedback Form options and comments optional
gh-pages
Kevin Åberg Kultalahti
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
10 deletions
-
packages/builder/src/components/feedback/NPSFeedbackForm.svelte
|
|
@ -31,8 +31,8 @@ |
|
|
|
|
|
|
|
|
// Data to send off |
|
|
// Data to send off |
|
|
let rating |
|
|
let rating |
|
|
let improvements |
|
|
let improvements = "" |
|
|
let comment |
|
|
let comment = "" |
|
|
|
|
|
|
|
|
function selectNumber(n) { |
|
|
function selectNumber(n) { |
|
|
rating = n |
|
|
rating = n |
|
|
@ -106,11 +106,7 @@ |
|
|
<Detail size="S">STEP 2 OF 3</Detail> |
|
|
<Detail size="S">STEP 2 OF 3</Detail> |
|
|
<ButtonGroup> |
|
|
<ButtonGroup> |
|
|
<Button secondary on:click={() => (step -= 1)}>Previous</Button> |
|
|
<Button secondary on:click={() => (step -= 1)}>Previous</Button> |
|
|
<Button |
|
|
<Button primary on:click={() => (step += 1)}>Next</Button> |
|
|
disabled={!improvements} |
|
|
|
|
|
primary |
|
|
|
|
|
on:click={() => (step += 1)}>Next</Button |
|
|
|
|
|
> |
|
|
|
|
|
</ButtonGroup> |
|
|
</ButtonGroup> |
|
|
</div> |
|
|
</div> |
|
|
{:else} |
|
|
{:else} |
|
|
@ -121,9 +117,7 @@ |
|
|
<Detail size="S">STEP 3 OF 3</Detail> |
|
|
<Detail size="S">STEP 3 OF 3</Detail> |
|
|
<ButtonGroup> |
|
|
<ButtonGroup> |
|
|
<Button secondary on:click={() => (step -= 1)}>Previous</Button> |
|
|
<Button secondary on:click={() => (step -= 1)}>Previous</Button> |
|
|
<Button disabled={!comment} cta on:click={submitFeedback} |
|
|
<Button cta on:click={submitFeedback}>Complete</Button> |
|
|
>Complete</Button |
|
|
|
|
|
> |
|
|
|
|
|
</ButtonGroup> |
|
|
</ButtonGroup> |
|
|
</div> |
|
|
</div> |
|
|
{/if} |
|
|
{/if} |
|
|
|