def js(self): add = _(u"Add") add_option = _(u"Add Option") delete_option = _(u"Delete Option") edit_option = _(u"Edit Option") return self.js_template % dict(id=self.id, add=add, add_task=add_option, delete_task=delete_option, edit_task=edit_option)
def js(self): add = translate(_(u"Add"), context=self.request) add_option = translate(_(u"Add Option"), context=self.request) delete_option = translate(_(u"Delete Option"), context=self.request) edit_option = translate(_(u"Edit Option"), context=self.request) return self.js_template % dict(id=self.id, add=add, add_task=add_option, delete_task=delete_option, edit_task=edit_option)
def __init__(self, request): super(TokenInputWidget, self).__init__(request) site = getSite() self.replacements = [] self.options = { 'hintText': site.translate(_(u'Type in a search term')), 'noResultsText': site.translate(_(u'No Results')), 'searchingText': site.translate(_(u'Searching...')), }
class ISimpleRichText(IText): """Interface for the Simple Rich Text field""" iframe_height = Int( title=_("Iframe height"), description=(_("Allow to specify the height of the iframe")), required=False, default=100, ) format_block = Bool(title=_("Format block"), description=(_('Show the "format block" drop down.')), default=True) bold = Bool(title=_("Bold"), description=(_('Show the bold button.')), default=True) italic = Bool(title=_("Italic"), description=(_('Show the italic button.')), default=True) unordered_list = Bool(title=_("Unordered list"), description=(_('Show the unordered list button.')), default=True) link = Bool(title=_("Link"), description=(_('Show the link button.')), default=True) image = Bool(title=_("Image"), description=(_('Show the image button.')), default=True) allow_disable = Bool(title=_("Allow to disable"), description=(_('Allow to disable the editor.')), default=True)