Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F86335983
author_field.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Oct 5, 21:49
Size
506 B
Mime Type
text/x-python
Expires
Mon, Oct 7, 21:49 (2 d)
Engine
blob
Format
Raw Data
Handle
21393706
Attached To
R3600 invenio-infoscience
author_field.py
View Options
from
wtforms
import
TextField
from
invenio.orcid
import
OrcidSearch
__all__
=
[
'AuthorField'
]
class
AuthorField
(
TextField
):
def
__init__
(
self
,
**
kwargs
):
self
.
_icon_html
=
'<i class="icon-user"></i>'
super
(
AuthorField
,
self
)
.
__init__
(
**
kwargs
)
def
pre_validate
(
self
):
return
dict
(
error
=
0
,
error_message
=
''
)
def
autocomplete
(
self
):
orcid
=
OrcidSearch
()
value
=
self
.
data
orcid
.
search_authors
(
value
)
return
orcid
.
get_authors_names
()
Event Timeline
Log In to Comment