public function get_html() { $asterisk = $this->required ? '<span class="required">*</span>' : ''; $required_class = $this->required ? ' required ' : ''; $error_class = $this->error ? ' error ' : ''; $error_html = $this->error ? '<span class="validation_error">' . $this->error . '</span>' : ''; $info_html = $this->info_text ? get_info_icon($this->label, $this->info_text) : ''; $disabledif_string = $this->get_disable_string('if'); $disabledunless_string = $this->get_disable_string('unless'); $return_html = '<div class="form-group ' . $error_class . '" ' . $disabledif_string . ' ' . $disabledunless_string . '>'; if ($this->show_label !== false) { $return_html .= '<label class="control-label col-lg-2">' . $this->label . ' ' . $asterisk . $info_html . '</label>'; } $return_html .= '<div class="col-lg-10 ' . $required_class . '">' . $this->html . '<span class="help-inline">' . $error_html . '</span></div></div>'; return $return_html; }
public function get_html() { $asterisk = $this->required ? '<span class="required">*</span>' : ''; $required_class = $this->required ? ' required ' : ''; $error_class = $this->error ? ' error ' : ''; $error_html = $this->error ? '<span class="validation_error">' . $this->error . '</span>' : ''; $info_html = $this->info_text ? get_info_icon($this->label, $this->info_text) : ''; return ' <div class="form-group ' . $error_class . '"> <label class=" ">' . $this->label . ' ' . $asterisk . $info_html . '</label> <div class=" ' . $required_class . '">' . $this->html . '<span class="help-inline">' . $error_html . '</span></div> </div> '; }