Fix bootstrap3 div changes.

1.10.x
Julio Montoya 11 years ago
parent d9a7be0c7e
commit 7d9d1f79a1
  1. 4
      main/inc/lib/formvalidator/FormValidator.class.php
  2. 21
      main/inc/lib/pear/HTML/QuickForm/button.php
  3. 10
      main/inc/lib/pear/HTML/QuickForm/input.php
  4. 4
      main/inc/lib/pear/HTML/QuickForm/radio.php
  5. 10
      main/inc/lib/pear/HTML/QuickForm/text.php

@ -120,11 +120,11 @@ EOT;
{ {
return ' return '
<div class="form-group {error_class}"> <div class="form-group {error_class}">
<label {label-for}> <label {label-for} class="col-sm-2 control-label" >
<!-- BEGIN required --><span class="form_required">*</span><!-- END required --> <!-- BEGIN required --><span class="form_required">*</span><!-- END required -->
{label} {label}
</label> </label>
<div class="controls"> <div class="col-sm-10">
{element} {element}
<!-- BEGIN label_3 --> <!-- BEGIN label_3 -->

@ -35,15 +35,13 @@
class HTML_QuickForm_button extends HTML_QuickForm_input class HTML_QuickForm_button extends HTML_QuickForm_input
{ {
/** /**
* Class constructor * @param string $elementName
* * @param string $value
* @param string $elementName (optional)Input field name attribute * @param string $icon
* @param string $value (optional)Input field value * @param string $style
* @param mixed $attributes (optional)Either a typical HTML attribute string * @param string $size
* or an associative array * @param string $class
* @since 1.0 * @param array $attributes
* @access public
* @return void
*/ */
public function HTML_QuickForm_button( public function HTML_QuickForm_button(
$elementName = null, $elementName = null,
@ -54,6 +52,11 @@ class HTML_QuickForm_button extends HTML_QuickForm_input
$class = 'btn', $class = 'btn',
$attributes = array() $attributes = array()
) { ) {
$icon = !empty($icon) ? $icon : 'check';
$style = !empty($style) ? $style : 'default';
$size = !empty($size) ? $size : 'default';
$class = !empty($class) ? $class : 'btn';
$attributes['icon'] = $icon; $attributes['icon'] = $icon;
$attributes['style'] = $style; $attributes['style'] = $style;
$attributes['size'] = $size; $attributes['size'] = $size;

@ -181,10 +181,7 @@ class HTML_QuickForm_input extends HTML_QuickForm_element
} }
} }
return true; return true;
} // end func onQuickFormEvent }
// }}}
// {{{ exportValue()
/** /**
* We don't need values from button-type elements (except submit) and files * We don't need values from button-type elements (except submit) and files
@ -198,7 +195,4 @@ class HTML_QuickForm_input extends HTML_QuickForm_element
return parent::exportValue($submitValues, $assoc); return parent::exportValue($submitValues, $assoc);
} }
} }
}
// }}}
} // end class HTML_QuickForm_element
?>

@ -115,9 +115,9 @@ class HTML_QuickForm_radio extends HTML_QuickForm_input
} elseif ($this->_flagFrozen) { } elseif ($this->_flagFrozen) {
$label = $this->_text; $label = $this->_text;
} else { } else {
$label = '<label class="radio '.$this->getAttribute('label-class').'">' . $label = '<div class="radio"><label '.$this->getAttribute('label-class').'">' .
HTML_QuickForm_input::toHtml().$this->_text . HTML_QuickForm_input::toHtml().$this->_text .
'</label>'; '</label></div>';
return $label; return $label;
} }

@ -45,10 +45,16 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
* @access public * @access public
* @return void * @return void
*/ */
function HTML_QuickForm_text($elementName=null, $elementLabel=null, $attributes=null) public function HTML_QuickForm_text(
{ $elementName = null,
$elementLabel = null,
$attributes = null
) {
$attributes['class'] = 'form-control';
HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes); HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->setType('text'); $this->setType('text');
} }

Loading…
Cancel
Save