diff --git a/htdocs/core/tpl/objectline_add.tpl.php b/htdocs/core/tpl/objectline_add.tpl.php index e9ff02a8ac1..8e54eb0c3a3 100644 --- a/htdocs/core/tpl/objectline_add.tpl.php +++ b/htdocs/core/tpl/objectline_add.tpl.php @@ -217,7 +217,7 @@ $(document).ready(function() { $('#service_duration_area').hide(); $('#idprod').change(function() { - if ($(this).val().length > 0) + if ($(this).val() > 0) { fckeditor->enabled) && ! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { ?> // We use CKEditor @@ -226,8 +226,9 @@ $(document).ready(function() { // We use a simple textarea $('#product_desc').focus(); - - } else { + $('#addlinebutton').removeAttr('disabled'); + } else { + $('#addlinebutton').attr('disabled','disabled'); $('#update_desc_checkbox').removeAttr('checked').trigger('change'); $('#update_price_checkbox').removeAttr('checked').trigger('change'); }