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.
- Loading branch information
mikrise2
committed
Oct 31, 2023
1 parent
e6068b9
commit 440d074
Showing
8 changed files
with
81 additions
and
10 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
12 changes: 12 additions & 0 deletions
12
ijPlugin/src/main/kotlin/org/jetbrains/research/tasktracker/util/notifier/NotifyError.kt
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.jetbrains.research.tasktracker.util.notifier | ||
|
||
import com.intellij.notification.NotificationGroupManager | ||
import com.intellij.notification.NotificationType | ||
import com.intellij.openapi.project.Project | ||
import org.jetbrains.annotations.Nls | ||
|
||
fun notifyError(project: Project, content: @Nls String?) { | ||
println("hello") | ||
NotificationGroupManager.getInstance().getNotificationGroup("Tasktracker") | ||
.createNotification(content ?: "Unknown error", NotificationType.ERROR).notify(project) | ||
} |
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
2 changes: 1 addition & 1 deletion
2
ijPlugin/src/main/resources/org/jetbrains/research/tasktracker/config/agreement_default.yaml
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,4 +1,4 @@ | ||
agreements: | ||
- text: "example" | ||
required: false | ||
- text: "example1" | ||
- text: "example1 <a href=\"https://github.com/JetBrains-Research/tasktracker-3\">link</a>" |
27 changes: 21 additions & 6 deletions
27
...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,15 +1,30 @@ | ||
<div class="container"> | ||
<label for="name">Please write your name: </label> | ||
<input type="text" name="name" id="name" placeholder="Name" required> | ||
<div class="form-group"> | ||
<label for="name">Please put your name: </label> | ||
<input type="text" name="name" id="name" placeholder="Name" required> | ||
</div> | ||
<br> | ||
<label for="email">Please write your email: </label> | ||
<input type="email" name="email" id="email" placeholder="[email protected]" required> | ||
<br> | ||
%s | ||
<div class="form-group"> | ||
<label for="email">Please put your email: </label> | ||
<input type="email" name="email" id="email" placeholder="[email protected]" required> | ||
</div> | ||
<div class="agreement-container"> | ||
<p>I agree to the terms and conditions:</p> | ||
%s | ||
<p><span style="color: red">*</span> - Required field</p> | ||
</div> | ||
</div> | ||
<script> | ||
let requiredFields = document.querySelectorAll('input[required]') | ||
|
||
// Loop through each required input element and add the 'required' class to its parent label | ||
requiredFields.forEach(function(inputElement) { | ||
const parentLabel = inputElement.parentElement.querySelector('label'); | ||
if (parentLabel) { | ||
parentLabel.classList.add('required'); | ||
} | ||
}); | ||
|
||
requiredFields.forEach(function (field) { | ||
field.onclick = function () { | ||
if (field.type === "checkbox") { | ||
|
32 changes: 32 additions & 0 deletions
32
...ain/resources/org/jetbrains/research/tasktracker/ui/main/panel/template/css/agreement.css
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.form-group { | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: 3vmin; | ||
} | ||
|
||
.form-group label{ | ||
margin-bottom: 2vmin; | ||
} | ||
|
||
label { | ||
font-size: 2vmin; | ||
} | ||
|
||
.agreement-container { | ||
margin-top: 25vmin; | ||
align-items: flex-start; | ||
text-align: left; | ||
justify-content: left; | ||
width: 70vw; | ||
} | ||
|
||
.agreement-container div{ | ||
display:flex; | ||
align-items:center; | ||
} | ||
|
||
.required:after{ | ||
content:" *"; | ||
font-weight:bold; | ||
color:red; | ||
} |