Skip to content

Commit

Permalink
FormBuilder - Hide configuration options that do not apply to certain…
Browse files Browse the repository at this point in the history
… form types
  • Loading branch information
colemanw committed Nov 24, 2021
1 parent b0518de commit 09a3e37
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ext/afform/admin/ang/afGuiEditor/config-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<label for="af_config_form_title">
{{:: ts('Title') }} <span class="crm-marker">*</span>
</label>
<p class="help-block">{{:: ts('Public title (usually displayed at the top of the form).') }}</p>
<p class="help-block" ng-if=":: editor.afform.type !== 'block'">{{:: ts('Public title (usually displayed at the top of the form).') }}</p>
<input ng-model="editor.afform.title" class="form-control" id="af_config_form_title" required title="{{:: ts('Required') }}" />
</div>

Expand All @@ -17,15 +17,17 @@
<!-- Description is "semi-private": not generally public, but not audited for secrecy -->
</div>

<div class="form-group">
<!-- Form permissions do not apply to blocks -->
<div class="form-group" ng-if=":: editor.afform.type !== 'block'">
<label for="af_config_form_permission">
{{:: ts('Permission') }}
</label>
<input ng-model="editor.afform.permission" class="form-control" id="af_config_form_permission" crm-ui-select="{data: editor.meta.permissions}" />
<p class="help-block">{{:: ts('What permission is required to use this form?') }}</p>
</div>

<fieldset>
<!-- Placement options do not apply to blocks -->
<fieldset ng-if=":: editor.afform.type !== 'block'">
<legend>{{:: ts('Placement') }}</legend>

<div class="form-group" ng-class="{'has-error': !!config_form.server_route.$error.pattern}">
Expand Down Expand Up @@ -84,8 +86,9 @@
<p class="help-block">{{:: ts('Choose which contact from the search should match the contact being viewed.') }}</p>
</div>
</fieldset>
<fieldset>

<!-- Submit actions are only applicable to form types with a submit button (exclude blocks and search forms) -->
<fieldset ng-if=":: editor.afform.type === 'custom'">
<legend>{{:: ts('Submit Actions') }}</legend>

<div class="form-group" >
Expand Down

0 comments on commit 09a3e37

Please sign in to comment.