Changeset 12229 for main/waeup.ikoba/trunk/src/waeup/ikoba/browser
- Timestamp:
- 14 Dec 2014, 15:45:55 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/layout.py
r11958 r12229 201 201 if 'address' in widget.name or \ 202 202 'comment' in widget.name or \ 203 'description' in widget.name or \ 203 204 'notice' in widget.name: 204 widget.height = 6 205 if self.widgets.get('transcript_comment'): 206 self.widgets['transcript_comment'].height = 12 207 if self.widgets.get('jamb_subjects'): 208 self.widgets['jamb_subjects'].height = 6 205 widget.height = 3 209 206 210 207 class IkobaAddFormPage(UtilityView,AddForm): -
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/pages.py
r12192 r12229 42 42 from zope.session.interfaces import ISession 43 43 from zope.password.interfaces import IPasswordManager 44 from waeup.ikoba.utils.helpers import html2dict 44 45 from waeup.ikoba.browser.layout import ( 45 46 IkobaPage, IkobaForm, IkobaEditFormPage, IkobaAddFormPage, … … 60 61 61 62 from waeup.ikoba.authentication import LocalRoleSetEvent 62 from waeup.ikoba.widgets.htmlwidget import HTMLDisplayWidget63 63 from waeup.ikoba.utils.helpers import get_user_account, check_csv_charset 64 64 from waeup.ikoba.mandates.mandate import PasswordMandate … … 723 723 # 724 724 725 class ConfigurationContainerDisplayFormPage(IkobaDisplayFormPage):726 """View page of the configuration container.727 """728 grok.require('waeup.managePortalConfiguration')729 grok.name('view')730 grok.context(IConfigurationContainer)731 pnav = 0732 label = _(u'View portal configuration')733 form_fields = grok.AutoFields(IConfigurationContainer)734 form_fields['frontpage'].custom_widget = HTMLDisplayWidget735 736 737 725 class ConfigurationContainerManageFormPage(IkobaEditFormPage): 738 726 """Manage page of the configuration container. We always use the … … 747 735 'frontpage_dict') 748 736 749 def _frontpage(self):750 view = ConfigurationContainerDisplayFormPage(751 self.context,self.request)752 view.setUpWidgets()753 return view.widgets['frontpage']()754 755 737 @action(_('Save'), style='primary') 756 738 def save(self, **data): 757 739 msave(self, **data) 758 self.context.frontpage_dict = self._frontpage() 740 frontpage = getattr(self.context, 'frontpage', None) 741 portal_language = getUtility(IIkobaUtils).PORTAL_LANGUAGE 742 self.context.frontpage_dict = html2dict(frontpage, portal_language) 759 743 return 760 744
Note: See TracChangeset for help on using the changeset viewer.