[OQRS] Added so that enter works for submit in email input
这个提交包含在:
父节点
09eab7e3e5
当前提交
b80980b42d
共有 3 个文件被更改,包括 29 次插入 和 2 次删除
|
|
@ -62,6 +62,6 @@ The following QSO(s) were found. Please fill out the date and time and submit yo
|
|||
<small id="emailInputHelp" class="form-text text-muted">Your e-mail address where we can contact you</small>
|
||||
</div>
|
||||
|
||||
<button type="button" onclick="submitOqrsRequest(this.form);" class="btn btn-sm btn-primary"><i
|
||||
<button type="button" id="requestSubmit" onclick="submitOqrsRequest(this.form);" class="btn btn-sm btn-primary"><i
|
||||
class="fas fa-plus-square"></i> Submit request</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ The following QSO(s) were found. Please fill out the date and time and submit yo
|
|||
<small id="emailInputHelp" class="form-text text-muted">Your e-mail address where we can contact you</small>
|
||||
</div>
|
||||
|
||||
<button type="button" onclick="submitOqrsRequestGrouped(this.form);" class="btn btn-sm btn-primary"><i
|
||||
<button type="button" id="requestGroupedSubmit" onclick="submitOqrsRequestGrouped(this.form);" class="btn btn-sm btn-primary"><i
|
||||
class="fas fa-plus-square"></i> Submit request</button>
|
||||
</form>
|
||||
<?php } else {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,20 @@ function searchOqrsGrouped() {
|
|||
"paging": false,
|
||||
"scrollX": true,
|
||||
});
|
||||
|
||||
// Get the input field
|
||||
var input = document.getElementById("emailInput");
|
||||
|
||||
// Execute a function when the user presses a key on the keyboard
|
||||
input.addEventListener("keypress", function(event) {
|
||||
// If the user presses the "Enter" key on the keyboard
|
||||
if (event.key === "Enter") {
|
||||
// Cancel the default action, if needed
|
||||
event.preventDefault();
|
||||
// Trigger the button element with a click
|
||||
document.getElementById("requestGroupedSubmit").click();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -192,6 +206,19 @@ function requestOqrs() {
|
|||
"paging": false,
|
||||
"scrollX": true,
|
||||
});
|
||||
// Get the input field
|
||||
var input = document.getElementById("emailInput");
|
||||
|
||||
// Execute a function when the user presses a key on the keyboard
|
||||
input.addEventListener("keypress", function(event) {
|
||||
// If the user presses the "Enter" key on the keyboard
|
||||
if (event.key === "Enter") {
|
||||
// Cancel the default action, if needed
|
||||
event.preventDefault();
|
||||
// Trigger the button element with a click
|
||||
document.getElementById("requestSubmit").click();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
正在加载…
在新工单中引用