Commit | Line | Data |
---|---|---|
25523059 | 1 | <div class="form-inline"> |
173405e2 | 2 | <input class="form-control" style="width: 15em;" ng-model="$ctrl.fnName" crm-ui-select="{data: $ctrl.getFunctions, placeholder: ts('Function')}" ng-change="$ctrl.selectFunction()"> |
2929fd34 | 3 | <label>{{ $ctrl.fieldArg.field.label }}</label> |
22837cc5 CW |
4 | <label ng-repeat="(val, label) in $ctrl.fn.params[0].flag_before"> |
5 | <input type="checkbox" ng-checked="$ctrl.fieldArg.flag_before === val" ng-click="$ctrl.fieldArg.flag_before = ($ctrl.fieldArg.flag_before === val ? null : val); $ctrl.writeExpr();" > | |
6 | {{ label }} | |
f99d41d2 | 7 | </label> |
2929fd34 | 8 | <div class="form-group" ng-repeat="arg in $ctrl.args" ng-if="arg !== $ctrl.fieldArg"> |
22837cc5 CW |
9 | <select class="form-control" ng-if="$index && $ctrl.getParam($index).flag_before" ng-model="arg.flag_before" ng-change="$ctrl.writeExpr();"> |
10 | <option ng-repeat="(val, label) in $ctrl.getParam($index).flag_before" value="{{ val }}"> | |
11 | {{ label }} | |
12 | </option> | |
13 | </select> | |
173405e2 | 14 | <span ng-switch="arg.type"> |
9e9feedf CW |
15 | <input ng-switch-when="number" class="form-control" type="number" ng-model="arg.value" placeholder="{{ $ctrl.getParam($index).label }}" ng-change="$ctrl.changeArg($index)" ng-model-options="{updateOn: 'blur'}"> |
16 | <input ng-switch-when="string" class="form-control" ng-model="arg.value" placeholder="{{ $ctrl.getParam($index).label }}" ng-change="$ctrl.changeArg($index)" ng-trim="false" ng-model-options="{updateOn: 'blur'}"> | |
17 | <input ng-switch-default class="form-control" ng-model="arg.value" crm-ui-select="{data: $ctrl.getFields, placeholder: $ctrl.getParam($index).label}" ng-change="$ctrl.changeArg($index)"> | |
173405e2 CW |
18 | </span> |
19 | </div> | |
9e9feedf | 20 | <div class="btn-group" ng-if="$ctrl.canAddArg()"> |
b0b41c64 | 21 | <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
173405e2 CW |
22 | <i class="crm-i fa-plus"></i> <span class="caret"></span> |
23 | </button> | |
24 | <ul class="dropdown-menu"> | |
9e9feedf | 25 | <li ng-repeat="(name, type) in $ctrl.exprTypes" ng-show="$ctrl.getParam($ctrl.args.length).must_be.indexOf(name) >= 0"> |
173405e2 CW |
26 | <a href ng-click="$ctrl.addArg(name)">{{ type.label }}</a> |
27 | </li> | |
28 | </ul> | |
29 | </div> | |
25523059 | 30 | </div> |