added parent edit page
This commit is contained in:
30
dispatcher/static/edit.css
Normal file
30
dispatcher/static/edit.css
Normal file
@ -0,0 +1,30 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: 30em;
|
||||
align-self: center;
|
||||
gap: 2em;
|
||||
}
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.6em;
|
||||
}
|
||||
|
||||
form > div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4em;
|
||||
}
|
||||
|
||||
form label {
|
||||
font-style: italic;
|
||||
color: var(--light2);
|
||||
}
|
||||
|
||||
form button {
|
||||
align-self: center;
|
||||
padding: 0.4em 1.2em;
|
||||
}
|
8
dispatcher/static/parents.js
Normal file
8
dispatcher/static/parents.js
Normal file
@ -0,0 +1,8 @@
|
||||
window.addEventListener("load", () => {
|
||||
document.querySelectorAll(".list li").forEach(row => {
|
||||
let id = row.dataset.id
|
||||
row.querySelector("button.edit").addEventListener("click", () => {
|
||||
window.location.href = `${id}/`
|
||||
})
|
||||
})
|
||||
})
|
@ -11,7 +11,7 @@ window.addEventListener("load", () => {
|
||||
})
|
||||
})
|
||||
|
||||
row.querySelector("button.see").addEventListener("click", () => {
|
||||
row.querySelector("button.edit").addEventListener("click", () => {
|
||||
window.location.href = `${id}/`
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user