Changeset 12232 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 14 Dec 2014, 21:41:02 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r12180 r12232 42 42 from zope.session.interfaces import ISession 43 43 from zope.password.interfaces import IPasswordManager 44 from waeup.kofa.utils.helpers import html2dict 44 45 from waeup.kofa.browser.layout import ( 45 46 KofaPage, KofaForm, KofaEditFormPage, KofaAddFormPage, … … 66 67 from waeup.kofa.university.vocabularies import course_levels 67 68 from waeup.kofa.authentication import LocalRoleSetEvent 68 from waeup.kofa.widgets.htmlwidget import HTMLDisplayWidget69 69 from waeup.kofa.utils.helpers import get_user_account, check_csv_charset 70 70 from waeup.kofa.mandates.mandate import PasswordMandate … … 765 765 # 766 766 767 class ConfigurationContainerDisplayFormPage(KofaDisplayFormPage):768 """View page of the configuration container.769 """770 grok.require('waeup.managePortalConfiguration')771 grok.name('view')772 grok.context(IConfigurationContainer)773 pnav = 0774 label = _(u'View portal configuration')775 form_fields = grok.AutoFields(IConfigurationContainer)776 form_fields['frontpage'].custom_widget = HTMLDisplayWidget777 778 779 767 class ConfigurationContainerManageFormPage(KofaEditFormPage): 780 768 """Manage page of the configuration container. We always use the … … 794 782 'frontpage_dict') 795 783 796 def _frontpage(self):797 view = ConfigurationContainerDisplayFormPage(798 self.context,self.request)799 view.setUpWidgets()800 return view.widgets['frontpage']()801 802 784 @action(_('Save'), style='primary') 803 785 def save(self, **data): 804 786 msave(self, **data) 805 self.context.frontpage_dict = self._frontpage() 787 frontpage = getattr(self.context, 'frontpage', None) 788 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 789 self.context.frontpage_dict = html2dict(frontpage, portal_language) 806 790 return 807 791
Note: See TracChangeset for help on using the changeset viewer.