1 <div af-api4-ctrl=
"apiData" af-api4=
"['Afform', 'get', {layoutFormat: 'html', where: [['name', '=', options.name]]}]">
3 <div ng-if=
"apiData.result.length == 0">
4 {{ts('Failed to find requested form.')}}
7 <div ng-repeat=
"resultForm in apiData.result" ng-if=
"apiData.result.length > 0" class=
"container-fluid">
11 <div class=
"col-sm-12 col-md-4">
12 <div class=
"panel panel-default">
13 <div class=
"panel-heading">{{ts('Properties')}}
</div>
14 <div class=
"panel-body">
16 <div crm-ui-debug=
"resultForm"></div>
18 <div class=
"form-group">
19 <label class=
"control-label">{{ts('Name')}}
</label>
20 <p class=
"form-control-static">{{resultForm.name}}
</p>
22 <div class=
"form-group">
23 <label class=
"control-label">{{ts('Title')}}
</label>
24 <input ng-model=
"resultForm.title" type=
"text" class=
"form-control" />
26 <div class=
"form-group">
27 <label class=
"control-label">{{ts('Description')}}
</label>
28 <textarea class=
"form-control" ng-model=
"resultForm.description"></textarea>
29 <p class=
"help-block">{{ts('Semi-private description about the form\'s purpose.')}}
</p>
30 <!-- "Semi-private": not generally public, but not audited for secrecy -->
32 <div class=
"form-group">
33 <label class=
"control-label">{{ts('Path')}}
</label>
34 <input ng-model=
"resultForm.server_route" type=
"text" class=
"form-control" />
35 <p class=
"help-block">{{ts('Expose the form as a standalone page on the web site. (Example:
"civicrm/my-form")')}}
</p>
37 <div class=
"form-group" ng-if=
"!!resultForm.server_route">
38 <label for=
"af_config_form_is_public">
39 <input type=
"checkbox" id=
"af_config_form_is_public" ng-model=
"resultForm.is_public">
40 {{ ts('Enable frontend styling') }}
42 <p class=
"help-block">{{ts('The general look/feel should match the frontend')}}
</p>
44 <div class=
"form-group">
45 <label for=
"af_config_form_is_dashlet">
46 <input type=
"checkbox" id=
"af_config_form_is_dashlet" ng-model=
"resultForm.is_dashlet">
47 {{ ts('Enable dashlet') }}
49 <p class=
"help-block">{{ts('Allow backend users to embed the form on the dashboard.')}}
</p>
51 <div class=
"form-group">
52 <label class=
"control-label">{{ts('Permission')}}
</label>
53 <input ng-model=
"resultForm.permission" type=
"text" class=
"form-control" />
54 <p class=
"help-block">{{ts('What permission is required to use this form?')}}
</p>
59 <div class=
"clearfix"></div>
62 <div class=
"col-sm-12 col-md-8">
63 <div class=
"panel panel-default">
64 <div class=
"panel-heading">
65 <div class=
"btn-group btn-group-xs pull-right" role=
"group" aria-label=
"{{ts('Actions')}}">
67 <a class=
"btn btn-default" target=
"_blank" ng-href=
"{{crmUrl(resultForm.server_route)}}" ng-if=
"resultForm.server_route">
68 <i class=
"crm-i fa-location-arrow"></i>
72 <a class=
"btn btn-default"
73 af-api4-action=
"['Afform', 'update', {layoutFormat: 'html', where: [['name', '=', resultForm.name]], values:resultForm}]">
74 <i class=
"crm-i fa-floppy-o"></i>
82 <div class=
"panel-body">
83 <div crm-monaco
ng-model=
"resultForm.layout"></div>