|
|
@ -12,7 +12,7 @@ class Pref_Users extends Handler_Protected {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function csrf_ignore($method) {
|
|
|
|
function csrf_ignore($method) {
|
|
|
|
$csrf_ignored = array("index");
|
|
|
|
$csrf_ignored = array("index", "edit");
|
|
|
|
|
|
|
|
|
|
|
|
return array_search($method, $csrf_ignored) !== false;
|
|
|
|
return array_search($method, $csrf_ignored) !== false;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -102,11 +102,11 @@ class Pref_Users extends Handler_Protected {
|
|
|
|
global $access_level_names;
|
|
|
|
global $access_level_names;
|
|
|
|
|
|
|
|
|
|
|
|
$id = $this->dbh->escape_string($_REQUEST["id"]);
|
|
|
|
$id = $this->dbh->escape_string($_REQUEST["id"]);
|
|
|
|
print "<form id=\"user_edit_form\" onsubmit='return false'>";
|
|
|
|
print "<form id=\"user_edit_form\" onsubmit='return false' dojoType=\"dijit.form.Form\">";
|
|
|
|
|
|
|
|
|
|
|
|
print "<input type=\"hidden\" name=\"id\" value=\"$id\">";
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$id\">";
|
|
|
|
print "<input type=\"hidden\" name=\"op\" value=\"pref-users\">";
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-users\">";
|
|
|
|
print "<input type=\"hidden\" name=\"method\" value=\"editSave\">";
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
|
|
|
|
|
|
|
|
|
|
|
|
$result = $this->dbh->query("SELECT * FROM ttrss_users WHERE id = '$id'");
|
|
|
|
$result = $this->dbh->query("SELECT * FROM ttrss_users WHERE id = '$id'");
|
|
|
|
|
|
|
|
|
|
|
@ -120,16 +120,14 @@ class Pref_Users extends Handler_Protected {
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
|
|
|
|
|
|
|
|
if ($sel_disabled) {
|
|
|
|
if ($sel_disabled) {
|
|
|
|
print "<input type=\"hidden\" name=\"login\" value=\"$login\">";
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"login\" value=\"$login\">";
|
|
|
|
print "<input size=\"30\" style=\"font-size : 16px\"
|
|
|
|
|
|
|
|
onkeypress=\"return filterCR(event, userEditSave)\" $sel_disabled
|
|
|
|
|
|
|
|
value=\"$login\">";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
print "<input size=\"30\" style=\"font-size : 16px\"
|
|
|
|
|
|
|
|
onkeypress=\"return filterCR(event, userEditSave)\" $sel_disabled
|
|
|
|
|
|
|
|
name=\"login\" value=\"$login\">";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "<input size=\"30\" style=\"font-size : 16px\"
|
|
|
|
|
|
|
|
dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"
|
|
|
|
|
|
|
|
onkeypress=\"return filterCR(event, userEditSave)\" $sel_disabled
|
|
|
|
|
|
|
|
name=\"login\" value=\"$login\">";
|
|
|
|
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
print "</div>";
|
|
|
|
|
|
|
|
|
|
|
|
print "<div class=\"dlgSec\">".__("Authentication")."</div>";
|
|
|
|
print "<div class=\"dlgSec\">".__("Authentication")."</div>";
|
|
|
@ -139,17 +137,16 @@ class Pref_Users extends Handler_Protected {
|
|
|
|
|
|
|
|
|
|
|
|
if (!$sel_disabled) {
|
|
|
|
if (!$sel_disabled) {
|
|
|
|
print_select_hash("access_level", $access_level, $access_level_names,
|
|
|
|
print_select_hash("access_level", $access_level, $access_level_names,
|
|
|
|
$sel_disabled);
|
|
|
|
"dojoType=\"dijit.form.Select\" $sel_disabled");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
print_select_hash("", $access_level, $access_level_names,
|
|
|
|
print_select_hash("", $access_level, $access_level_names,
|
|
|
|
$sel_disabled);
|
|
|
|
"dojoType=\"dijit.form.Select\" $sel_disabled");
|
|
|
|
print "<input type=\"hidden\" name=\"access_level\" value=\"$access_level\">";
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"access_level\" value=\"$access_level\">";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print "<br/>";
|
|
|
|
print "<hr/>";
|
|
|
|
|
|
|
|
|
|
|
|
print __('Change password to') .
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" type=\"password\" size=\"20\" onkeypress=\"return filterCR(event, userEditSave)\" placeholder=\"Change password to\"
|
|
|
|
" <input type=\"password\" size=\"20\" onkeypress=\"return filterCR(event, userEditSave)\"
|
|
|
|
|
|
|
|
name=\"password\">";
|
|
|
|
name=\"password\">";
|
|
|
|
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
print "</div>";
|
|
|
@ -157,8 +154,7 @@ class Pref_Users extends Handler_Protected {
|
|
|
|
print "<div class=\"dlgSec\">".__("Options")."</div>";
|
|
|
|
print "<div class=\"dlgSec\">".__("Options")."</div>";
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
|
|
|
|
|
|
|
|
print __('E-mail: ').
|
|
|
|
print "<input dojoType=\"dijit.form.TextBox\" size=\"30\" name=\"email\" onkeypress=\"return filterCR(event, userEditSave)\" placeholder=\"Email\"
|
|
|
|
" <input size=\"30\" name=\"email\" onkeypress=\"return filterCR(event, userEditSave)\"
|
|
|
|
|
|
|
|
value=\"$email\">";
|
|
|
|
value=\"$email\">";
|
|
|
|
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
print "</div>";
|
|
|
@ -168,9 +164,9 @@ class Pref_Users extends Handler_Protected {
|
|
|
|
print "</form>";
|
|
|
|
print "</form>";
|
|
|
|
|
|
|
|
|
|
|
|
print "<div class=\"dlgButtons\">
|
|
|
|
print "<div class=\"dlgButtons\">
|
|
|
|
<button onclick=\"return userEditSave()\">".
|
|
|
|
<button dojoType=\"dijit.form.Button\" type=\"submit\">".
|
|
|
|
__('Save')."</button>
|
|
|
|
__('Save')."</button>
|
|
|
|
<button onclick=\"return userEditCancel()\">".
|
|
|
|
<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('userEditDlg').hide()\">".
|
|
|
|
__('Cancel')."</button></div>";
|
|
|
|
__('Cancel')."</button></div>";
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|