suppression du getModelHelpLayout qui est vide depuis des mois
This commit is contained in:
parent
0cc2f2f553
commit
674cedf3e7
|
@ -111,7 +111,6 @@ class TranslationToAddWidget(widgets.BaseWidget):
|
|||
labels = translation.languageLabels
|
||||
layout = X.array()
|
||||
layout += self.getModelErrorLayout(slot, fields)
|
||||
layout += self.getModelHelpLayout(slot, fields)
|
||||
fromSelect = X.select(name = fromFieldName)
|
||||
for value in values:
|
||||
optionAttributes = {}
|
||||
|
|
|
@ -203,7 +203,6 @@ class WidgetMixin(things.ThingMixin):
|
|||
fieldValue = slot.getValue() or ''
|
||||
layout = X.array()
|
||||
layout += self.getModelErrorLayout(slot, fields)
|
||||
layout += self.getModelHelpLayout(slot, fields)
|
||||
inputAttributes = {}
|
||||
layout += X.input(name = fieldName, type = 'text',
|
||||
value = fieldValue, **inputAttributes)
|
||||
|
@ -242,14 +241,6 @@ class WidgetMixin(things.ThingMixin):
|
|||
return None
|
||||
return tagClass(id = 'field-%s' % fieldName)(childrenLayout)
|
||||
|
||||
def getModelHelpLayout(self, slot, fields):
|
||||
## helpAlias = self.getHelpAlias(slot, fields)
|
||||
## if helpAlias and 'pagenames' in context.getVar('knownRoles') and \
|
||||
## getWebForServerRole('pagenames').getIdByName(helpAlias):
|
||||
## return X.a(_class = 'online-help',
|
||||
## href = X.aliasUrl(helpAlias))(_('help'))
|
||||
return None
|
||||
|
||||
def getModelHiddenLayout(self, slot, fields):
|
||||
fieldName = slot.getFieldName()
|
||||
value = slot.getValue()
|
||||
|
@ -376,7 +367,6 @@ class InputTextMixin(WidgetMixin):
|
|||
|
||||
layout = X.array()
|
||||
#layout += self.getModelErrorLayout(slot, fields)
|
||||
#layout += self.getModelHelpLayout(slot, fields)
|
||||
|
||||
inputAttributes = {}
|
||||
maxLength = slot.getKind().getTextMaxLength()
|
||||
|
@ -428,7 +418,6 @@ class ThingMixin(WidgetMixin):
|
|||
else:
|
||||
layout = X.array(
|
||||
self.getModelErrorLayout(slot, fields),
|
||||
self.getModelHelpLayout(slot, fields),
|
||||
X.div(value.getFieldValueChildrenEditLayout(
|
||||
fields, parentSlot = parentSlot)))
|
||||
return layout
|
||||
|
@ -1146,7 +1135,6 @@ class RadioButtons(ExclusiveChoiceMixin, proxyWidgets.RadioButtons):
|
|||
layout += self.getHtmlReadOnlyValue(slot, fields, **keywords)
|
||||
return layout
|
||||
|
||||
layout += self.getModelHelpLayout(slot, fields)
|
||||
for itemValue in values:
|
||||
inputAttributes = {}
|
||||
itemValueAsString = kind.getModelValueAsString(itemValue)
|
||||
|
@ -1230,9 +1218,6 @@ class Select(ExclusiveChoiceMixin, proxyWidgets.Select):
|
|||
layout += self.getHtmlReadOnlyValue(slot, fields, **keywords)
|
||||
return layout
|
||||
|
||||
|
||||
layout += self.getModelHelpLayout(slot, fields)
|
||||
|
||||
groupedValues = {}
|
||||
if hasattr(kind, 'getGroupedValues'):
|
||||
groupedValues = kind.getGroupedValues(slot)
|
||||
|
@ -1320,65 +1305,6 @@ class SelectId(Select, proxyWidgets.SelectId):
|
|||
onClick = 'selectOthers(this.parentNode, "%s")' % url,
|
||||
value = _('Others'))
|
||||
return layout
|
||||
|
||||
### def getHtmlFormValue(self, slot, fields, **keywords):
|
||||
### fieldName = slot.getFieldName()
|
||||
### try:
|
||||
### fieldValue = slot.getValue()
|
||||
### except IndexError:
|
||||
### fieldValue = ''
|
||||
###
|
||||
### layout = X.array()
|
||||
### kind = slot.getKind()
|
||||
### serverRoles = kind.getServerRoles(slot)
|
||||
### if serverRoles is None:
|
||||
### serverRoles = context.getVar('knownRoles')
|
||||
### serverRoles = serverRoles[:]
|
||||
### serverRoles.sort()
|
||||
### menus = {}
|
||||
###
|
||||
### showOthersButton = self.showOthersButton
|
||||
###
|
||||
### values = kind.getValues(slot)
|
||||
### for serverRole in serverRoles:
|
||||
### ids = [x for x in values if commonTools.extractRole(x) == serverRole]
|
||||
### if not ids:
|
||||
### continue
|
||||
### menus[serverRole] = getObjectLabelsTranslated(
|
||||
### ids, context.getVar('readLanguages'))
|
||||
###
|
||||
### if menus:
|
||||
### showFullList = None
|
||||
### showOthersButton = 0
|
||||
### else:
|
||||
### showFullList = webTools.getConfig(
|
||||
### 'ShowFullListInSelectIdForServerRoles', default = '')
|
||||
### showFullList = [x.strip() for x in showFullList.split(',')]
|
||||
### showFullList.sort()
|
||||
### if serverRoles == showFullList:
|
||||
### showOthersButton = 0
|
||||
###
|
||||
### selectAttributes = {}
|
||||
### selectAttributes['name'] = fieldName
|
||||
###
|
||||
### layout += X.menuIds(
|
||||
### serverRoles, attributes = selectAttributes,
|
||||
### fieldValue = fieldValue, fullRoles = showFullList,
|
||||
### menus = menus, noneLabel = self.noneLabel,
|
||||
### permanentIds = kind.permanentIds)
|
||||
### if showOthersButton:
|
||||
### roles = []
|
||||
### for role in serverRoles:
|
||||
### web = getWebForServerRole(role)
|
||||
### if hasattr(web, 'useObjectIds') and web.useObjectIds:
|
||||
### roles.append(role)
|
||||
### roles = ','.join(roles)
|
||||
### url = X.url('/selectOthers').add('roles', roles)
|
||||
### layout += X.input(
|
||||
### _class = 'button others', type = 'button',
|
||||
### onClick = 'selectOthers(this.parentNode, "%s")' % url,
|
||||
### value = _('Others'))
|
||||
### return layout
|
||||
register(SelectId)
|
||||
|
||||
|
||||
|
|
Reference in New Issue