From 142460ab16e185d146c942f50747ff1f365b48cb Mon Sep 17 00:00:00 2001 From: Bahfir Abbes Date: Tue, 12 May 2015 08:53:09 +0100 Subject: [PATCH 01/21] Update html.formfile.class.php Fix forgotten last contributor information --- htdocs/core/class/html.formfile.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 7870371a4ab..cecbefa0dd9 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -5,7 +5,8 @@ * Copyright (C) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Marcos García - * + * Copyright (C) 2015 Bahfir Abbes + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or From 0d8641a073596b3964e9e2e52ac391b63f840714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 14:22:00 +0200 Subject: [PATCH 02/21] [Qual] Use jQuery property instead of attribute to test and set checked --- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/admin/const.php | 2 +- htdocs/admin/tools/dolibarr_export.php | 2 +- htdocs/commande/orderstoinvoice.php | 4 ++-- htdocs/compta/facture.php | 10 +++++----- htdocs/compta/facture/mergepdftool.php | 8 ++++---- htdocs/compta/paiement/cheque/card.php | 4 ++-- htdocs/core/tpl/objectline_create.tpl.php | 8 ++++---- htdocs/fourn/commande/orderstoinvoice.php | 4 ++-- htdocs/install/fileconf.php | 4 ++-- htdocs/user/card.php | 12 ++++++------ htdocs/user/param_ihm.php | 6 +++--- 12 files changed, 33 insertions(+), 33 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 369027b1e14..3aedb6fe50c 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -873,7 +873,7 @@ if ($rowid) } }); '; - if (GETPOST('paymentsave')) print '$("#'.GETPOST('paymentsave').'").attr("checked",true);'; + if (GETPOST('paymentsave')) print '$("#'.GETPOST('paymentsave').'").prop("checked",true);'; print '});'; print ''."\n"; } diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 6b63ba74c6b..55434d4de2e 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -165,7 +165,7 @@ jQuery(document).ready(function() { var row_num = field_id.split("_"); jQuery("#updateconst").show(); jQuery("#action").val('update'); - jQuery("#check_" + row_num[1]).attr("checked",true); + jQuery("#check_" + row_num[1]).prop("checked",true); }); }); diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 842efb3a0ac..671a9bf9eba 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -96,7 +96,7 @@ jQuery(document).ready(function() { jQuery("#select_sql_compat").click(function() { if (jQuery("#select_sql_compat").val() == 'POSTGRESQL') { - jQuery("#checkbox_dump_disable-add-locks").attr('checked',true); + jQuery("#checkbox_dump_disable-add-locks").prop('checked',true); } }); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 39253325716..1203a987abf 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -512,10 +512,10 @@ if (($action != 'create' && $action != 'add') || !$error) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1aaca07b57d..e3e753ab7eb 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2099,7 +2099,7 @@ if ($action == 'create') print ''; @@ -2154,7 +2154,7 @@ if ($action == 'create') print ''; @@ -2200,7 +2200,7 @@ if ($action == 'create') // Show credit note options only if we checked credit note print ' diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 6b218d52430..dba17a4798c 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -414,11 +414,11 @@ if ($action == 'new') { jQuery("#checkall_'.$bid.'").click(function() { - jQuery(".checkforremise_'.$bid.'").attr(\'checked\', true); + jQuery(".checkforremise_'.$bid.'").prop(\'checked\', true); }); jQuery("#checknone_'.$bid.'").click(function() { - jQuery(".checkforremise_'.$bid.'").attr(\'checked\', false); + jQuery(".checkforremise_'.$bid.'").prop(\'checked\', false); }); }); diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 0d18cd9b8b5..9c6cfd2e1be 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -583,8 +583,8 @@ function setforfree() { jQuery("#idprod").val(''); jQuery("#idprodfournprice").val('0'); // Set cursor on not selected product jQuery("#search_idprodfournprice").val(''); - jQuery("#prod_entry_mode_free").attr('checked',true); - jQuery("#prod_entry_mode_predef").attr('checked',false); + jQuery("#prod_entry_mode_free").prop('checked',true); + jQuery("#prod_entry_mode_predef").prop('checked',false); jQuery("#price_ht").show(); jQuery("#price_ttc").show(); // May no exists jQuery("#tva_tx").show(); @@ -601,8 +601,8 @@ function setforfree() { } function setforpredef() { jQuery("#select_type").val(-1); - jQuery("#prod_entry_mode_free").attr('checked',false); - jQuery("#prod_entry_mode_predef").attr('checked',true); + jQuery("#prod_entry_mode_free").prop('checked',false); + jQuery("#prod_entry_mode_predef").prop('checked',true); jQuery("#price_ht").hide(); jQuery("#title_up_ht").hide(); jQuery("#price_ttc").hide(); // May no exists diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index d35d318d4a2..a18031de4d4 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -386,10 +386,10 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs)) { diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 1256c5b215a..7df38b46d61 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -487,8 +487,8 @@ jQuery(document).ready(function() { function init_needroot() { - /*alert(jQuery("#db_create_database").attr("checked")); */ - if (jQuery("#db_create_database").attr("checked") || jQuery("#db_create_user").attr("checked")) + /*alert(jQuery("#db_create_database").prop("checked")); */ + if (jQuery("#db_create_database").prop("checked") || jQuery("#db_create_user").prop("checked")) { jQuery(".hideroot").show(); jQuery(".needroot").removeAttr('disabled'); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 0320f44916e..77352b630f1 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -822,7 +822,7 @@ if (($action == 'create') || ($action == 'adduserldap')) if ( $(this).val() == 0 ) { $("input[name=superadmin]") .attr("disabled", true) - .attr("checked", false); + .prop("checked", false); $("select[name=entity]") .attr("disabled", false); } else { @@ -831,7 +831,7 @@ if (($action == 'create') || ($action == 'adduserldap')) } }); $("input[name=superadmin]").change(function() { - if ( $(this).attr("checked") == "checked" ) { + if ( $(this).prop("checked", true) ) { $("select[name=entity]") .attr("disabled", true); } else { @@ -1823,9 +1823,9 @@ else if (admin == 0) { $("input[name=superadmin]") .attr("disabled", true) - .attr("checked", false); + .prop("checked", false); } - if ($("input[name=superadmin]").attr("checked") == "checked") { + if ($("input[name=superadmin]").prop("checked", true)) { $("select[name=entity]") .attr("disabled", true); } @@ -1833,7 +1833,7 @@ else if ( $(this).val() == 0 ) { $("input[name=superadmin]") .attr("disabled", true) - .attr("checked", false); + .prop("checked", false); $("select[name=entity]") .attr("disabled", false); } else { @@ -1842,7 +1842,7 @@ else } }); $("input[name=superadmin]").change(function() { - if ( $(this).attr("checked") == "checked" ) { + if ( $(this).prop("checked", true)) { $("select[name=entity]") .attr("disabled", true); } else { diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 4f8259bc007..77e03728af6 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -155,11 +155,11 @@ if ($action == 'edit') print ''; From e149d49fb87685265cd8a2ae25529829b881709c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 14:47:33 +0200 Subject: [PATCH 03/21] [Qual] Use jQuery property instead of attribute to test and set disabled --- htdocs/admin/mails.php | 12 ++++---- htdocs/admin/menus/edit.php | 4 +-- htdocs/barcode/printsheet.php | 28 ++++++++--------- htdocs/comm/action/card.php | 18 +++++------ htdocs/core/class/html.formactions.class.php | 6 ++-- htdocs/core/lib/ajax.lib.php | 6 ++-- htdocs/core/tpl/admin_extrafields_add.tpl.php | 30 +++++++++---------- .../core/tpl/admin_extrafields_edit.tpl.php | 12 ++++---- htdocs/install/fileconf.php | 2 +- .../product/stock/tpl/stockcorrection.tpl.php | 6 ++-- htdocs/user/card.php | 24 +++++++-------- 11 files changed, 74 insertions(+), 74 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 159c03589b1..2b50008d58a 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -271,12 +271,12 @@ if ($action == 'edit') { jQuery(".drag").hide(); jQuery("#MAIN_MAIL_EMAIL_TLS").val(0); - jQuery("#MAIN_MAIL_EMAIL_TLS").attr(\'disabled\', \'disabled\'); + jQuery("#MAIN_MAIL_EMAIL_TLS").prop("disabled", true); '; if ($linuxlike) { - print ' jQuery("#MAIN_MAIL_SMTP_SERVER").attr(\'disabled\', \'disabled\');'; - print ' jQuery("#MAIN_MAIL_SMTP_PORT").attr(\'disabled\', \'disabled\');'; + print ' jQuery("#MAIN_MAIL_SMTP_SERVER").prop("disabled", true);'; + print ' jQuery("#MAIN_MAIL_SMTP_PORT").prop("disabled", true);'; } print ' } @@ -284,9 +284,9 @@ if ($action == 'edit') { jQuery(".drag").show(); jQuery("#MAIN_MAIL_EMAIL_TLS").val('.$conf->global->MAIN_MAIL_EMAIL_TLS.'); - jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr(\'disabled\'); - jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr(\'disabled\'); - jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr(\'disabled\'); + jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr("disabled"); + jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr("disabled"); + jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr("disabled"); } } initfields(); diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 9ded9ae1f34..4ab41c7991e 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -255,12 +255,12 @@ if ($action == 'create') { if (jQuery("#topleft").val() == \'top\') { - jQuery("#menuId").attr(\'disabled\',\'disabled\'); + jQuery("#menuId").prop("disabled", true); jQuery("#menuId").val(\'\'); } else { - jQuery("#menuId").removeAttr(\'disabled\'); + jQuery("#menuId").removeAttr("disabled"); } } init_topleft(); diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 1a518b1859c..36d9117eefe 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -313,28 +313,28 @@ jQuery(document).ready(function() { { if (jQuery("#fillmanually:checked").val() == "fillmanually") { - jQuery("#submitproduct").attr(\'disabled\',\'disabled\'); - jQuery("#submitthirdparty").attr(\'disabled\',\'disabled\'); - jQuery("#search_productid").attr(\'disabled\',\'disabled\'); - jQuery("#socid").attr(\'disabled\',\'disabled\'); + jQuery("#submitproduct").prop("disabled", true); + jQuery("#submitthirdparty").prop("disabled", true); + jQuery("#search_productid").prop("disabled", true); + jQuery("#socid").prop("disabled", true); jQuery(".showforproductselector").hide(); jQuery(".showforthirdpartyselector").hide(); } if (jQuery("#fillfromproduct:checked").val() == "fillfromproduct") { - jQuery("#submitproduct").removeAttr(\'disabled\'); - jQuery("#submitthirdparty").attr(\'disabled\',\'disabled\'); - jQuery("#search_productid").removeAttr(\'disabled\'); - jQuery("#socid").attr(\'disabled\',\'disabled\'); + jQuery("#submitproduct").removeAttr("disabled"); + jQuery("#submitthirdparty").prop("disabled", true); + jQuery("#search_productid").removeAttr("disabled"); + jQuery("#socid").prop("disabled", true); jQuery(".showforproductselector").show(); jQuery(".showforthirdpartyselector").hide(); } if (jQuery("#fillfromthirdparty:checked").val() == "fillfromthirdparty") { - jQuery("#submitproduct").attr(\'disabled\',\'disabled\'); - jQuery("#submitthirdparty").removeAttr(\'disabled\'); - jQuery("#search_productid").attr(\'disabled\',\'disabled\'); - jQuery("#socid").removeAttr(\'disabled\'); + jQuery("#submitproduct").prop("disabled", true); + jQuery("#submitthirdparty").removeAttr("disabled"); + jQuery("#search_productid").prop("disabled", true); + jQuery("#socid").removeAttr("disabled"); jQuery(".showforproductselector").hide(); jQuery(".showforthirdpartyselector").show(); } @@ -348,11 +348,11 @@ jQuery(document).ready(function() { { if (jQuery("#select_fk_barcode_type").val() > 0 && jQuery("#forbarcode").val()) { - jQuery("#submitformbarcodegen").removeAttr(\'disabled\'); + jQuery("#submitformbarcodegen").removeAttr("disabled"); } else { - jQuery("#submitformbarcodegen").attr(\'disabled\',\'disabled\'); + jQuery("#submitformbarcodegen").prop("disabled", true); } } init_gendoc_button(); diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 7e842ae3678..07f154c8ef7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -570,11 +570,11 @@ if ($action == 'create') $(".fulldayendmin").removeAttr("disabled"); $("#p2").removeAttr("disabled"); } else { - $(".fulldaystarthour").attr("disabled","disabled").val("00"); - $(".fulldaystartmin").attr("disabled","disabled").val("00"); - $(".fulldayendhour").attr("disabled","disabled").val("23"); - $(".fulldayendmin").attr("disabled","disabled").val("59"); - $("#p2").removeAttr("disabled"); + $(".fulldaystarthour").prop("disabled", true).val("00"); + $(".fulldaystartmin").prop("disabled", true).val("00"); + $(".fulldayendhour").prop("disabled", true).val("23"); + $(".fulldayendmin").prop("disabled", true).val("59"); + $("#p2").removeAttr("disabled"); } } setdatefields(); @@ -841,10 +841,10 @@ if ($id > 0) $(".fulldayendhour").removeAttr("disabled"); $(".fulldayendmin").removeAttr("disabled"); } else { - $(".fulldaystarthour").attr("disabled","disabled").val("00"); - $(".fulldaystartmin").attr("disabled","disabled").val("00"); - $(".fulldayendhour").attr("disabled","disabled").val("23"); - $(".fulldayendmin").attr("disabled","disabled").val("59"); + $(".fulldaystarthour").prop("disabled", true).val("00"); + $(".fulldaystartmin").prop("disabled", true).val("00"); + $(".fulldayendhour").prop("disabled", true).val("23"); + $(".fulldayendmin").prop("disabled", true).val("59"); } } setdatefields(); diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index c656cb0432d..9322680a682 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -95,17 +95,17 @@ class FormActions percentage.val(value); if (defaultvalue == -1) { - percentage.attr('disabled', 'disabled'); + percentage.prop('disabled', true); $('.hideifna').hide(); } else if (defaultvalue == 0) { percentage.val(0); - percentage.attr('disabled', 'disabled'); + percentage.prop('disabled', true); $('.hideifna').show(); } else if (defaultvalue == 100) { percentage.val(100); - percentage.attr('disabled', 'disabled'); + percentage.prop('disabled', true); $('.hideifna').show(); } else { diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 8d6bc704e21..0b119ada66a 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -132,7 +132,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt // Disable an element if (options.option_disabled) { if (ui.item.disabled) { - $("#" + options.option_disabled).attr("disabled", "disabled"); + $("#" + options.option_disabled).prop("disabled", true); if (options.error) { $.jnotify(options.error, "error", true); // Output with jnotify the error message } @@ -145,7 +145,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt } if (options.disabled) { $.each(options.disabled, function(key, value) { - $("#" + value).attr("disabled", "disabled"); + $("#" + value).prop("disabled", true); }); } if (options.show) { @@ -524,7 +524,7 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=a // Disable another element if (input.disabled && input.disabled.length > 0) { $.each(input.disabled, function(key,value) { - $("#" + value).attr("disabled", true); + $("#" + value).prop("disabled", true); if ($("#" + value).hasClass("butAction") == true) { $("#" + value).removeClass("butAction"); $("#" + value).addClass("butActionRefused"); diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 293a363edfd..44de526942f 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -42,27 +42,27 @@ if (GETPOST('type') == "separate") { - print "jQuery('#size, #unique, #required, #default_value').val('').attr('disabled','disabled');"; + print "jQuery('#size, #unique, #required, #default_value').val('').prop('disabled', true);"; print 'jQuery("#value_choice").hide();'; } ?> - if (type == 'date') { size.val('').attr('disabled','disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } - else if (type == 'datetime') { size.val('').attr('disabled','disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} + if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } + else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} - else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} - else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.attr('disabled','disabled').removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } + else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} + else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } - else if (type == 'boolean') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} - else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} - else if (type == 'select') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} - else if (type == 'link') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();} - else if (type == 'sellist') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} - else if (type == 'radio') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} - else if (type == 'checkbox') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} - else if (type == 'chkbxlst') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();} - else if (type == 'separate') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); required.val('').attr('disabled','disabled'); default_value.val('').attr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} - else size.val('').attr('disabled','disabled'); + else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} + else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} + else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();} + else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();} + else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else size.val('').prop('disabled', true); } init_typeoffields(''); jQuery("#type").change(function() { diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 91b861381ae..9c283b83867 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -25,15 +25,15 @@ var size = jQuery("#size"); var unique = jQuery("#unique"); var required = jQuery("#required"); - if (type == 'date') { size.attr('disabled','disabled'); } - else if (type == 'datetime') { size.attr('disabled','disabled'); } + if (type == 'date') { size.prop('disabled', true); } + else if (type == 'datetime') { size.prop('disabled', true); } else if (type == 'double') { size.removeAttr('disabled'); } else if (type == 'int') { size.removeAttr('disabled'); } - else if (type == 'text') { size.removeAttr('disabled'); unique.attr('disabled','disabled').removeAttr('checked'); } + else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); } else if (type == 'varchar') { size.removeAttr('disabled'); } - else if (type == 'boolean') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled');} - else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled');} - else size.val('').attr('disabled','disabled'); + else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true);} + else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true);} + else size.val('').prop('disabled', true); } init_typeoffields(jQuery("#type").val()); }); diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 7df38b46d61..48599d51323 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -496,7 +496,7 @@ jQuery(document).ready(function() { else { jQuery(".hideroot").hide(); - jQuery(".needroot").attr('disabled','disabled'); + jQuery(".needroot").prop('disabled', true); } } diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 8f656045ee3..501272983cd 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -29,8 +29,8 @@ $langs->load("productbatch"); jQuery(document).ready(function() { function init_price() { - if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr(\'disabled\'); - else jQuery("#unitprice").attr(\'disabled\',\'disabled\'); + if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr("disabled"); + else jQuery("#unitprice").prop("disabled", true); } init_price(); jQuery("#mouvement").change(function() { @@ -116,4 +116,4 @@ $langs->load("productbatch"); print ''; ?> - \ No newline at end of file + diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 77352b630f1..8211adbb4bc 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -821,22 +821,22 @@ if (($action == 'create') || ($action == 'adduserldap')) $("select[name=admin]").change(function() { if ( $(this).val() == 0 ) { $("input[name=superadmin]") - .attr("disabled", true) + .prop("disabled", true) .prop("checked", false); $("select[name=entity]") - .attr("disabled", false); + .prop("disabled", false); } else { $("input[name=superadmin]") - .attr("disabled", false); + .prop("disabled", false); } }); $("input[name=superadmin]").change(function() { if ( $(this).prop("checked", true) ) { $("select[name=entity]") - .attr("disabled", true); + .prop("disabled", true); } else { $("select[name=entity]") - .attr("disabled", false); + .prop("disabled", false); } }); }); @@ -1822,32 +1822,32 @@ else var admin = $("select[name=admin]").val(); if (admin == 0) { $("input[name=superadmin]") - .attr("disabled", true) + .prop("disabled", true) .prop("checked", false); } if ($("input[name=superadmin]").prop("checked", true)) { $("select[name=entity]") - .attr("disabled", true); + .prop("disabled", true); } $("select[name=admin]").change(function() { if ( $(this).val() == 0 ) { $("input[name=superadmin]") - .attr("disabled", true) + .prop("disabled", true) .prop("checked", false); $("select[name=entity]") - .attr("disabled", false); + .prop("disabled", false); } else { $("input[name=superadmin]") - .attr("disabled", false); + .prop("disabled", false); } }); $("input[name=superadmin]").change(function() { if ( $(this).prop("checked", true)) { $("select[name=entity]") - .attr("disabled", true); + .prop("disabled", true); } else { $("select[name=entity]") - .attr("disabled", false); + .prop("disabled", false); } }); }); From d5565fffc1e5a2091c32b714b1e115b6102ccb70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 15:01:13 +0200 Subject: [PATCH 04/21] [Qual] Fixed HTML input form disabled attribute --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 150ca48e477..3a42879961b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4356,7 +4356,7 @@ class Form '; } - $out.=''; if ($show_empty) { From ce60ae0fcc9e5a62b1a98ed88e72485a3d804403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 15:09:23 +0200 Subject: [PATCH 05/21] [Qual] Fixed HTML readonly attribute Dolibarr uses HTML 4.01 or HTML5 doctypes. The readonly attribute is boolean. --- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index e25107e24fa..1c132502b78 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1124,7 +1124,7 @@ class ExtraFields if (!empty($value)) { $checked=' checked '; } - $value=''; + $value=''; } elseif ($type == 'mail') { diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index bc23438dfbc..222b6eb0ea2 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td $doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%'); $doleditor->Create(); } else { - print ''; + print ''; } ?> @@ -113,19 +113,19 @@ $coldisplay=-1; // We remove first td if ($this->situation_counter == 1 || !$this->situation_cycle_ref) { print '' . $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type) . ''; } else { - print '%'; + print '%'; } $coldisplay++; print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>'; if ($inputalsopricewithtax) { $coldisplay++; print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>'; } ?> @@ -136,7 +136,7 @@ $coldisplay=-1; // We remove first td // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>'; } else { ?>   @@ -155,7 +155,7 @@ $coldisplay=-1; // We remove first td info_bits & 2) != 2) { print 'situation_counter > 1) print ' readonly="readonly"'; + if ($this->situation_counter > 1) print ' readonly'; print '>%'; } else { ?>   From 9b56427858af70951eeb618c19a1f5fb5cf9b157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 15:11:47 +0200 Subject: [PATCH 06/21] [Qual] Fixed HTML multiple attribute Dolibarr uses HTML 4.01 or HTML5 doctypes. The multiple attribute is boolean. --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 150ca48e477..be6714cdb1f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4539,7 +4539,7 @@ class Form // Try also magic suggest // Add data-role="none" to disable jmobile decoration - $out = ''."\n"; if (is_array($array) && ! empty($array)) { if ($value_as_key) $array=array_combine($array, $array); From aee61aa2c401b5c7a958774565f382c485df15d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 15:37:35 +0200 Subject: [PATCH 07/21] [Qual] Fixed deprecated HTML nowrap attribute to class --- htdocs/admin/system/modules.php | 2 +- htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/card.php | 4 ++-- htdocs/commande/orderstoinvoice.php | 4 ++-- htdocs/compta/bank/account.php | 8 ++++---- htdocs/compta/bank/releve.php | 6 +++--- htdocs/compta/bank/treso.php | 6 +++--- htdocs/compta/facture.php | 20 +++++++++---------- htdocs/compta/facture/prelevement.php | 12 +++++------ htdocs/compta/localtax/index.php | 4 ++-- htdocs/compta/tva/index.php | 4 ++-- htdocs/contrat/card.php | 4 ++-- .../browser/default/frmactualfolder.php | 2 +- .../browser/default/frmfolders.php | 2 +- .../browser/default/frmresourceslist.php | 4 ++-- htdocs/core/tpl/objectline_edit.tpl.php | 4 ++-- htdocs/core/tpl/objectline_view.tpl.php | 4 ++-- htdocs/expedition/index.php | 2 +- htdocs/projet/tasks/contact.php | 2 +- 19 files changed, 48 insertions(+), 48 deletions(-) diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 47a386c1a03..1014beba184 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -118,7 +118,7 @@ foreach($sortorder as $numero=>$name) $idperms=""; $var=!$var; // Module - print ""; + print "'; $alt=$name.' - '.$modules_files[$numero]; if (! empty($picto[$numero])) { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a1c544f338b..927474a5e44 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -254,7 +254,7 @@ else { $var=!$var; print "\t\n"; - print "\t\t"; + print "\t\t".''; print "".$cat->label.""; print "\n"; print "\t\t".''.$cat->description."\n"; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 7e842ae3678..a4adb2a74b6 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -986,7 +986,7 @@ if ($id > 0) } // Priority - print ''.$langs->trans("Priority").''; + print ''.$langs->trans("Priority").''; print ''; print ''; @@ -1174,7 +1174,7 @@ if ($id > 0) } // Priority - print ''.$langs->trans("Priority").''; + print ''.$langs->trans("Priority").''; print ($object->priority?$object->priority:''); print ''; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 39253325716..513e295a913 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -655,12 +655,12 @@ if (($action != 'create' && $action != 'add') || !$error) print ''.$objp->ref_client.''; // Order date - print ''; + print ''; print dol_print_date($db->jdate($objp->date_commande),'day'); print ''; //Delivery date - print ''; + print ''; print dol_print_date($db->jdate($objp->date_livraison),'day'); print ''; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 536bdc91662..7184f0c71f1 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -776,11 +776,11 @@ if ($id > 0 || ! empty($ref)) { if ($total >= 0) { - print ' '.price($total).''; + print ' '.price($total).''; } else { - print ' '.price($total).''; + print ' '.price($total).''; } } else @@ -791,7 +791,7 @@ if ($id > 0 || ! empty($ref)) // Transaction reconciliated or edit link if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated { - print ''; + print ''; print ''; print img_edit(); print ''; @@ -844,7 +844,7 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ' '.$object->currency_code.''; - print ''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''; + print ''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''; print ' '; print ''; } diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 1b5549b2c4e..5293f518738 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -489,15 +489,15 @@ else if ($objp->amount < 0) { $totald = $totald + abs($objp->amount); - print ''.price($objp->amount * -1)." \n"; + print ''.price($objp->amount * -1)." \n"; } else { $totalc = $totalc + abs($objp->amount); - print " ".price($objp->amount)."\n"; + print ' '.price($objp->amount)."\n"; } - print "".price($total)."\n"; + print ''.price($total)."\n"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 292742315bb..e62c5203ea6 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -134,13 +134,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $var=!$var; print ''; print ''.$langs->trans("CurrentBalance").''; - print ''.price($solde).''; + print ''.price($solde).''; print ''; $var=!$var; print ''; print ''.$langs->trans("RemainderToPay").''; - print ' '; + print ' '; print ''; @@ -330,7 +330,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $var=!$var; print ''; print ''.$langs->trans("FutureBalance").' ('.$acct->currency_code.')'; - print ''.price($solde, 0, $langs, 0, 0, -1, $acct->currency_code).''; + print ''.price($solde, 0, $langs, 0, 0, -1, $acct->currency_code).''; print ''; print ""; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1aaca07b57d..777ed1f3bd6 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3137,28 +3137,28 @@ if ($action == 'create') // Paye partiellement 'escompte' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') { - print ''; + print ''; print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; $resteapayeraffiche = 0; } // Paye partiellement ou Abandon 'badcustomer' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') { - print ''; + print ''; print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; // $resteapayeraffiche=0; } // Paye partiellement ou Abandon 'product_returned' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') { - print ''; + print ''; print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1); print '' . price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye) . ' '; $resteapayeraffiche = 0; } // Paye partiellement ou Abandon 'abandon' if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'abandon') { - print ''; + print ''; $text = $langs->trans("HelpAbandonOther"); if ($object->close_note) $text .= '

' . $langs->trans("Reason") . ':' . $object->close_note; @@ -3319,7 +3319,7 @@ if ($action == 'create') print $object->situation_counter; print ''; - print ''; + print ''; $prevsits_total_amount = 0; foreach ($prevsits as $situation) { @@ -3340,7 +3340,7 @@ if ($action == 'create') print $prevsits[$i]->situation_counter; print ''; - print ''; + print ''; print '- ' . price($prevsits[$i]->total_ht); print ''; print '' . $langs->trans('Currency' . $conf->currency) . ''; @@ -3350,20 +3350,20 @@ if ($action == 'create') // Amount print '' . $langs->trans('AmountHT') . ''; - print '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ''; - print '' . $langs->trans('AmountVAT') . '' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . ''; + print '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . ''; print ''; // Amount Local Taxes if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ''; - print '' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . ''; + print '' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . ''; } if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) // Localtax2 { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ''; - print '' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . ''; + print '' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . ''; } // Revenue stamp diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 9d8b9123b68..6954ad46249 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -399,27 +399,27 @@ if ($object->id > 0) // Montants print ''.$langs->trans('AmountHT').''; - print ''.price($object->total_ht).''; + print ''.price($object->total_ht).''; print ''.$langs->trans('Currency'.$conf->currency).''; - print ''.$langs->trans('AmountVAT').''.price($object->total_tva).''; + print ''.$langs->trans('AmountVAT').''.price($object->total_tva).''; print ''.$langs->trans('Currency'.$conf->currency).''; // Amount Local Taxes if ($mysoc->localtax1_assuj=="1") //Localtax1 { print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).''; - print ''.price($object->total_localtax1).''; + print ''.price($object->total_localtax1).''; print ''.$langs->trans("Currency".$conf->currency).''; } if ($mysoc->localtax2_assuj=="1") //Localtax2 { print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).''; - print ''.price($object->total_localtax2).''; + print ''.price($object->total_localtax2).''; print ''.$langs->trans("Currency".$conf->currency).''; } - print ''.$langs->trans('AmountTTC').''.price($object->total_ttc).''; + print ''.$langs->trans('AmountTTC').''.price($object->total_ttc).''; print ''.$langs->trans('Currency'.$conf->currency).''; // We can also use bcadd to avoid pb with floating points @@ -428,7 +428,7 @@ if ($object->id > 0) //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT'); - print ''.$langs->trans('RemainderToPay').''.price($resteapayer).''; + print ''.$langs->trans('RemainderToPay').''.price($resteapayer).''; print ''.$langs->trans('Currency'.$conf->currency).''; // Statut diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 33ebfd3b1be..1e8570d7378 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -86,7 +86,7 @@ function pt ($db, $sql, $date) $i++; } - print ''.$langs->trans("Total")." :".price($total)." "; + print ''.$langs->trans("Total")." :".price($total)." "; print ""; $db->free($result); @@ -253,7 +253,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) { $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; } } -print ''.$langs->trans("TotalToPay").':'.price($total).''; +print ''.$langs->trans("TotalToPay").':'.price($total).''; print " \n"; print ''; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index c0dcff6d5c3..c84c7d2b633 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -93,7 +93,7 @@ function pt ($db, $sql, $date) $i++; } - print ''.$langs->trans("Total")." :".price($total)." "; + print ''.$langs->trans("Total")." :".price($total)." "; print ""; $db->free($result); @@ -216,7 +216,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; } } -print ''.$langs->trans("TotalToPay").':'.price($total).''; +print ''.$langs->trans("TotalToPay").':'.price($total).''; print " \n"; print ''; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 254185cc63d..cc9a394d983 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1021,12 +1021,12 @@ if ($action == 'create') } // Commercial suivi - print ''.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").''; + print ''.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").''; print $form->select_dolusers(GETPOST("commercial_suivi_id")?GETPOST("commercial_suivi_id"):$user->id,'commercial_suivi_id',1,''); print ''; // Commercial signature - print ''.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").''; + print ''.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").''; print $form->select_dolusers(GETPOST("commercial_signature_id")?GETPOST("commercial_signature_id"):$user->id,'commercial_signature_id',1,''); print ''; diff --git a/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php b/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php index d1dccba42c4..38ee8909216 100644 --- a/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php +++ b/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php @@ -106,7 +106,7 @@ window.onload = function()   - / + /       diff --git a/htdocs/core/filemanagerdol/browser/default/frmfolders.php b/htdocs/core/filemanagerdol/browser/default/frmfolders.php index 6dce1154dff..5feb1fedf70 100644 --- a/htdocs/core/filemanagerdol/browser/default/frmfolders.php +++ b/htdocs/core/filemanagerdol/browser/default/frmfolders.php @@ -220,7 +220,7 @@ window.onload = function() - +
diff --git a/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php b/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php index 19d0df5c346..cf6306f9672 100644 --- a/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php +++ b/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php @@ -77,7 +77,7 @@ oListManager.GetFolderRowHtml = function( folderName, folderPath ) '' + sLink + '<\/a>' + - '<\/td> ' + + '<\/td> ' + sLink + folderName + '<\/a>' + @@ -100,7 +100,7 @@ oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize ) sLink + fileName + '<\/a>' + - '<\/td> ' + + '<\/td> ' + fileSize + ' KB' + '<\/td><\/tr>' ; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 222b6eb0ea2..d64ef7a2b3e 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -152,7 +152,7 @@ $coldisplay=-1; // We remove first td } ?> - + info_bits & 2) != 2) { print 'situation_counter > 1) print ' readonly'; @@ -164,7 +164,7 @@ $coldisplay=-1; // We remove first td situation_cycle_ref) { $coldisplay++; - print '%'; + print '%'; } if (! empty($usemargins)) { diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 593421fe527..0ca056cfbb4 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -148,7 +148,7 @@ if (empty($usemargins)) $usemargins=0; global->PRODUCT_USE_UNITS) { - print ''; + print ''; $label = $line->getLabelOfUnit('short'); if ($label !== '') { print $langs->trans($label); @@ -169,7 +169,7 @@ if (empty($usemargins)) $usemargins=0; if ($this->situation_cycle_ref) { $coldisplay++; - print '' . $line->situation_percent . '%'; + print '' . $line->situation_percent . '%'; } if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id)) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 5ecd563a613..2d5d0e207c6 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -93,7 +93,7 @@ if ($resql) { $var=!$var; $obj = $db->fetch_object($resql); - print ""; + print "'; $shipment->id=$obj->rowid; $shipment->ref=$obj->ref; print $shipment->getNomUrl(1); diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 0dbcc007db1..e6dd2792118 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -464,7 +464,7 @@ if ($id > 0 || ! empty($ref)) print ''; // Icon update et delete - print ''; + print ''; if ($user->rights->projet->creer) { print ' '; From 932e23ac09713a2b84284d7e66580d9e83dc9d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 May 2015 16:21:21 +0200 Subject: [PATCH 08/21] [Qual] Use jQuery 'is' instead of 'prop' in conditions --- htdocs/compta/facture.php | 2 +- htdocs/install/fileconf.php | 2 +- htdocs/user/card.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e3e753ab7eb..f7efaff7b50 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2200,7 +2200,7 @@ if ($action == 'create') // Show credit note options only if we checked credit note print '