diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 6d93d4391b2..744ca519f90 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -219,7 +219,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage, $tmpshortlangcode = preg_replace('/[_-].*$/', '', $object->lang); // en_US or en-US -> en } if ($tmpshortlangcode != $shortlangcode) { - $tplcontent .= ''."\n"; + $tplcontent .= ''."\n"; } } } @@ -236,7 +236,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage, $tmpshortlangcode = preg_replace('/[_-].*$/', '', $obj->lang); // en_US or en-US -> en } if ($tmpshortlangcode != $shortlangcode) { - $tplcontent .= ''."\n"; + $tplcontent .= ''."\n"; } } } @@ -246,7 +246,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage, // Add myself $tplcontent .= 'fk_default_home == $objectpage->id) ? '/' : (($shortlangcode != substr($object->lang, 0, 2)) ? '/'.$shortlangcode : '')).'/'.$objectpage->pageurl.'.php") { ?>'."\n"; - $tplcontent .= ''."\n"; + $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 2c1f8156d92..099843308d4 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2247,10 +2247,9 @@ if ($action == 'create') { $(document).ready(function() { $("#fac_rec").change(function() { console.log("We have changed the template invoice - Reload page"); - var fac_rec = $(this).val(); - var socid = $(\'#socid\').val(); - // For template invoice change, we must reuse data of template, not input already done, so we call a GET with action=create, not a POST submit. - window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&fac_rec="+fac_rec; + // reload page + $("input[name=action]").val("create"); + $("form[name=add]").submit(); }); }); '; diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 9cc470a5954..92a2b8f6b45 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -1562,9 +1562,9 @@ class Website extends CommonObject if ($countrycode == 'us') { $label = preg_replace('/\s*\(.*\)/', '', $label); } - $out .= '
  • '.$label.''; + $out .= '
  • '.$label.''; $out .= ''; - $out .= '
  • '; + $out .= ''; } $i = 0; if (is_array($languagecodes)) { @@ -1583,11 +1583,11 @@ class Website extends CommonObject if ($countrycode == 'us') { $label = preg_replace('/\s*\(.*\)/', '', $label); } - $out .= '
  • '.$label.''; + $out .= '
  • '.$label.''; if (empty($i) && empty($languagecodeselected)) { $out .= ''; } - $out .= '
  • '; + $out .= ''; $i++; } }