mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-23 17:34:17 +03:00
Fixes for new admin gui
This commit is contained in:
parent
857be90128
commit
d0c9ca6234
@ -54,7 +54,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__updated__ = '2018-10-29'
|
||||
__updated__ = '2018-11-05'
|
||||
|
||||
# a few constants
|
||||
OVERVIEW = 'overview'
|
||||
@ -896,7 +896,7 @@ class ModelHandler(BaseModelHandler):
|
||||
# Now if tags, update them
|
||||
if tags is not None:
|
||||
logger.debug('Updating tags: {}'.format(tags))
|
||||
item.tags.set([ Tag.objects.get_or_create(tag=val)[0] for val in tags])
|
||||
item.tags.set([ Tag.objects.get_or_create(tag=val)[0] for val in tags if val != ''])
|
||||
|
||||
except self.model.DoesNotExist:
|
||||
raise NotFound('Item not found')
|
||||
|
@ -781,7 +781,7 @@ class UserInterfaceType(type):
|
||||
better place
|
||||
"""
|
||||
|
||||
def __new__(mcs, classname, bases, classDict):
|
||||
def __new__(cls, classname, bases, classDict):
|
||||
newClassDict = {}
|
||||
_gui = {}
|
||||
# We will keep a reference to gui elements also at _gui so we can access them easily
|
||||
@ -790,10 +790,10 @@ class UserInterfaceType(type):
|
||||
_gui[attrName] = attr
|
||||
newClassDict[attrName] = attr
|
||||
newClassDict['_gui'] = _gui
|
||||
return type.__new__(mcs, classname, bases, newClassDict)
|
||||
return type.__new__(cls, classname, bases, newClassDict)
|
||||
|
||||
|
||||
#@six.add_metaclass(UserInterfaceType)
|
||||
# @six.add_metaclass(UserInterfaceType)
|
||||
class UserInterface(object, metaclass=UserInterfaceType):
|
||||
"""
|
||||
This class provides the management for gui descriptions (user forms)
|
||||
|
@ -120,6 +120,15 @@ class Provider(ServiceProvider):
|
||||
defvalue=gui.TRUE # : By default, at new item, check this
|
||||
)
|
||||
|
||||
methText = gui.TextField(order=5,
|
||||
length=512,
|
||||
multiline=5,
|
||||
label=_('Text area'),
|
||||
tooltip=_('This is a text area'),
|
||||
requred=False,
|
||||
defvalue='Write\nsomething' # : This will not get translated
|
||||
)
|
||||
|
||||
# There is more fields type, but not here the best place to cover it
|
||||
def initialize(self, values=None):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user