Example #1
0
/**
 * 
 *
 * @return array 
 */
function caGetInfoForContributeFormType($ps_form_type)
{
    $o_contribute_config = caGetContributeFormConfig();
    $va_form_types = $o_contribute_config->getAssoc('formTypes');
    $ps_form_type = strtolower($ps_form_type);
    if (isset($va_form_types[$ps_form_type])) {
        return $va_form_types[$ps_form_type];
    }
    return null;
}
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     $this->config = caGetContributeFormConfig();
     MetaTagManager::setWindowTitle($this->request->config->get("app_display_name") . ": " . _t("Contribute"));
     caSetPageCSSClasses(array("contribute"));
 }
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     $this->config = caGetContributeFormConfig();
     if (!$this->config->get('enabled')) {
         $this->notification->addNotification(_t('Contribute form is not enabled'), __NOTIFICATION_TYPE_ERROR__);
         $this->response->setRedirect(caNavUrl($this->request, "", "Front", "Index"));
         return;
     }
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     caSetPageCSSClasses(array("contribute"));
 }