--- a/src/pyams_content/component/extfile/zmi/widget.py Wed Oct 17 15:44:50 2018 +0200
+++ b/src/pyams_content/component/extfile/zmi/widget.py Wed Oct 17 16:10:52 2018 +0200
@@ -9,6 +9,8 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
+from pyams_i18n.interfaces.widget import II18nTextLineWidget
+
__docformat__ = 'restructuredtext'
@@ -24,13 +26,17 @@
from pyams_i18n.widget import I18nTextLineWidget
-class IExtFileTitleFieldWidget(ITextWidget):
- """external file title field widget interface"""
+#
+# External file title field widget
+#
+
+class IExtFileTitleWidget(ITextWidget):
+ """External file title field widget interface"""
@widgettemplate_config(mode=INPUT_MODE, template='templates/extfile-title-input.pt', layer=IFormLayer)
@widgettemplate_config(mode=DISPLAY_MODE, template='templates/extfile-title-display.pt', layer=IFormLayer)
-@implementer_only(IExtFileTitleFieldWidget)
+@implementer_only(IExtFileTitleWidget)
class ExtFileTitleWidget(TextWidget):
"""External file title widget"""
@@ -49,8 +55,21 @@
return FieldWidget(field, ExtFileTitleWidget(request))
+#
+# I18n external file title field widget
+#
+
+class II18nExtFileTitleWidget(II18nTextLineWidget):
+ """I18n external file title field widget interface"""
+
+
+@implementer_only(II18nExtFileTitleWidget)
+class I18nExtFileTitleWidget(I18nTextLineWidget):
+ """I18n external file title widget"""
+
+
def I18nExtFileTitleFieldWidget(field, request):
"""I18n external file title widget factory"""
- widget = I18nTextLineWidget(request)
+ widget = I18nExtFileTitleWidget(request)
widget.widget_factory = ExtFileTitleFieldWidget
return FieldWidget(field, widget)