64 lines
2.0 KiB
HTML
64 lines
2.0 KiB
HTML
<div class="form-group"
|
|
ng-if="!enabled || !showForm">
|
|
|
|
<p class="form-control-static">
|
|
<i class="fa fa-sb-user text-muted"
|
|
ng-if="!user || user.$resolved"></i>
|
|
<i class="fa fa-spin fa-refresh text-muted"
|
|
ng-if="user && !user.$resolved"></i>
|
|
|
|
|
|
<span ng-if="user && enabled">{{user.full_name}}
|
|
<{{user.email}}></span>
|
|
|
|
|
|
<a href=""
|
|
ng-focus="toggleForm()"
|
|
ng-click="toggleForm()"
|
|
ng-if="!showForm && enabled">
|
|
<span ng-if="user">
|
|
<i class="fa fa-pencil"></i>
|
|
</span>
|
|
<em ng-if="!user" class="text-muted">
|
|
{{emptyPrompt}}
|
|
<i class="fa fa-pencil"></i>
|
|
</em>
|
|
</a>
|
|
|
|
<span ng-if="user && !enabled">
|
|
{{user.full_name}}
|
|
</span>
|
|
|
|
<em class="text-muted"
|
|
ng-if="!user && !enabled">
|
|
{{emptyDisabledPrompt}}
|
|
</em>
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group has-feedback has-feedback-no-label"
|
|
ng-if="enabled && showForm">
|
|
<input id="input"
|
|
type="text"
|
|
class="form-control"
|
|
focus="autoFocus"
|
|
ng-blur="toggleForm($event)"
|
|
ng-keydown="handleEscapeKey($event)"
|
|
ng-keypress="handleEnterKey($event)"
|
|
typeahead-editable="false"
|
|
typeahead-wait-ms="200"
|
|
typeahead="user as formatUserName(user) + ' <' + user.email + '>' + for user in searchUsers($viewValue)"
|
|
typeahead-loading="loadingUsers"
|
|
typeahead-input-formatter="formatUserName($model)"
|
|
typeahead-on-select="updateViewValue($model.id);"
|
|
placeholder="{{placeholder}}"
|
|
ng-model="selectedUser"/>
|
|
|
|
<span class="form-control-feedback text-muted">
|
|
<i class="fa fa-search" ng-if="!loadingUsers"></i>
|
|
<i class="fa fa-spin fa-refresh" ng-if="loadingUsers"></i>
|
|
</span>
|
|
</div>
|