generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML4SE-185] check agreement conditions on agreement page.
- Loading branch information
mikrise2
committed
Oct 25, 2023
1 parent
f87fb74
commit fc35cc0
Showing
7 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 32 additions & 3 deletions
35
...c/main/resources/org/jetbrains/research/tasktracker/ui/main/panel/template/agreement.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,38 @@ | ||
<div class="container"> | ||
<label for="name">Please write your name: </label> | ||
<input type="text" name="name" id="name" placeholder="Name"> | ||
<input type="text" name="name" id="name" placeholder="Name" required> | ||
<br> | ||
<label for="email">Please write your email: </label> | ||
<input type="email" name="email" id="email" placeholder="[email protected]"> | ||
<input type="email" name="email" id="email" placeholder="[email protected]" required> | ||
<br> | ||
%s | ||
</div> | ||
</div> | ||
<script> | ||
let requiredFields = document.querySelectorAll('input[required]') | ||
|
||
requiredFields.forEach(function (field) { | ||
field.onclick = function () { | ||
if (field.type === "checkbox") { | ||
field.style.outline = '1px solid black' | ||
} else { | ||
field.style.border = '1px solid black'; | ||
} | ||
}; | ||
}); | ||
|
||
function allChecked() { | ||
let emptyRequiredFields = []; | ||
requiredFields.forEach(function (field) { | ||
if (field.type === "checkbox") { | ||
if (!field.checked) { | ||
emptyRequiredFields.push(field); | ||
field.style.outline = '1px solid red' | ||
} | ||
} else if (field.value.trim() === "") { | ||
emptyRequiredFields.push(field); | ||
field.style.border = "1px solid red" | ||
} | ||
}); | ||
return emptyRequiredFields.length > 0 | ||
} | ||
</script> |