Skip to content

Commit

Permalink
fix(form-builder): don't show the question usage when creating a new …
Browse files Browse the repository at this point in the history
…question (#2702)
  • Loading branch information
StephanH90 authored Apr 23, 2024
1 parent 81d14db commit 8278710
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,12 @@
</CfbFormEditor::CfbAdvancedSettings>

<div class="uk-flex uk-flex-between uk-flex-middle uk-flex-row-reverse">
<CfbFormEditor::QuestionUsage
@slug={{changeset-get f.model "slug"}}
class="uk-flex-last"
/>
{{#unless this.isNew}}
<CfbFormEditor::QuestionUsage
@slug={{changeset-get f.model "slug"}}
class="uk-flex-last"
/>
{{/unless}}

<f.submit
@disabled={{f.loading}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ export default class CfbFormEditorQuestion extends Component {
return this.data.lastSuccessful?.value?.[0]?.node;
}

get isNew() {
return !this.changeset.get("id");
}

get prefix() {
return this.calumaOptions.namespace
? `${this.calumaOptions.namespace}-`
Expand Down

0 comments on commit 8278710

Please sign in to comment.