select table rows and edit user
This commit is contained in:
17
app/public/js/edit_user.js
Normal file
17
app/public/js/edit_user.js
Normal file
@@ -0,0 +1,17 @@
|
||||
//wait for html site to be ready before executing init()
|
||||
if (document.readyState == "complete") {
|
||||
init();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", init);
|
||||
}
|
||||
|
||||
|
||||
function init() {
|
||||
var button = document.getElementById("edit_user");
|
||||
|
||||
button.onclick = function() {
|
||||
var row = document.getElementsByClassName("selected")[0];
|
||||
document.getElementById('user_id_val').value = row.id;
|
||||
this.form.submit();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user