crmFormProcessorValidationConfiguration.html 1.67 KB
Newer Older
jaapjansma's avatar
jaapjansma committed
1
2
3
4
<ng-repeat ng-repeat="spec in configurationSpec">
  <div crm-ui-field="spec.crmUiField"
       ng-if="spec.options">
    <select crm-ui-id="{{spec.name}}"
5
            crm-form-processor-select2="{allowClear: true, minimumInputLength: 0}"
jaapjansma's avatar
jaapjansma committed
6
7
8
9
            name="{{spec.name}}"
            ng-if="!spec.multiple"
            ng-model="configuration[spec.name]"
            ng-required="spec.required"
jaapjansma's avatar
jaapjansma committed
10
            class="huge"
jaapjansma's avatar
jaapjansma committed
11
12
13
    >
      <option ng-repeat="(key,value) in spec.options" value="{{key}}">{{value}}</option>
    </select>
jaapjansma's avatar
jaapjansma committed
14
    <select class="huge"
jaapjansma's avatar
jaapjansma committed
15
      crm-ui-id="{{spec.name}}"
16
      crm-form-processor-select2="{allowClear: true, minimumInputLength: 0}"
jaapjansma's avatar
jaapjansma committed
17
18
19
20
21
22
23
24
25
26
27
      name="{{spec.name}}"
      ng-if="spec.multiple"
      ng-model="configuration[spec.name]"
      ng-required="spec.required"
      multiple="multiple"
    >
      <option ng-repeat="(key,value) in spec.options" value="{{key}}">{{value}}</option>
    </select>
  </div>
  <div crm-ui-field="spec.crmUiField"
       ng-if="spec.fk_entity">
jaapjansma's avatar
jaapjansma committed
28
29
    <input class="huge"
      crm-entityref="{entity: spec.fk_entity, select: {allowClear: true, placeholder: spec.title, minimumInputLength: 0}}"
jaapjansma's avatar
jaapjansma committed
30
31
32
33
34
35
36
37
38
      crm-ui-id="{{spec.name}}"
      name="{{spec.name}}"
      ng-model="configuration[spec.name]"
      ng-required="spec.required"
    />
  </div>
  <div crm-ui-field="spec.crmUiField"
       ng-if="!spec.options && !spec.fk_entity">
    <input
jaapjansma's avatar
jaapjansma committed
39
      class="huge crm-form-text"
jaapjansma's avatar
jaapjansma committed
40
41
42
43
44
45
46
47
      crm-ui-id="{{spec.name}}"
      name="{{spec.name}}"
      ng-model="configuration[spec.name]"
      ng-required="spec.required"
      type="text"
    />
  </div>
  <div class="description" ng-bind-html="spec.description" ng-if="spec.description"></div>
48
49
50
</ng-repeat>