implemented update_user in user panel
This commit is contained in:
parent
497ed6e093
commit
67f704d19e
@ -1,5 +1,5 @@
|
|||||||
<div id="info_pane">
|
<div id="info_pane">
|
||||||
<button onclick="update_user()" id="save_btn" class="btn">Uložit Změny</button>
|
<button onclick="update()" id="save_btn" class="btn">Uložit Změny</button>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var button_buffer = document.getElementById("info_pane").innerHTML;
|
var button_buffer = document.getElementById("info_pane").innerHTML;
|
||||||
@ -12,4 +12,16 @@
|
|||||||
inject_info("#info_pane", result.username, button_buffer);
|
inject_info("#info_pane", result.username, button_buffer);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function update()
|
||||||
|
{
|
||||||
|
$.ajax
|
||||||
|
({
|
||||||
|
url: "./res/forum/api/get_username.php",
|
||||||
|
success: function(result)
|
||||||
|
{
|
||||||
|
update_user(result.username, document.getElementById("username").value, document.getElementById("nickname").value, document.getElementById("admin").value, document.getElementById("sex").value,document.getElementById("bio").value, "user");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user