-
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
1 parent
7218dd3
commit 6615b13
Showing
8 changed files
with
50 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,19 +66,19 @@ public void init() { | |
|
||
private void initSchool() { | ||
if(this.schoolRepository.count()==0){ | ||
SchoolEntity school=new SchoolEntity().setCity("Kyustendil").setName("PMG Prof. Emanuil Ivanov"); | ||
SchoolEntity school=new SchoolEntity().setCity("Кюстендил").setName("ПМГ 'Проф. Емануил Иванов'"); | ||
this.schoolRepository.saveAndFlush(school); | ||
} | ||
} | ||
|
||
public void initSuperAdmin() { | ||
if (this.userRepository.count() == 0) { | ||
UserEntity user = new UserEntity() | ||
.setFirstName("Nikol") | ||
.setLastName("Georgieva") | ||
.setFirstName("Никол") | ||
.setLastName("Георгиева") | ||
.setEmail("[email protected]") | ||
.setPassword(passwordEncoder.encode("nikol@superadmin")) | ||
.setSchool(this.schoolRepository.findSchoolEntityBySchoolName("PMG Prof. Emanuil Ivanov")) | ||
.setSchool(this.schoolRepository.findSchoolEntityBySchoolName("ПМГ 'Проф. Емануил Иванов'")) | ||
.setRoles(userRoleRepository.findAll()); | ||
this.userRepository.saveAndFlush(user); | ||
} | ||
|
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 |
---|---|---|
|
@@ -9,6 +9,11 @@ home_if_have=If you have an account - here. | |
home_login=log in | ||
home_register=sign up | ||
title_home= Home | ||
title_login = Log in | ||
title_register= Register | ||
title_howto= How to add your school? | ||
login_login=Log in | ||
login_email=Email | ||
login_err=Invalid username or password. | ||
|
@@ -27,3 +32,6 @@ err_email=Email should be unique | |
err_school=At least 15 symbols. | ||
err_pass=At least 8 characters and 1 digit | ||
err_confirm_pass=Passwords should match | ||
howto_welcome=Welcome to PE Scores | ||
howto_text=If you want your school to become part of us, please send us an email to [email protected] with the name of the school, the city and the future username of your admin. Then we will add the school to the platform and the admin will be able to make registration. |
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 |
---|---|---|
|
@@ -9,6 +9,11 @@ home_if_have = Ако имате акаунт - тук | |
home_login= влезте | ||
home_register = регистрирайте се | ||
|
||
title_home= Начална страница | ||
title_login = Вход | ||
title_register= Регистрация | ||
title_howto= Как да добавите училището си? | ||
|
||
login_login= Вход | ||
login_email = Имейл | ||
login_err=Невалидно име или парола | ||
|
@@ -26,4 +31,7 @@ err_name=Между 2 и 15 букви | |
err_email=Имейлът трябва да бъде уникален | ||
err_school=Поне 15 символа | ||
err_pass=Поне 8 символа и поне 1 число | ||
err_confirm_pass=Паролите трябва да съвпадат | ||
err_confirm_pass=Паролите трябва да съвпадат | ||
|
||
howto_welcome=Добре дошли | ||
howto_text=Ако искате да станете част от нас, моля изпратете имейл на [email protected] с името на училището, градът и бъдещото потребителско име на админа ви. След това ние ще добавим училището в платформата и админът ще може да направи регистрация и да започне да изгражда училището в платформата. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"> | ||
|
||
<head> | ||
<title>Contact</title> | ||
<title th:text="#{title_howto}">How to add your school?</title> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
@@ -24,8 +24,21 @@ | |
|
||
<nav class="navbar"> | ||
<ul class="navbar-buttons" sec:authorize="!isAuthenticated()"> | ||
<a th:href="@{/users/login}">Log in</a> | ||
<a th:href="@{/users/register}">Sign up</a> | ||
<a th:href="@{/contact}" th:text="#{navbar_add_school}">How to add your school?</a> | ||
<a th:href="@{/users/login}" th:text="#{navbar_login}">Log in</a> | ||
<a th:href="@{/users/register}" th:text="#{navbar_register}">Register</a> | ||
<a class="nav-item"> | ||
<form th:method="get"> | ||
<label class="text-white" th:text="#{navbar_language}" for="lang"></label> | ||
<select | ||
onchange="this.form.submit()" | ||
id="lang" | ||
name="lang"> | ||
<option value="en_US" th:selected="${#locale.toString()} == 'en_US'">English</option> | ||
<option value="bg_BG" th:selected="${#locale.toString()} == 'bg_BG'">Български</option> | ||
</select> | ||
</form> | ||
</a> | ||
</ul> | ||
|
||
<ul class="navbar-buttons" sec:authorize="isAuthenticated()"> | ||
|
@@ -53,8 +66,8 @@ | |
<div sec:authorize="!isAuthenticated()" class="main-section-wrap"> | ||
<section class="main-section"> | ||
<div class="main-text"> | ||
<h3>Welcome to PE Scores.</h3> | ||
<p>If you want your school to become part of us, please send us an email to [email protected] with the name of the school, | ||
<h3 th:text="#{howto_welcome}">Welcome to PE Scores</h3> | ||
<p th:text="#{howto_text}">If you want your school to become part of us, please send us an email to [email protected] with the name of the school, | ||
the city and the future username of your admin. Then we will add the school to the platform and the admin | ||
will be able to make registration.</p> | ||
|
||
|
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