not showing admin and username seleciton to user
it wont do anything so yk
This commit is contained in:
parent
69824f6886
commit
6b08b62510
@ -31,8 +31,10 @@ function selection(type, value)
|
||||
});
|
||||
}
|
||||
|
||||
function inject_info(id, username, postfix)
|
||||
async function inject_info(id, username, postfix)
|
||||
{
|
||||
let am_i_admin = await is_admin();
|
||||
|
||||
$.ajax
|
||||
({
|
||||
url: "./res/forum/api/user_info.php?username=" + username,
|
||||
@ -42,10 +44,10 @@ function inject_info(id, username, postfix)
|
||||
let sex_select = await selection("sex", result.sex);
|
||||
|
||||
let output =
|
||||
`Uživatelské jméno: <input id="username" class="editable" type="text" value="${result.username}"><br>
|
||||
Přezdívka: <input id="nickname" class="editable" type="text" value="${result.nickname}"><br>
|
||||
Admin: ${admin_select}<br>
|
||||
Pohlaví: ${sex_select}<br>
|
||||
((am_i_admin) ? `Uživatelské jméno: <input id="username" class="editable" type="text" value="${result.username}"><br>` : ``) +
|
||||
`Přezdívka: <input id="nickname" class="editable" type="text" value="${result.nickname}"><br>` +
|
||||
((am_i_admin) ? `Admin: ${admin_select}<br>` : ``) +
|
||||
`Pohlaví: ${sex_select}<br>
|
||||
Bio: <input id="bio" class="editable" type="text" value="${result.bio}"><br>`;
|
||||
|
||||
$(id).html(output + postfix);
|
||||
|
Loading…
x
Reference in New Issue
Block a user