diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 0fe540cb3ac..e3c93618b08 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5566,27 +5566,27 @@ abstract class CommonObject
if(! empty($value)) {
foreach($value as $option) {
$out.= ' ';
- $out.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', $option, $moreparam, '', '', $showsize).'
';
+ $out.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', $option, $moreparam, '', '', $showsize).'
';
}
}
$out.= '';
$newInput = ' ';
- $newInput.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', '', $moreparam, '', '', $showsize).'
';
+ $newInput.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', '', $moreparam, '', '', $showsize).'
';
$out.= '
-';
+ $(document).on("click", "a.'.dol_escape_js($keyprefix.$key.$keysuffix).'_del", function() {
+ $(this).parent().remove();
+ });
+ });
+ ';
}
if (!empty($hidden)) {
$out='';
@@ -5961,7 +5961,7 @@ $(document).ready(function() {
}
elseif ($type == 'array')
{
- $value = implode('
', $value);
+ $value = implode('
', $value);
}
//print $type.'-'.$size;