diff options
author | Andrew Dolgov <[email protected]> | 2007-08-20 12:27:19 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-08-20 12:27:19 +0100 |
commit | b652c1b7c4bebf85fbad6d892d8e7ea36e9b2905 (patch) | |
tree | a736b5202ee7495563fd267744aceb7244671c9c /modules/pref-prefs.php | |
parent | 3d0615b9efafbe48e7e40ff4e952f47cc288c581 (diff) |
ajaxify prefs save/reset; update translations
Diffstat (limited to 'modules/pref-prefs.php')
-rw-r--r-- | modules/pref-prefs.php | 31 |
1 files changed, 19 insertions, 12 deletions
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 "<form action=\"backend.php\" method=\"POST\">"; + print "<form action=\"backend.php\" method=\"POST\" id=\"pref_prefs_form\">"; $lnum = 0; @@ -380,10 +386,11 @@ print "<input type=\"hidden\" name=\"op\" value=\"pref-prefs\">"; print "<p><input class=\"button\" type=\"submit\" - name=\"subop\" value=\"".__('Save configuration')."\">"; + onclick=\"return validatePrefsSave()\" + value=\"".__('Save configuration')."\">"; print " <input class=\"button\" type=\"submit\" - name=\"subop\" onclick=\"return validatePrefsReset()\" + onclick=\"return validatePrefsReset()\" value=\"".__('Reset to defaults')."\"></p>"; print "</form>"; |