mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Fix compatibility issues with new version of select2
This commit is contained in:
@@ -2,12 +2,12 @@ angular.module("admin.users").directive "userSelect", ->
|
||||
scope:
|
||||
user: '&userSelect'
|
||||
model: '=ngModel'
|
||||
link: (scope,element,attrs) ->
|
||||
link: (scope, element, attrs) ->
|
||||
setTimeout ->
|
||||
element.select2
|
||||
multiple: false
|
||||
initSelection: (element, callback) ->
|
||||
callback {id: scope.user().id, email: scope.user().email}
|
||||
callback {id: scope.user()?.id, email: scope.user()?.email}
|
||||
ajax:
|
||||
url: '/admin/search/known_users'
|
||||
datatype: 'json'
|
||||
|
||||
Reference in New Issue
Block a user