projects
/
e-DoKo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed typo and added a comment
[e-DoKo.git]
/
include
/
preferences.php
diff --git
a/include/preferences.php
b/include/preferences.php
index bd58eac300374f4aa618829b9f31e8de875dc938..57c025fe78fd6635adc85dcbf56d9da2ac365897 100644
(file)
--- a/
include/preferences.php
+++ b/
include/preferences.php
@@
-49,6
+49,8
@@
display_user_menu($myid);
/* get old infos */
$PREF = DB_get_PREF($myid);
/* get old infos */
$PREF = DB_get_PREF($myid);
+/* set language chosen in preferences, will become active on the next reload (see index.php)*/
+$_SESSION['language'] = $PREF['language'];
$timezone = DB_get_user_timezone($myid);
DB_update_user_timestamp($myid);
$timezone = DB_get_user_timezone($myid);
DB_update_user_timestamp($myid);
@@
-424,18
+426,18
@@
if($PREF['autosetup']=="yes")
echo " </select>";
if($changed_autosetup) echo _('changed');
echo " </td></tr>\n";
echo " </select>";
if($changed_autosetup) echo _('changed');
echo " </td></tr>\n";
-echo
" <tr><td>Sorting
: </td><td>\n";
+echo
' <tr><td>'._('Sorting')."
: </td><td>\n";
echo " <select id=\"sorting\" name=\"sorting\" size=\"1\">\n";
if($PREF['sorting']=="high-low")
{
echo " <select id=\"sorting\" name=\"sorting\" size=\"1\">\n";
if($PREF['sorting']=="high-low")
{
- echo " <option value=\"high-low\" selected=\"selected\">
high to low
</option>\n";
- echo " <option value=\"low-high\">
low to high
</option>\n";
+ echo " <option value=\"high-low\" selected=\"selected\">
"._('high to low')."
</option>\n";
+ echo " <option value=\"low-high\">
"._('low to high')."
</option>\n";
}
else
{
}
else
{
- echo " <option value=\"high-low\">
high to low
</option>\n";
- echo " <option value=\"low-high\" selected=\"selected\">
low to high
</option>\n";
+ echo " <option value=\"high-low\">
"._('high to low')."
</option>\n";
+ echo " <option value=\"low-high\" selected=\"selected\">
"._('low to high')."
</option>\n";
}
echo " </select>";
if($changed_sorting) echo _('changed');
}
echo " </select>";
if($changed_sorting) echo _('changed');
@@
-444,13
+446,13
@@
echo ' <tr><td>'._('Open for new games').": </td><td>\n";
echo " <select id=\"open_for_games\" name=\"open_for_games\" size=\"1\">\n";
if($PREF['open_for_games']=="no")
{
echo " <select id=\"open_for_games\" name=\"open_for_games\" size=\"1\">\n";
if($PREF['open_for_games']=="no")
{
- echo
" <option value=\"yes\">"
._('yes')."</option>\n";
- echo
" <option value=\"no\" selected=\"selected\">no
</option>\n";
+ echo
' <option value="yes">'
._('yes')."</option>\n";
+ echo
' <option value="no" selected="selected">'._('no')."
</option>\n";
}
else /* default */
{
}
else /* default */
{
- echo
" <option value=\"yes\" selected=\"selected\">yes
</option>\n";
- echo
" <option value=\"no\">"
._('no')."</option>\n";
+ echo
' <option value="yes" selected="selected">'._('yes')."
</option>\n";
+ echo
' <option value="no">'
._('no')."</option>\n";
}
echo " </select>";
if($changed_openforgames) echo _('changed');
}
echo " </select>";
if($changed_openforgames) echo _('changed');
@@
-520,7
+522,7
@@
$openids = DB_GetOpenIDsByUser($myid);
if(sizeof($openids))
{
echo " <table class=\"openid\">\n";
if(sizeof($openids))
{
echo " <table class=\"openid\">\n";
- echo
" <thead><tr><th>Delete
?</th><th>OpenId</th></tr></thead>\n";
+ echo
' <thead><tr><th>'._('Delete')."
?</th><th>OpenId</th></tr></thead>\n";
echo " <tbody>\n";
foreach ($openids as $ids)
{
echo " <tbody>\n";
foreach ($openids as $ids)
{
@@
-544,14
+546,7
@@
echo "</div>\n";
// add jquery date picker if html5 is not available
?>
<script>
// add jquery date picker if html5 is not available
?>
<script>
- var i = document.createElement("input");
- i.setAttribute("type", "date");
- if (i.type == "text") {
- $(":date").dateinput({
-
- format: 'yyyy-mm-dd',
- });
- }
+ $(".date").dateinput({ format: 'yyyy-mm-dd' });
</script>
<?php
</script>
<?php