Skip to content

Commit aec3dbe

Browse files
committed
Review Forms: event and method submit
1 parent 9322fc5 commit aec3dbe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

2-ui/4-forms-controls/4-forms-submit/1-modal-dialog/solution.view/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ <h2>Click the button below</h2>
2323
</div>
2424

2525
<script>
26-
// Show a half-transparent DIV to "shadow" the page
26+
// Mostriamo un DIV semi trasparente per "nascondere" la pagina
2727
// (the form is not inside, but near it, because it shouldn't be half-transparent)
2828
function showCover() {
2929
let coverDiv = document.createElement('div');
3030
coverDiv.id = 'cover-div';
3131

32-
// make the page unscrollable while the modal form is open
32+
// facciamo in modo che la pagina non sia scrollabile mentre la modale con il form è aperta
3333
document.body.style.overflowY = 'hidden';
3434

3535
document.body.append(coverDiv);
@@ -56,7 +56,7 @@ <h2>Click the button below</h2>
5656

5757
form.onsubmit = function() {
5858
let value = form.text.value;
59-
if (value == '') return false; // ignore empty submit
59+
if (value == '') return false; // ignoriamo i submit vuoti
6060

6161
complete(value);
6262
return false;

2-ui/4-forms-controls/4-forms-submit/1-modal-dialog/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ importance: 5
44

55
# Modal form
66

7-
Creare una funzione `showPrompt(html, callback)` che mostra un form con un messaggio `html`, un campo di input ed i pulsanti `OK/CANCEL`.
7+
Create una funzione `showPrompt(html, callback)` che mostra un form con un messaggio `html`, un campo di input ed i pulsanti `OK/CANCEL`.
88

99
- Un utente dovrebbe digitare qualcosa nel campo di testo e premere `key:Enter` o il pulsante OK, quindi verrà chiamata `callback(value)` con il valore che è stato inserito.
1010
- Altrimenti, se l'utente preme `key:Esc` oppure CANCEL, viene chiamata `callback(null)`.

0 commit comments

Comments
 (0)