Skip to content

Commit

Permalink
fixup! Use crm-ui-select instead of rt.select2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Tubach committed Feb 14, 2024
1 parent d8139e2 commit 5d31ee9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 317 deletions.
292 changes: 0 additions & 292 deletions ang/angular-select2.js

This file was deleted.

1 change: 0 additions & 1 deletion ang/civiofficeSearchTasks.ang.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
],
'requires' => [
'api4',
'rt.select2',
],
];
34 changes: 19 additions & 15 deletions ang/civiofficeSearchTasks/civiofficeSearchTaskRender.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
<div id="bootstrap-theme">
<form id="renderForm" name="renderForm" class="form-horizontal" ng-controller="civiOfficeSearchTaskRender as $ctrl" ng-submit="$ctrl.render()">
<div class="form-group">
<label for="renderer" class="col-sm-2 control-label">{{ ts('Renderer') }}</label>
<label for="renderer" class="col-sm-2 control-label">{{:: ts('Renderer') }}</label>
<div class="col-sm-10">
<select id="renderer" class="form-control" ng-model="renderer" ng-required="true"
ng-options="renderer as renderer.name for renderer in $ctrl.renderers track by renderer.uri">
</select>
</div>
</div>
<div class="form-group">
<label for="documentUri" class="col-sm-2 control-label">{{ ts('Document') }}</label>
<label for="documentUri" class="col-sm-2 control-label">{{:: ts('Document') }}</label>
<div class="col-sm-10">
<select2 id="documentUri" class="form-control" ng-model="documentUri" ng-required="true"
s2-options="document.uri as document.name for document in $ctrl.documents track by document.uri"
options="{placeholder: ts('Select')}">
</select2>
<select id="documentUri" class="form-control" crm-ui-select="{placeholder: ts('Select'), allowClear: false}" ng-model="documentUri" ng-required="true">
<option></option>
<option ng-repeat="document in $ctrl.documents track by document.uri" value="{{ document.uri }}">
{{ document.name }}
</option>
</select>
</div>
</div>
<div class="form-group">
<label for="mimeType" class="col-sm-2 control-label">{{ ts('File Type') }}</label>
<label for="mimeType" class="col-sm-2 control-label">{{:: ts('File Type') }}</label>
<div class="col-sm-10">
<select id="mimeType" class="form-control" ng-model="mimeType" ng-required="true"
ng-options="key for (key, value) in renderer.supported_output_file_types">
</select>
</div>
</div>
<div class="form-group">
<label for="activityTypeId" class="col-sm-2 control-label">{{ ts('Create Activity') }}</label>
<label for="activityTypeId" class="col-sm-2 control-label">{{:: ts('Create Activity') }}</label>
<div class="col-sm-10">
<select2 id="activityTypeId" class="form-control" ng-model="activityTypeId"
s2-options="activityType.id as activityType.label for activityType in $ctrl.activityTypes track by activityType.id"
options="{placeholder: ts('None'), allowClear: true}">
</select2>
<select id="activityTypeId" class="form-control" crm-ui-select="{placeholder: ts('None')}" ng-model="activityTypeId">
<option></option>
<option ng-repeat="activityType in $ctrl.activityTypes track by activityType.id" value="{{:: activityType.id }}">
{{:: activityType.label }}
</option>
</select>
</div>
</div>

Expand All @@ -48,11 +52,11 @@
<div class="panel-body">
<div class="form-group" ng-repeat="liveSnippet in $ctrl.liveSnippets">
<div class="col-sm-2">
<label for="{{'liveSnippet.' + liveSnippet.name}}" class="control-label">{{ liveSnippet.label }}</label>
<p><small>{{ liveSnippet.description }}</small></p>
<label for="{{:: 'liveSnippet.' + liveSnippet.name }}" class="control-label">{{:: liveSnippet.label }}</label>
<p><small>{{:: liveSnippet.description }}</small></p>
</div>
<div class="col-sm-10">
<textarea id="{{'liveSnippet.' + liveSnippet.name}}" class="form-control" ng-model="liveSnippets[liveSnippet.name]"></textarea>
<textarea id="{{:: 'liveSnippet.' + liveSnippet.name }}" class="form-control" ng-model="liveSnippets[liveSnippet.name]"></textarea>
</div>
</div>
</div>
Expand Down
9 changes: 0 additions & 9 deletions ang/rt.select2.ang.php

This file was deleted.

0 comments on commit 5d31ee9

Please sign in to comment.