Fix: javascript content must be in utf8

This commit is contained in:
Laurent Destailleur 2010-08-19 19:04:49 +00:00
parent 4ef58f0f5c
commit 58a5a866f3

View File

@ -1695,15 +1695,15 @@ class Form
/** /**
* \brief Show a confirmation HTML form or AJAX popup * Show a confirmation HTML form or AJAX popup
* \param page page Url of page to call if confirmation is OK * @param page Url of page to call if confirmation is OK
* \param title title * @param title title
* \param question question * @param question question
* \param action action * @param action action
* \param formquestion an array with forms complementary inputs * @param formquestion an array with forms complementary inputs
* \param selectedchoice "" or "no" or "yes" * @param selectedchoice "" or "no" or "yes"
* \param useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No * @param useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No
* \param string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form * @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form
*/ */
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0) function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0)
{ {
@ -1789,11 +1789,11 @@ class Form
'.($pageno?'if (choice == \'ko\') location.href=\''.$pageno.'\';':'').' '.($pageno?'if (choice == \'ko\') location.href=\''.$pageno.'\';':'').'
}, },
buttons: { buttons: {
\''.dol_escape_js($langs->trans("Yes")).'\': function() { \''.dol_escape_js($langs->transnoentities("Yes")).'\': function() {
choice=\'ok\'; choice=\'ok\';
jQuery(this).dialog(\'close\'); jQuery(this).dialog(\'close\');
}, },
\''.dol_escape_js($langs->trans("No")).'\': function() { \''.dol_escape_js($langs->transnoentities("No")).'\': function() {
choice=\'ko\'; choice=\'ko\';
jQuery(this).dialog(\'close\'); jQuery(this).dialog(\'close\');
} }