diff --git a/src/main/java/io/hexlet/typoreporter/service/dto/FieldMatchConsiderCase.java b/src/main/java/io/hexlet/typoreporter/service/dto/FieldMatchConsiderCase.java
index 3e3b489f..211f42d1 100644
--- a/src/main/java/io/hexlet/typoreporter/service/dto/FieldMatchConsiderCase.java
+++ b/src/main/java/io/hexlet/typoreporter/service/dto/FieldMatchConsiderCase.java
@@ -3,14 +3,11 @@
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
-import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
/**
* Validation annotation to validate that 2 fields have the same value.
* An array of fields and their matching confirmation fields can be supplied.
@@ -27,6 +24,8 @@
* message = "The password and it confirmation must match")}
*/
@Constraint(validatedBy = FieldMatchConsiderCaseValidator.class)
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
public @interface FieldMatchConsiderCase {
String message() default "The {first} and {second} fields must be equal";
@@ -45,16 +44,4 @@
*/
String second();
- /**
- * Defines several @FieldMatch
annotations on the same element
- *
- * @see FieldMatchConsiderCase
- */
- @Target({TYPE, ANNOTATION_TYPE})
- @Retention(RUNTIME)
- @Documented
- @interface List {
-
- FieldMatchConsiderCase[] value();
- }
}
diff --git a/src/main/java/io/hexlet/typoreporter/web/model/SignupAccountModel.java b/src/main/java/io/hexlet/typoreporter/web/model/SignupAccountModel.java
index b475a10b..16b51637 100644
--- a/src/main/java/io/hexlet/typoreporter/web/model/SignupAccountModel.java
+++ b/src/main/java/io/hexlet/typoreporter/web/model/SignupAccountModel.java
@@ -19,7 +19,7 @@
@FieldMatchConsiderCase(
first = "password",
second = "confirmPassword",
- message = "The password and it confirmation must match")
+ message = "{alert.passwords-dont-match}")
@ToString
public class SignupAccountModel {
diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties
index 0585010a..055660df 100644
--- a/src/main/resources/messages_en.properties
+++ b/src/main/resources/messages_en.properties
@@ -68,6 +68,7 @@ wks.placeholder.descr=Workspace Description
wks.info=Info
wks.typos=Typos
wks.users=Users
+wks.users.email-placeholder=Enter user email. For example: hexlet@gmail.com
wks.settings=Settings
wks.urls=URLs
wks.integration=Integration
@@ -107,3 +108,4 @@ btn.delete-from-wks=Delete from workspace
alert.password-wrong-format=Password must be between 8 and 20 characters \
and contain only latin letters, digits and symbols ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/
link.sign-in-with-github=Sign in with GitHub
+alert.passwords-dont-match=Confirmation does not match the password
diff --git a/src/main/resources/messages_ru.properties b/src/main/resources/messages_ru.properties
index 6bb51d97..c102a8bd 100644
--- a/src/main/resources/messages_ru.properties
+++ b/src/main/resources/messages_ru.properties
@@ -73,6 +73,7 @@ wks.placeholder.descr=Описание Пространства
wks.info=Информация
wks.typos=Опечатки
wks.users=Пользователи
+wks.users.email-placeholder=Введите адрес электронной почты пользователя. Например: hexlet@gmail.com
wks.settings=Настройки
wks.urls=Домены
wks.integration=Интеграция
@@ -105,3 +106,4 @@ alert.password-wrong-format=Пароль должен быть от 8 до 20 с
\ и содержать только буквы латинского алфавита,\
\ цифры и символы ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/
link.sign-in-with-github=Войти с помощью: GitHub
+alert.passwords-dont-match=Подтверждение не совпадает с паролем
diff --git a/src/main/resources/templates/workspace/wks-integration.html b/src/main/resources/templates/workspace/wks-integration.html
index f0d431b2..190249e8 100644
--- a/src/main/resources/templates/workspace/wks-integration.html
+++ b/src/main/resources/templates/workspace/wks-integration.html
@@ -6,19 +6,33 @@
-
+
-<script src="https://cdn.jsdelivr.net/gh/hexlet/hexlet-correction@main/src/widget/index.js"></script>;
-
<script>
- handleTypoReporter({ authorizationToken: '[[${wksBasicToken}]]',
- workSpaceUrl: '[[${rootUrl}]]', workSpaceId: '[[${wksId}]]'})
-</script>
-
-
+function loadScript(src, callback) {
+ const body = document.querySelector('body')
+ const script = document.createElement('script');
+ script.src = src;
+ script.onload = callback;
+ body.appendChild(script);
+};
+
+document.addEventListener('DOMContentLoaded', function () {
+ const scriptSrc = 'https://cdn.jsdelivr.net/gh/hexlet/hexlet-correction@latest/src/widget/index.js?v=' + new Date().getTime();
+ loadScript(scriptSrc, function () {
+ handleTypoReporter({
+ authorizationToken: '[[${wksBasicToken}]]',
+ workSpaceUrl: '[[${rootUrl}]]',
+ workSpaceId: '[[${wksId}]]'})
+ });
+});
+</script>
+
+
+
diff --git a/src/main/resources/templates/workspace/wks-users.html b/src/main/resources/templates/workspace/wks-users.html
index b7023c12..3e5f68f3 100644
--- a/src/main/resources/templates/workspace/wks-users.html
+++ b/src/main/resources/templates/workspace/wks-users.html
@@ -24,7 +24,7 @@