From b652c1b7c4bebf85fbad6d892d8e7ea36e9b2905 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Aug 2007 12:27:19 +0100 Subject: ajaxify prefs save/reset; update translations --- modules/pref-prefs.php | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'modules') diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 3584c622f..2564f30e4 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -56,9 +56,9 @@ return; - } else if ($subop == __("Save configuration")) { + } else if ($subop == "save-config") { - $_SESSION["prefs_op_result"] = "save-config"; +# $_SESSION["prefs_op_result"] = "save-config"; $_SESSION["prefs_cache"] = false; @@ -98,7 +98,11 @@ } - return prefs_js_redirect(); + #return prefs_js_redirect(); + + print __("The configuration was saved."); + + return; } else if ($subop == "getHelp") { @@ -122,11 +126,11 @@ db_query($link, "UPDATE ttrss_users SET email = '$email' WHERE id = '$active_uid'"); - print "E-mail has been changed."; + print __("E-mail has been changed."); return; - } else if ($subop == __("Reset to defaults")) { + } else if ($subop == "reset-config") { $_SESSION["prefs_op_result"] = "reset-to-defaults"; @@ -134,7 +138,9 @@ WHERE owner_uid = ".$_SESSION["uid"]); initialize_user_prefs($link, $_SESSION["uid"]); - return prefs_js_redirect(); + print __("The configuration was reset to defaults."); + + return; } else if ($subop == __("Change theme")) { @@ -195,9 +201,9 @@ print format_notice(__("The configuration was reset to defaults.")); } - if ($_SESSION["prefs_op_result"] == "save-config") { - print format_notice(__("The configuration was saved.")); - } +# if ($_SESSION["prefs_op_result"] == "save-config") { +# print format_notice(__("The configuration was saved.")); +# } $_SESSION["prefs_op_result"] = ""; @@ -310,7 +316,7 @@ owner_uid = ".$_SESSION["uid"]." ORDER BY section_id,short_desc"); - print "
"; + print ""; $lnum = 0; @@ -380,10 +386,11 @@ print ""; print "

"; + onclick=\"return validatePrefsSave()\" + value=\"".__('Save configuration')."\">"; print " 

"; print "
"; -- cgit v1.2.3-54-g00ecf