예제 #1
0
 function __construct()
 {
     parent::__construct("NREN/subscriber settings", true, "contactinfo");
     $available_languages = Config::get_config('language.available');
     $this->full_names = Translator::getFullNamesForISOCodes($available_languages);
     $this->form_data['contact_email'] = "";
     $this->form_data['contact_phone'] = "";
     $this->form_data['sanitizedCertPhone'] = "";
     $this->form_data['sanitizedCertEmail'] = "";
     $this->form_data['sanitizedURL'] = "";
     $this->form_data['sanitizedWAYF'] = "";
     $this->form_data['enable_email'] = "";
     $this->form_data['cert_validity'] = "";
     $this->validation_error = false;
 }
예제 #2
0
 /**
  * pre_process()- function to call before render but *after*
  *		  authentication has finished.
  *
  *		  This function will not be of any use if something must
  *		  be done before authentication is run, in a forced
  *		  authenticated setup. (You should do that by doing the
  *		  business needed before calling framework into action).
  *
  * @person : the decorated person (if authenticated)
  */
 function pre_process($person)
 {
     $this->setPerson($person);
     $this->setCA();
     /* if the nren of the useris in maint-mode, trigger a warning here */
     if (!is_null($this->person) && !is_null($this->person->getNREN()) && $this->person->getNREN()->inMaintMode()) {
         $this->tpl->assign('instance', Config::get_config('system_name'));
         $this->tpl->assign('maint_header', $this->translateTag('l10n_nren_maint_header', 'portal_config'));
         $this->tpl->assign('maint_msg', $this->person->getNREN()->getMaintMsg());
         if ($this->person->isAuth() && $this->person->isNRENAdmin()) {
             $this->tpl->assign('mode_toggle', true);
             $this->tpl->assign('mode_toggle_text', $this->translateTag('l10n_nren_maint_mode_text', 'portal_config'));
             $this->tpl->assign('mode_toggle_button', $this->translateTag('l10n_nren_maint_mode_button', 'portal_config'));
         }
         $this->tpl->assign('maint', $this->tpl->fetch('nren_maint.tpl'));
         $this->tpl->display('site.tpl');
         exit(0);
     }
     /* show the available languages in the template */
     $available_languages = Config::get_config('language.available');
     $this->tpl->assign('available_languages', Translator::getFullNamesForISOCodes($available_languages));
     $this->translator->guessBestLanguage($person);
     $this->tpl = $this->translator->decorateTemplate($this->tpl, 'menu');
     $this->tpl = $this->translator->decorateTemplate($this->tpl, $this->dictionary);
     $this->tpl->assign('selected_language', $this->translator->getLanguage());
     return false;
 }