/**
  * Lays out the row for the input, including label and errors
  * @param EE_Form_Input_Base $input
  * @return string
  */
 public function layout_input($input)
 {
     $html = '';
     if ($input instanceof EE_Hidden_Input) {
         $html .= $input->get_html_for_input();
     } else {
         $html_for_input = $input->get_html_for_input();
         $html_for_input .= $input->get_html_for_errors() != '' ? EEH_HTML::nl() . $input->get_html_for_errors() : '';
         $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
         $html .= EEH_HTML::tr(EEH_HTML::th($input->get_html_for_label()) . EEH_HTML::td($html_for_input));
     }
     return $html;
 }
 /**
  * Lays out the row for the input, including label and errors
  * @param EE_Form_Input_Base $input
  * @return string
  */
 public function layout_input($input)
 {
     if ($input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy || $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy || $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy) {
         $input->set_html_class($input->html_class() . ' large-text');
     }
     if ($input instanceof EE_Text_Area_Input) {
         $input->set_rows(4);
         $input->set_cols(60);
     }
     $input_html = $input->get_html_for_input();
     // maybe add errors and help text ?
     $input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl() . $input->get_html_for_errors() : '';
     $input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
     //overriding parent to add wp admin specific things.
     $html = '';
     if ($input instanceof EE_Hidden_Input) {
         $html .= EEH_HTML::no_row($input->get_html_for_input(), 2);
     } else {
         $html .= EEH_HTML::tr(EEH_HTML::th($input->get_html_for_label(), '', '', '', 'scope="row"') . EEH_HTML::td($input_html));
     }
     return $html;
 }
 /**
  * _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'))));
 }
 /**
  * 	_total_row
  *
  * @param EE_Line_Item $line_item
  * @param array        $options
  * @return mixed
  */
 protected function _total_row(EE_Line_Item $line_item, $options = array())
 {
     $registration = isset($options['EE_Registration']) ? $options['EE_Registration'] : null;
     $registration_total = $registration instanceof EE_Registration ? $registration->pretty_final_price() : 0;
     //if no valid registration object then we're not going to show the approximate text.
     $total_match = $registration instanceof EE_Registration ? $registration->final_price() == $line_item->total() : true;
     // start of row
     $html = EEH_HTML::tr('', '', 'admin-primary-mbox-total-tr');
     // Total th label
     if ($total_match) {
         $total_label = sprintf(__('This registration\'s total %s:', 'event_espresso'), '(' . EE_Registry::instance()->CFG->currency->code . ')');
     } else {
         $total_label = sprintf(__('This registration\'s approximate total %s', 'event_espresso'), '(' . EE_Registry::instance()->CFG->currency->code . ')');
         $total_label .= '<br>';
         $total_label .= '<p class="ee-footnote-text">' . sprintf(__('The registrations\' share of the transaction total is approximate because it might not be possible to evenly divide the transaction total among each registration, and so some registrations may need to pay a penny more than others.  This registration\'s final share is actually %1$s%2$s%3$s.', 'event_espresso'), '<strong>', $registration_total, '</strong>') . '</p>';
     }
     $html .= EEH_HTML::th($total_label, '', 'jst-rght', '', ' colspan="3"');
     // total th
     $html .= EEH_HTML::th(EEH_Template::format_currency($line_item->total(), false, false), '', 'jst-rght');
     // end of row
     $html .= EEH_HTML::trx();
     return $html;
 }
 /**
  * 	_total_row
  *
  * @param EE_Line_Item $line_item
  * @param array        $options
  * @return mixed
  */
 protected function _total_row(EE_Line_Item $line_item, $options = array())
 {
     // start of row
     $html = EEH_HTML::tr('', '', 'admin-primary-mbox-total-tr');
     // Total th label
     $total_label = sprintf(__('Transaction Total %s', 'event_espresso'), '(' . EE_Registry::instance()->CFG->currency->code . ')');
     $html .= EEH_HTML::th($total_label, '', 'jst-rght', '', ' colspan="4"');
     // total th
     $html .= EEH_HTML::th(EEH_Template::format_currency($line_item->total(), false, false), '', 'jst-rght');
     // end of row
     $html .= EEH_HTML::trx();
     return $html;
 }