diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f4ec9c1e91998c432ce5e601a062d710a2be105c..a4ef37e392f139cd89eb896c24b6378802613c21 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1,10 +1,10 @@ <?php /* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> - * Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr> + * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Marc Barilley/Ocebo <marc@ocebo.com> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be> @@ -87,7 +87,6 @@ class Form if ($perm) { $tmp=explode(':',$typeofdata); - if (preg_match('/^(string|email|numeric)$/i',$tmp[0])) $tmp[0] = 'text'; $ret.= '<div class="editkey_'.$tmp[0].'" id="'.$htmlname.'">'; $ret.= $langs->trans($text); $ret.= '</div>'."\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 32ef01985a9f57e6cf9bdbc501b09a114651d7bc..8f91696a4cffd0634381b693b4a65ec60e1ac508 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(); });