diff --git a/Products/zms/ZMSItem.py b/Products/zms/ZMSItem.py index 8b40f9546..11b4969d9 100644 --- a/Products/zms/ZMSItem.py +++ b/Products/zms/ZMSItem.py @@ -130,6 +130,7 @@ def zmi_page_request(self, *args, **kwargs): RESPONSE.setHeader('Content-Type', 'text/html;charset=%s'%request['ZMS_CHARSET']) if not request.get( 'preview'): request.set( 'preview', 'preview') + request.set( 'is_zmi', True) langs = self.getLanguages(request) if request.get('lang') not in langs: request.set('lang', langs[0]) diff --git a/Products/zms/_multilangmanager.py b/Products/zms/_multilangmanager.py index 27511fb65..67ed8be12 100644 --- a/Products/zms/_multilangmanager.py +++ b/Products/zms/_multilangmanager.py @@ -237,19 +237,20 @@ def get_manage_lang(self): """ manage_lang = None req = getattr( self, 'REQUEST', None) - if req is not None: - sess = standard.get_session(self) - if 'manage_lang' in req: - manage_lang = req.get('manage_lang') - else: - if sess is not None and 'reset_manage_lang' not in req.form: - manage_lang = sess.get('manage_lang') - if manage_lang is None: - lang = req.get('lang') - if lang in self.getLangIds(): - manage_lang = self.getLang(lang).get('manage') - if sess is not None: - sess.set('manage_lang', manage_lang) + if req.get( 'is_zmi', False): + if req is not None: + sess = standard.get_session(self) + if 'manage_lang' in req: + manage_lang = req.get('manage_lang') + else: + if sess is not None and 'reset_manage_lang' not in req.form: + manage_lang = sess.get('manage_lang') + if manage_lang is None: + lang = req.get('lang') + if lang in self.getLangIds(): + manage_lang = self.getLang(lang).get('manage') + if sess is not None: + sess.set('manage_lang', manage_lang) if manage_lang is None: manage_lang = 'eng' return manage_lang diff --git a/Products/zms/_objinputs.py b/Products/zms/_objinputs.py index dd79c416f..27f65282b 100644 --- a/Products/zms/_objinputs.py +++ b/Products/zms/_objinputs.py @@ -50,7 +50,7 @@ def getUrlInput(self, fmName, elName, elTextName='', size=None, value='', enable # @return String # ---------------------------------------------------------------------------- def getDateTimeInput(self, fmName, elName, size=8, value=None, enabled=True, fmt_str='DATETIME_FMT', css='form-control'): - manage_lang = self.get_manage_lang() + manage_lang = self.REQUEST.get('manage_lang', self.getPrimaryLanguage()) html = [] input_type = 'date' if not isinstance(value, str):