mirror of
https://github.com/e107inc/e107.git
synced 2025-08-09 16:17:14 +02:00
Issue #684 Disabled drop-down restyling due to validation alert issues.
This commit is contained in:
@@ -5559,8 +5559,9 @@ class e_admin_form_ui extends e_form
|
||||
// TODO - core ui-batch-option class!!! REMOVE INLINE STYLE!
|
||||
// XXX Quick Fix for styling - correct.
|
||||
$text = "
|
||||
<div class='navbar navbar-inner left' style='padding-left:30px; padding-top:6px; margin-top:-20px;border-top:0px'>
|
||||
<img src='".e_IMAGE_ABS."generic/branchbottom.gif' alt='' class='icon action' />
|
||||
<div class='navbar navbar-inner left' style='padding-left:15px; padding-top:8px; margin-top:-20px;border-top:0px'>
|
||||
<div class='input-append'>
|
||||
<img src='".e_IMAGE_ABS."generic/branchbottom.gif' alt='' class='icon action' style='padding-top:5px' />
|
||||
".$this->select_open('etrigger_batch', array('class' => 'tbox select batch e-autosubmit reset', 'id' => false))."
|
||||
".$this->option(LAN_BATCH_LABEL_SELECTED, '', false)."
|
||||
".($allow_copy ? $this->option(LAN_COPY, 'copy', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
|
||||
@@ -5572,6 +5573,7 @@ class e_admin_form_ui extends e_form
|
||||
".$this->select_close()."
|
||||
".$this->admin_button('e__execute_batch', 'e__execute_batch', 'batch e-hide-if-js', LAN_GO, array('id' => false))."
|
||||
</div>
|
||||
</div>
|
||||
";
|
||||
|
||||
return $text;
|
||||
|
@@ -410,11 +410,13 @@ class e_form
|
||||
|
||||
$mlength = vartrue($maxlength) ? "maxlength=".$maxlength : "";
|
||||
|
||||
$type = varset($options['type']) == 'email' ? 'email' : 'text'; // used by $this->email();
|
||||
|
||||
$options = $this->format_options('text', $name, $options);
|
||||
|
||||
|
||||
//never allow id in format name-value for text fields
|
||||
return "<input type='text' name='{$name}' value='{$value}' {$mlength} ".$this->get_attributes($options, $name)." />";
|
||||
return "<input type='".$type."' name='{$name}' value='{$value}' {$mlength} ".$this->get_attributes($options, $name)." />";
|
||||
}
|
||||
|
||||
|
||||
@@ -450,11 +452,8 @@ class e_form
|
||||
|
||||
function email($name, $value, $maxlength = 200, $options = array())
|
||||
{
|
||||
$options = $this->format_options('text', $name, $options);
|
||||
|
||||
//never allow id in format name-value for text fields
|
||||
return "<input type='email' name='{$name}' value='{$value}' maxlength='{$maxlength}' ".$this->get_attributes($options, $name)." />
|
||||
";
|
||||
$options['type'] = 'email';
|
||||
return $this->text($name,$value,$maxlength,$options);
|
||||
}
|
||||
|
||||
|
||||
@@ -1573,7 +1572,11 @@ class e_form
|
||||
|
||||
if(isset($options['default']))
|
||||
{
|
||||
$text .= $this->option($options['default'], varset($options['defaultValue']));
|
||||
if($options['default'] === 'blank')
|
||||
{
|
||||
$options['default'] = ' ';
|
||||
}
|
||||
$text .= $this->option($options['default'], varset($options['defaultValue'],''));
|
||||
}
|
||||
elseif($defaultBlank)
|
||||
{
|
||||
@@ -3419,8 +3422,14 @@ class e_form
|
||||
$ret = $this->text($key, e107::getIPHandler()->ipDecode($value), 32, $parms);
|
||||
break;
|
||||
|
||||
case 'url':
|
||||
case 'email':
|
||||
$maxlength = vartrue($parms['maxlength'], 255);
|
||||
unset($parms['maxlength']);
|
||||
$ret = vartrue($parms['pre']).$this->email($key, $value, $maxlength, $parms).vartrue($parms['post']); // vartrue($parms['__options']) is limited. See 'required'=>true
|
||||
break;
|
||||
|
||||
case 'url':
|
||||
// case 'email':
|
||||
case 'text':
|
||||
case 'password': // encrypts to md5 when saved.
|
||||
$maxlength = vartrue($parms['maxlength'], 255);
|
||||
|
@@ -39,15 +39,15 @@ $(document).ready(function()
|
||||
var id = $(this).closest('form').attr('id');
|
||||
var found = false;
|
||||
|
||||
$('#'+id).find(':invalid').each(function(index, node) {
|
||||
$('#'+id).find('input:invalid,select:invalid,textarea:invalid').each(function(index, node) {
|
||||
|
||||
var tab = $('#'+node.id).closest('.tab-pane').attr('id');
|
||||
|
||||
if(tab && (found == false))
|
||||
if(tab && (found === false))
|
||||
{
|
||||
$('a[href="#'+tab+'"]').tab('show');
|
||||
found = true;
|
||||
//alert(node.id+' : '+tab);
|
||||
// alert(node.id+' : '+tab + ' '.index);
|
||||
}
|
||||
// var label = $('label[for=' + node.id + ']');
|
||||
});
|
||||
@@ -57,7 +57,6 @@ $(document).ready(function()
|
||||
|
||||
|
||||
|
||||
|
||||
// run tips on title attribute.
|
||||
$(".e-tip").each(function() {
|
||||
|
||||
@@ -319,7 +318,8 @@ $(document).ready(function()
|
||||
|
||||
if(multi === undefined)
|
||||
{
|
||||
$(this).selectpicker();
|
||||
// $(this).selectpicker(); // causes HTML5 validation alert to be hidden.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user