@@ -87,7 +87,6 @@ class Form
if ($perm)
{
$tmp=explode(':',$typeofdata);
- if (preg_match('/^(string|email|numeric)$/i',$tmp[0])) $tmp[0] = 'text';
$ret.= '';
$ret.= $langs->trans($text);
$ret.= '
'."\n";
@@ -237,8 +236,7 @@ class Form
if (preg_match('/^(string|email|numeric)/',$inputType))
{
$tmp=explode(':',$inputType);
- $inputType='text';
- $inputOption=$tmp[1];
+ $inputType=$tmp[0]; $inputOption=$tmp[1];
if (! empty($tmp[2])) $savemethod=$tmp[2];
}
if (preg_match('/^datepicker/',$inputType))
diff --git a/htdocs/core/js/editinplace.js b/htdocs/core/js/editinplace.js
index 32ef01985a9..8f91696a4cf 100644
--- a/htdocs/core/js/editinplace.js
+++ b/htdocs/core/js/editinplace.js
@@ -107,7 +107,7 @@ $(document).ready(function() {
$( '#val_' + $(this).attr('id') ).click();
});
- $('.editval_text').editable(urlSaveInPlace, {
+ $('.editval_string').editable(urlSaveInPlace, {
type : 'text',
id : 'field',
width : 300,
@@ -118,7 +118,7 @@ $(document).ready(function() {
indicator : indicatorInPlace,
submitdata : function(result, settings) {
var htmlname = $(this).attr('id').substr(4);
- return getParameters('text', htmlname);
+ return getParameters('string', htmlname);
},
callback : function(result, settings) {
var obj = $.parseJSON(result);
@@ -131,7 +131,7 @@ $(document).ready(function() {
}
}
});
- $('.editkey_text').hover(
+ $('.editkey_string').hover(
function () {
$( '#val_' + $(this).attr('id') ).addClass("editval_hover");
},
@@ -139,7 +139,7 @@ $(document).ready(function() {
$( '#val_' + $(this).attr('id') ).removeClass("editval_hover");
}
);
- $('.editkey_text').click(function() {
+ $('.editkey_string').click(function() {
$( '#val_' + $(this).attr('id') ).click();
});