/** * Displays the field for creation. * * @author Jason Rey <*****@*****.**> * @since 1.3 * @access public * @param array $post The posted data. * @param SocialTableStepSession $session The session table. * @return string The html codes for this field. */ public function onRegister(&$post, &$session) { $value = !empty($post[$this->inputName]) ? $post[$this->inputName] : ''; $error = $session->getErrors($this->inputName); $this->set('error', $error); $this->set('value', $this->escape($value)); $this->set('clusterid', null); return $this->display(); }
/** * Displays the field for creation. * * @author Jason Rey <*****@*****.**> * @since 1.3 * @access public * @param array $post The posted data. * @param SocialTableStepSession $session The session table. * @return string The html codes for this field. */ public function onRegister(&$post, &$session) { // Get any previously submitted data $value = isset($post['allowmaybe']) ? (bool) $post['allowmaybe'] : true; // Detect if there's any errors $error = $session->getErrors($this->inputName); $this->set('error', $error); $this->set('value', $value); return $this->display(); }
/** * Displays the output form when someone tries to create a group. * * @since 1.2 * @access public * @param Array An array of data that has been submitted * @param SocialTableStepSession The session table * @return string The html codes for this field * * @author Mark Lee <*****@*****.**> */ public function onRegister($post, SocialTableStepSession $session) { // Get any previously submitted data $value = isset($post['photo_albums']) ? $post['photo_albums'] : $this->params->get('default', true); $value = (bool) $value; // Detect if there's any errors $error = $session->getErrors($this->inputName); $this->set('error', $error); $this->set('value', $value); return $this->display(); }
/** * Displays the field for creation. * * @author Jason Rey <*****@*****.**> * @since 1.3 * @access public * @param array $post The posted data. * @param SocialTableStepSession $session The session table. * @return string The html codes for this field. */ public function onRegister(&$post, &$session, SocialTableEventCategory $category) { // Check if they are allowed to create albums in this event's category $acl = $category->getAcl(); if (!$acl->get('photos.enabled')) { return; } // Get any previously submitted data $value = isset($post['photo_albums']) ? $post['photo_albums'] : $this->params->get('default'); $value = (bool) $value; // Detect if there's any errors $error = $session->getErrors($this->inputName); $this->set('error', $error); $this->set('value', $value); return $this->display(); }