diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php
index 2ff2c34d4..578d4b853 100644
--- a/e107_handlers/admin_ui.php
+++ b/e107_handlers/admin_ui.php
@@ -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 = "
-
-

+
";
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 8ab5e7700..a131360c0 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -409,12 +409,14 @@ 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 "
get_attributes($options, $name)." />";
+ return "
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 "
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);
diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js
index 19e034175..92a3415a9 100644
--- a/e107_web/js/core/admin.jquery.js
+++ b/e107_web/js/core/admin.jquery.js
@@ -31,23 +31,23 @@ $(document).ready(function()
return text;
}
});
- });
+ });
/* Switch to Tab containing invalid form field. */
$('input[type=submit],button[type=submit]').on('click', 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 + ']');
});
@@ -55,8 +55,7 @@ $(document).ready(function()
return true;
});
-
-
+
// 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
{