Exemplo n.º 1
0
 def _process( self ):
     if not self._cancel:
         sesForm = self._conf.getRegistrationForm().getSessionsForm()
         for id in self._sessionIds:
             s = self._conf.getSessionById(id)
             rs = s.getRegistrationSession()
             if not rs:
                 rs = RegistrationSession(s, self._conf.getRegistrationForm())
             else:
                 rs.setRegistrationForm(self._conf.getRegistrationForm())
             sesForm.addSession(rs)
     self._redirect(urlHandlers.UHConfModifRegFormSessions.getURL(self._conf))
Exemplo n.º 2
0
 def _process(self):
     if not self._cancel:
         sesForm = self._conf.getRegistrationForm().getSessionsForm()
         for id in self._sessionIds:
             s = self._conf.getSessionById(id)
             rs = s.getRegistrationSession()
             if not rs:
                 rs = RegistrationSession(s,
                                          self._conf.getRegistrationForm())
             else:
                 rs.setRegistrationForm(self._conf.getRegistrationForm())
             sesForm.addSession(rs)
     self._redirect(
         urlHandlers.UHConfModifRegFormSessions.getURL(self._conf))
 def _setItems(self):
     for item in self._items:
         session = self._section.getSessionById(item.get('id'))
         if session is not None:
             session.setValues(item)
             if not item.get('enabled'):
                 self._section.removeSession(item.get('id'))
         else:
             session = self._conf.getSessionById(item.get('id'))
             if(item.get('enabled')):
                 s = self._conf.getSessionById(item.get('id'))
                 rs = session.getRegistrationSession()
                 if not rs:
                     rs = RegistrationSession(s, self._regForm)
                 else:
                     rs.setRegistrationForm(self._regForm)
                 self._section.addSession(rs)
                 rs.setValues(item)
Exemplo n.º 4
0
 def _setItems(self):
     for item in self._items:
         session = self._section.getSessionById(item.get('id'))
         if session is not None:
             session.setValues(item)
             if not item.get('enabled'):
                 self._section.removeSession(item.get('id'))
         else:
             session = self._conf.getSessionById(item.get('id'))
             if (item.get('enabled')):
                 s = self._conf.getSessionById(item.get('id'))
                 rs = session.getRegistrationSession()
                 if not rs:
                     rs = RegistrationSession(s, self._regForm)
                 else:
                     rs.setRegistrationForm(self._regForm)
                 self._section.addSession(rs)
                 rs.setValues(item)