Merge pull request #21177 from colemanw/rand
[civicrm-core.git] / ext / afform / admin / ang / afGuiEditor / config-form.html
1 <ng-form name="config_form">
2
3 <div class="form-group">
4 <label for="af_config_form_title">
5 {{:: ts('Title') }} <span class="crm-marker">*</span>
6 </label>
7 <p class="help-block">{{:: ts('Public title (usually displayed at the top of the form).') }}</p>
8 <input ng-model="editor.afform.title" class="form-control" id="af_config_form_title" required title="{{:: ts('Required') }}" />
9 </div>
10
11 <div class="form-group">
12 <label for="af_config_form_description">
13 {{:: ts('Description') }}
14 </label>
15 <textarea ng-model="editor.afform.description" class="form-control" id="af_config_form_description"></textarea>
16 <p class="help-block">{{:: ts("Internal note about the form's purpose (not displayed on form).") }}</p>
17 <!-- Description is "semi-private": not generally public, but not audited for secrecy -->
18 </div>
19
20 <div class="form-group">
21 <label for="af_config_form_permission">
22 {{:: ts('Permission') }}
23 </label>
24 <input ng-model="editor.afform.permission" class="form-control" id="af_config_form_permission" crm-ui-select="{data: editor.meta.permissions}" />
25 <p class="help-block">{{:: ts('What permission is required to use this form?') }}</p>
26 </div>
27
28 <fieldset>
29 <legend>{{:: ts('Placement') }}</legend>
30
31 <div class="form-group" ng-class="{'has-error': !!config_form.server_route.$error.pattern}">
32 <label for="af_config_form_server_route">
33 {{:: ts('Page') }}
34 </label>
35 <input ng-model="editor.afform.server_route" name="server_route" class="form-control" id="af_config_form_server_route" pattern="^civicrm\/[-0-9a-zA-Z\/_]+$" onfocus="this.value = this.value || 'civicrm/'" onblur="if (this.value === 'civicrm/') this.value = ''" title="{{:: ts('Path must begin with &quot;civicrm/&quot;') }}">
36 <p class="help-block">{{:: ts('Expose the form as a standalone webpage. (Example: "civicrm/my-form")') }}</p>
37 </div>
38
39 <div class="form-group" ng-if="!!editor.afform.server_route">
40 <label>
41 <input type="checkbox" ng-model="editor.afform.is_public">
42 {{:: ts('Accessible on front-end of website') }}
43 </label>
44 </div>
45
46 <div class="form-group" ng-if="!!editor.afform.server_route">
47 <label>
48 <input type="checkbox" ng-model="editor.afform.is_token">
49 {{:: ts('Provide Email Token') }}
50 </label>
51 <p class="help-block">{{:: ts('Allows CiviMail authors to easily link to this page') }}</p>
52 </div>
53
54 <div class="form-group">
55 <label>
56 <input type="checkbox" ng-model="editor.afform.is_dashlet">
57 {{:: ts('Add to Dashboard') }}
58 </label>
59 <p class="help-block">{{:: ts('Allow CiviCRM users to add the form to their home dashboard.') }}</p>
60 </div>
61
62 <div class="form-group">
63 <div class="form-inline">
64 <label>
65 <input type="checkbox" ng-checked="editor.afform.contact_summary" ng-click="editor.toggleContactSummary()">
66 {{:: ts('Add to Contact Summary Page') }}
67 </label>
68 <select class="form-control" ng-model="editor.afform.contact_summary" ng-if="editor.afform.contact_summary">
69 <option value="block">{{:: ts('As Block') }}</option>
70 <option value="tab">{{:: ts('As Tab') }}</option>
71 </select>
72 </div>
73 <p class="help-block">{{:: ts('Placement can be configured using the Contact Layout Editor.') }}</p>
74 </div>
75 <div class="form-group" ng-if="editor.afform.contact_summary && editor.searchDisplay && editor.searchFilters.length > 1">
76 <div class="form-inline">
77 <label for="af_config_form_search_filters">
78 {{:: ts('Filter on:') }}
79 </label>
80 <select class="form-control" id="af_config_form_search_filters" ng-model="editor.searchDisplay.filters">
81 <option ng-repeat="option in editor.searchFilters" value="{{ option.key }}">{{ option.label }}</option>
82 </select>
83 </div>
84 <p class="help-block">{{:: ts('Choose which contact from the search should match the contact being viewed.') }}</p>
85 </div>
86 </fieldset>
87 <fieldset>
88
89 <legend>{{:: ts('Submit Actions') }}</legend>
90
91 <div class="form-group" >
92 <label>
93 <input type="checkbox" ng-model="editor.afform.create_submission" >
94 {{:: ts('Log Submissions') }}
95 </label>
96 <p class="help-block">{{:: ts('Keep a log of the date, time, user, and items saved by each form submission.') }}</p>
97 </div>
98
99 <div class="form-group" ng-class="{'has-error': !!config_form.redirect.$error.pattern}">
100 <label for="af_config_redirect">
101 {{:: ts('Post-Submit Page') }}
102 </label>
103 <input ng-model="editor.afform.redirect" name="redirect" class="form-control" id="af_config_redirect" title="{{:: ts('Post-Submit Page') }}" pattern="^((http|https):\/\/|\/|civicrm\/)[-0-9a-zA-Z\/_.]\S+$" title="{{:: ts('Post-Submit Page must be either an absolute url, a relative url or a path starting with CiviCRM') }}"/>
104 <p class="help-block">{{:: ts('Enter a URL or path that the form should redirect to following a successful submission.') }}</p>
105 </div>
106 </fieldset>
107 </ng-form>