src/pyams_thesaurus/widget/interfaces.py
changeset 77 5eb2f0ff9ba3
parent 76 1d0d13ab5665
child 78 8bab1101f4ef
equal deleted inserted replaced
76:1d0d13ab5665 77:5eb2f0ff9ba3
     1 #
       
     2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 # import standard library
       
    17 
       
    18 # import interfaces
       
    19 from z3c.form.interfaces import IWidget
       
    20 
       
    21 # import packages
       
    22 from zope.schema import TextLine
       
    23 
       
    24 
       
    25 class IThesaurusTermWidget(IWidget):
       
    26     """Single term widget"""
       
    27 
       
    28     thesaurus_name = TextLine(title="Thesaurus name",
       
    29                               required=False)
       
    30 
       
    31     extract_name = TextLine(title="Extract name",
       
    32                             required=False)
       
    33 
       
    34 
       
    35 class IThesaurusTermsListWidget(IWidget):
       
    36     """Terms list widget"""
       
    37 
       
    38     thesaurus_name = TextLine(title="Thesaurus name",
       
    39                               required=False,
       
    40                               default='')
       
    41 
       
    42     extract_name = TextLine(title="Extract name",
       
    43                             required=False,
       
    44                             default='')