/** * 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; }
/** * _update_payment_method_button * * @access protected * @param \EE_Payment_Method $payment_method * @return \EE_Form_Section_HTML */ protected function _update_payment_method_button(EE_Payment_Method $payment_method) { $update_button = new EE_Submit_Input(array('html_id' => 'save_' . $payment_method->slug() . '_settings', 'default' => sprintf(__('Update %s Payment Settings', 'event_espresso'), $payment_method->admin_name()), 'html_label' => EEH_HTML::nbsp())); return new EE_Form_Section_HTML(EEH_HTML::no_row(EEH_HTML::br(2)) . EEH_HTML::tr(EEH_HTML::th(__('Update Settings', 'event_espresso')) . EEH_HTML::td($update_button->get_html_for_input()))); }