/**
  * @access public
  * @param EE_Question_Group $question_group
  * @return 	EE_Form_Section_HTML
  */
 public function question_group_header(EE_Question_Group $question_group)
 {
     $html = '';
     // group_name
     if ($question_group->show_group_name() && $question_group->name() != '') {
         EE_Registry::instance()->load_helper('HTML');
         if ($this->checkout->admin_request) {
             $html .= EEH_HTML::br();
             $html .= EEH_HTML::h3($question_group->name(), '', 'ee-reg-form-qstn-grp-title title', 'font-size: 1.3em; padding-left:0;');
         } else {
             $html .= EEH_HTML::h4($question_group->name(), '', 'ee-reg-form-qstn-grp-title section-title');
         }
     }
     // group_desc
     if ($question_group->show_group_desc() && $question_group->desc() != '') {
         $html .= EEH_HTML::p($question_group->desc(), '', $this->checkout->admin_request ? 'ee-reg-form-qstn-grp-desc-pg' : 'ee-reg-form-qstn-grp-desc-pg small-text lt-grey-text');
     }
     return new EE_Form_Section_HTML($html);
 }
 /**
  * payment_fields_autofilled_notice_html
  * @return string
  */
 public function payment_fields_autofilled_notice_html()
 {
     EE_Registry::instance()->load_helper('HTML');
     return new EE_Form_Section_HTML(EEH_HTML::p(apply_filters('FHEE__EE_Billing_Info_Form__payment_fields_autofilled_notice_html_text', __('Payment fields have been autofilled because you are in debug mode', 'event_espresso')), '', 'important-notice'));
 }
 /**
  * _fine_print
  *
  * @access protected
  * @return \EE_Form_Section_HTML
  */
 protected function _fine_print()
 {
     return new EE_Form_Section_HTML(EEH_HTML::tr(EEH_HTML::th() . EEH_HTML::td(EEH_HTML::p(__('All fields marked with a * are required fields', 'event_espresso'), '', 'grey-text'))));
 }
 /**
  *    _payment_method_billing_info
  *
  * @access 	private
  * @param 	EE_Payment_Method $payment_method
  * @return 	\EE_Form_Section_Proper
  */
 private function _payment_method_billing_info(EE_Payment_Method $payment_method)
 {
     $currently_selected = $this->checkout->selected_method_of_payment == $payment_method->slug() ? TRUE : FALSE;
     // generate the billing form for payment method
     $billing_form = $currently_selected ? $this->_get_billing_form_for_payment_method($payment_method) : new EE_Form_Section_HTML();
     $this->checkout->billing_form = $currently_selected ? $billing_form : $this->checkout->billing_form;
     // it's all in the details
     $info_html = EEH_HTML::h3(__('Important information regarding your payment', 'event_espresso'), '', 'spco-payment-method-hdr');
     // add some info regarding the step, either from what's saved in the admin, or a default string depending on whether the PM has a billing form or not
     if ($payment_method->description()) {
         $payment_method_info = $payment_method->description();
     } elseif ($billing_form instanceof EE_Billing_Info_Form) {
         $payment_method_info = sprintf(__('Please provide the following billing information, then click the "%1$s" button below in order to proceed.', 'event_espresso'), $this->submit_button_text());
     } else {
         $payment_method_info = sprintf(__('Please click the "%1$s" button below in order to proceed.', 'event_espresso'), $this->submit_button_text());
     }
     $info_html .= EEH_HTML::p(apply_filters('FHEE__EE_SPCO_Reg_Step_Payment_Options___payment_method_billing_info__payment_method_info', $payment_method_info), '', 'spco-payment-method-desc ee-attention');
     return new EE_Form_Section_Proper(array('html_id' => 'spco-payment-method-info-' . $payment_method->slug(), 'html_class' => 'spco-payment-method-info-dv', 'html_style' => $currently_selected ? '' : 'display:none;', 'layout_strategy' => new EE_Div_Per_Section_Layout(), 'subsections' => array('info' => new EE_Form_Section_HTML($info_html), 'billing_form' => $currently_selected ? $billing_form : new EE_Form_Section_HTML())));
 }
 /**
  * _recaptcha_main_settings
  *
  * @access protected
  * @return EE_Form_Section_Proper
  */
 protected static function _recaptcha_settings_form()
 {
     return new EE_Form_Section_Proper(array('name' => 'recaptcha_settings_form', 'html_id' => 'recaptcha_settings_form', 'layout_strategy' => new EE_Div_Per_Section_Layout(), 'subsections' => apply_filters('FHEE__EED_Recaptcha___recaptcha_settings_form__form_subsections', array('main_settings_hdr' => new EE_Form_Section_HTML(EEH_HTML::h2(__('reCAPTCHA Anti-spam Settings', 'event_espresso') . EEH_Template::get_help_tab_link('recaptcha_info'))), 'main_settings' => EED_Recaptcha::_recaptcha_main_settings(), 'appearance_settings_hdr' => new EE_Form_Section_HTML(EEH_HTML::h2(__('reCAPTCHA Appearance', 'event_espresso'))), 'appearance_settings' => EED_Recaptcha::_recaptcha_appearance_settings(), 'required_fields_note' => new EE_Form_Section_HTML(EEH_HTML::p(__('All fields marked with a * are required fields', 'event_espresso'), '', 'grey-text'))))));
 }
 /**
  * Gets the HTML for redirecting the user to an offsite gateway
  * You can pass it special content to put inside the form, or use
  * the default inner content (or possibly generate this all yourself using
  * redirect_url() and redirect_args() or redirect_args_as_inputs()).
  * Creates a POST request by default, but if no redirect args are specified, creates a GET request instead
  * (and any querystring variables in the redirect_url are converted into html inputs
  * so browsers submit them properly)
  * @param string $inside_form_html
  * @return string html
  */
 function redirect_form($inside_form_html = NULL)
 {
     $redirect_url = $this->redirect_url();
     if (!empty($redirect_url)) {
         EE_Registry::instance()->load_helper('HTML');
         // what ? no inner form content?
         if ($inside_form_html === NULL) {
             $inside_form_html = EEH_HTML::p(sprintf(__('If you are not automatically redirected to the payment website within 10 seconds... %1$s %2$s Click Here %3$s', 'event_espresso'), EEH_HTML::br(2), '<input type="submit" value="', '">'), '', '', 'text-align:center;');
         }
         $method = apply_filters('FHEE__EE_Payment__redirect_form__method', $this->redirect_args() ? 'POST' : 'GET', $this);
         //if it's a GET request, we need to remove all the GET params in the querystring
         //and put them into the form instead
         if ($method == 'GET') {
             $querystring = parse_url($redirect_url, PHP_URL_QUERY);
             $get_params = null;
             parse_str($querystring, $get_params);
             $inside_form_html .= $this->_args_as_inputs($get_params);
             $redirect_url = str_replace('?' . $querystring, '', $redirect_url);
         }
         $form = EEH_HTML::nl(1) . '<form method="' . $method . '" name="gateway_form" action="' . $redirect_url . '">';
         $form .= EEH_HTML::nl(1) . $this->redirect_args_as_inputs();
         $form .= $inside_form_html;
         $form .= EEH_HTML::nl(-1) . '</form>' . EEH_HTML::nl(-1);
         return $form;
     } else {
         return NULL;
     }
 }
 /**
  * @return string
  */
 protected function _get_question_type_descriptions()
 {
     EE_Registry::instance()->load_helper('HTML');
     $descriptions = '';
     $question_type_descriptions = EEM_Question::instance()->question_descriptions();
     foreach ($question_type_descriptions as $type => $question_type_description) {
         if ($type == 'HTML_TEXTAREA') {
             $html = new EE_Simple_HTML_Validation_Strategy();
             $question_type_description .= sprintf(__('%1$s(allowed tags: %2$s)', 'event_espresso'), '<br/>', $html->get_list_of_allowed_tags());
         }
         $descriptions .= EEH_HTML::p($question_type_description, 'question_type_description-' . $type, 'question_type_description description', 'display:none;');
     }
     return $descriptions;
 }
 /**
  * Gets the HTML for redirecting the user to an offsite gateway
  * You can pass it special content to put inside the form, or use
  * the default inner content (or possibly generate this all yourself using
  * redirect_url() and redirect_args() or redirect_args_as_inputs()).
  * Creates a POST request by default, but if no redirect args are specified, creates a GET request instead.
  * @param string $inside_form_html
  * @return string html
  */
 function redirect_form($inside_form_html = NULL)
 {
     $redirect_url = $this->redirect_url();
     if (!empty($redirect_url)) {
         EE_Registry::instance()->load_helper('HTML');
         // what ? no inner form content?
         if ($inside_form_html === NULL) {
             $inside_form_html = EEH_HTML::p(sprintf(__('If you are not automatically redirected to the payment website within 10 seconds... %1$s %2$s Click Here %3$s', 'event_espresso'), EEH_HTML::br(2), '<input type="submit" value="', '">'), '', '', 'text-align:center;');
         }
         $method = $this->redirect_args() ? 'POST' : 'GET';
         $form = EEH_HTML::nl(1) . '<form method="' . $method . '" name="gateway_form" action="' . $redirect_url . '">';
         $form .= EEH_HTML::nl(1) . $this->redirect_args_as_inputs();
         $form .= $inside_form_html;
         $form .= EEH_HTML::nl(-1) . '</form>' . EEH_HTML::nl(-1);
         return $form;
     } else {
         return NULL;
     }
 }