[fix #1411] user: new form ui
This commit is contained in:
parent
5aa9a5ac6c
commit
d702a0c083
11 changed files with 461 additions and 52 deletions
|
@ -42,4 +42,16 @@ addEventListener("direct-upload:end", function (event) {
|
|||
element = document.getElementById("direct-upload-" + id);
|
||||
|
||||
element.classList.add("direct-upload--complete");
|
||||
});
|
||||
});
|
||||
|
||||
addEventListener('load', function() {
|
||||
var submitButtons = document.querySelectorAll('form button[type=submit][data-action]');
|
||||
var hiddenInput = document.querySelector('form input[type=hidden][name=submit_action]');
|
||||
submitButtons = [].slice.call(submitButtons);
|
||||
|
||||
submitButtons.forEach(function(button) {
|
||||
button.addEventListener('click', function() {
|
||||
hiddenInput.value = button.getAttribute('data-action');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue