diff --git a/.env.dist b/.env.dist
new file mode 100644
index 0000000..cf3cc12
--- /dev/null
+++ b/.env.dist
@@ -0,0 +1,33 @@
+# This file is a "template" of which env vars need to be defined for your application
+# Copy this file to .env file for development, create environment variables when deploying to production
+# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
+
+###> symfony/framework-bundle ###
+APP_ENV=dev
+APP_SECRET=586055cc3c797be63e540ee4ac15fb5a
+#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
+#TRUSTED_HOSTS=localhost,example.com
+###< symfony/framework-bundle ###
+
+###> doctrine/doctrine-bundle ###
+# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
+# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
+# Configure your db driver and server_version in config/packages/doctrine.yaml
+DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
+###< doctrine/doctrine-bundle ###
+EINTRITTSDATUM_ERSTE_HAELFTE=2019-09-10
+EINTRITTSDATUM_ZWEITE_HAELFTE=2020-09-11
+WECHSEL_NKLASSEN_IMPORTKLASSE=2020-09-11
+
+ADMIN_EMAIL=admin@test.de
+ADMIN_PASSWORD=1234
+###> symfony/mailer ###
+MAILER_DSN=smtp://localhost
+###< symfony/mailer ###
+### Mail Settings ###
+MAIL_HOST=smtp.office365.com
+MAIL_USERNAME=test.scherg@schueler.bs1-bt.de
+MAIL_PASSWORD=Ruy26605
+MAIL_PORT=25
+MAIL_SENT_FROM_ADDRESS=test.scherg@schueler.bs1-bt.de
+MAIL_SENT_FROM_NAME='Anmeldung BS I Bayreuth'
diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml
index 3ab6362..59f292a 100644
--- a/config/packages/framework.yaml
+++ b/config/packages/framework.yaml
@@ -8,6 +8,8 @@ framework:
# Remove or comment this section to explicitly disable session support.
session:
handler_id: ~
+ cookie_samesite: 'none'
+ cookie_secure: true
#esi: true
#fragments: true
diff --git a/docker_setup_composer/docker-compose.yaml b/docker_setup_composer/docker-compose.yaml
index 753dfdf..aed5a8f 100644
--- a/docker_setup_composer/docker-compose.yaml
+++ b/docker_setup_composer/docker-compose.yaml
@@ -8,6 +8,7 @@ services:
volumes:
- ./data:/var/lib/mysql
- ./db-entrypoint.sql:/docker-entrypoint-initdb.d/db_entrypoint.sql:ro
+ - ./my.cnf:/etc/mysql/my.cnf
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
@@ -27,7 +28,7 @@ services:
- ${TMP_DIR}:/tmp
ports:
- "8000:8000" #Port Symfony
- - "8080:80" #Port Apache2
+ - "127.0.0.1:8080:80" #Port Apache2
#Command für Testzwecke sinnvoll: Startet Symfony Testserver
#command: symfony server:start
@@ -41,4 +42,4 @@ services:
- '-S'
- '[::]:8282'
- '-t'
- - '/var/www/html'
\ No newline at end of file
+ - '/var/www/html'
diff --git a/docker_setup_composer/my.cnf b/docker_setup_composer/my.cnf
new file mode 100644
index 0000000..a480ba8
--- /dev/null
+++ b/docker_setup_composer/my.cnf
@@ -0,0 +1,10 @@
+[mysqld]
+character-set-server=utf8mb4
+collation-server=utf8mb4_unicode_ci
+
+[client]
+default-character-set=utf8mb4
+
+[mysql]
+default-character-set=utf8mb4
+
diff --git a/public/customStyle.css b/public/customStyle.css
index 4962826..8f5a9f9 100644
--- a/public/customStyle.css
+++ b/public/customStyle.css
@@ -1,3 +1,6 @@
+:root {
+ --school-primary: #0099ff; /* Default primary color for the school */
+}
html{
height: 100%;
@@ -20,7 +23,7 @@ body{
}
#progressbar .active {
- color: #00377B;
+ color: var(--school-primary);
}
#progressbar li {
@@ -80,8 +83,9 @@ body{
}
/* Farbe von Nummer und Connector */
-#progressbar li.active:before, #progressbar li.active:after {
- background: #00377B;
+#progressbar li.active:before,
+#progressbar li.active:after {
+ background: var(--school-primary);
}
/* Animiertes Fortschrittsbalken */
@@ -90,34 +94,26 @@ body{
}
.progress-bar {
- background-color: #00377B;
+ background-color: var(--school-primary);
}
-
-.labelFont{
- font-size: 20px;
- font-weight: bold;
- padding-top: 4%;
+/* Buttons and other elements using school-primary */
+.buttonFont {
+ font-weight: bolder !important;
+ font-size: 20px !important;
+ color: var(--school-primary);
}
-.FontFirst{
- font-size: 20px;
- font-weight: bold;
+.controlButton {
+ border-color: var(--school-primary) !important;
+ margin-bottom: 30px;
+ color: var(--school-primary) !important;
+ background-color: white;
}
-.headlineFont{
- font-weight: bold;
- color: #00377B;
-}
-
-.buttonFont{
- font-weight: bolder!important;
- font-size: 20px!important;
- color: #00377B;
-}
-
-.SpacingSides{
- padding: inherit;
+.controlButton:hover {
+ background-color: var(--school-primary) !important;
+ color: white !important;
}
.containerColor{
@@ -129,114 +125,39 @@ body{
color: #FFFFFF;
}
-.copyright{
- background-color: #222222;
-}
-
-.SpacingTop{
- padding-top: 2%;
-}
-
-.blankLink{
- text-decoration: none!important;
+.containerFooter {
+ background-color: var(--school-primary);
color: #FFFFFF;
}
-.controlButton{
- border-color: #00377B!important;
- margin-bottom: 30px;
- color: #00377B!important;
- background-color: white;
-}
-
-.controlButton:hover{
- background-color: #00377B!important;
- color: white!important;
-}
-
-.greyFooter{
- color: #7e7e7e;
- border-bottom-style: dotted;
- font-size: 15px!important;
-}
-
-.table{
- table-layout:fixed;
-}
-
-.blankLinkButton{
- color: black;
-}
-
-.jumbotron{
- margin-bottom:0!important;
-}
-
-.smallButtonDistance{
- margin-top: 2%;
-}
-
-.RadioBtnSchool{
- margin-right: 10px;
- font-size: large;
- margin-bottom: 20px;
-
-}
-
-.invisibleItems{
- visibility: hidden;
-}
-
-.confirmButton{
+.confirmButton {
border-color: #00cc00;
}
-.confirmButton:hover{
+.confirmButton:hover {
background-color: #00cc00;
color: black;
}
-.redHighlight{
- color: red;
-}
-
-.headlineGlobal{
+.headlineGlobal {
text-decoration: underline;
}
-#copyright{
- font-size: small;
- text-align: center;
- margin-top: 10px;
-}
-
-#copyright a{
- text-decoration: none;
- color: #a6a6a6;
-}
-
-.optimizedPicture{
- background-image: url("/SchulansichtInDenLogofarbenSlideFarbe.png");
- background-size: cover;
- height: 120%;
-}
+/* Additional styles continue... */
@media only screen and (max-width: 768px) {
- .hidePictures{
+ .hidePictures {
display: none;
}
}
@media only screen and (max-width: 400px) {
- .hideLogo{
+ .hideLogo {
display: none;
}
}
-.copyrightLine{
- background-color: #a6a6a6;
- margin-bottom: 10px;
-}
+/* Additional media queries and classes continue... */
.labelFontData{
font-size: medium;
@@ -282,4 +203,4 @@ body{
.importantInfo{
color: red;
-}
\ No newline at end of file
+}
diff --git a/src/Controller/AdminExport.php b/src/Controller/AdminExport.php
index 435c0b1..07c82ac 100644
--- a/src/Controller/AdminExport.php
+++ b/src/Controller/AdminExport.php
@@ -17,6 +17,7 @@ use Dompdf\Options;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
+use PhpOffice\PhpSpreadsheet\Cell\DataType;
use Doctrine\Persistence\ManagerRegistry;
@@ -87,6 +88,27 @@ class AdminExport extends AbstractController
$pathASVxlsx = $dir . '/' . $fileNameASVxlsx;
//Load csv for old registrations
$spreadsheet = $reader->load($pathASV);
+
+ // convert all cells to STRING
+ $sheet = $spreadsheet->getActiveSheet();
+ foreach ($sheet->getRowIterator() as $row)
+ {
+ $cellIterator = $row->getCellIterator();
+ $cellIterator->setIterateOnlyExistingCells(false);
+ foreach ($cellIterator as $cell)
+ {
+ if (!is_null($cell))
+ {
+ $value = $cell->getValue();
+
+ if (is_numeric($value))
+ {
+ $cell->setValueExplicit($value, DataType::TYPE_STRING);
+ }
+ }
+ }
+ }
+
$writer = new Xlsx($spreadsheet);
$writer->save($pathASVxlsx);
$spreadsheet->disconnectWorksheets();
diff --git a/src/Controller/AnmeldungController.php b/src/Controller/AnmeldungController.php
index 069462e..c532bfe 100644
--- a/src/Controller/AnmeldungController.php
+++ b/src/Controller/AnmeldungController.php
@@ -18,6 +18,7 @@ use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpKernel\Attribute\AsController;
use Exception;
use Doctrine\Persistence\ManagerRegistry;
+use App\Repository\BetriebRepository;
class AnmeldungController extends AbstractController
{
diff --git a/src/Controller/MailerController.php b/src/Controller/MailerController.php
index aaac6ae..774e7d6 100644
--- a/src/Controller/MailerController.php
+++ b/src/Controller/MailerController.php
@@ -87,24 +87,26 @@ class MailerController extends AbstractController
try {
//Server settings
- $mail->isSMTP(); // Send using SMTP
- $mail->Host = $_ENV['MAIL_HOST']; // Set the SMTP server to send through
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = $_ENV['MAIL_USERNAME']; // SMTP username
- $mail->Password = $_ENV['MAIL_PASSWORD']; // SMTP password
- $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted
- $mail->Port = $_ENV['MAIL_PORT']; // TCP port to connect to
+ $mail->isSMTP(); // Send using SMTP
+ $mail->Host = $_ENV['MAIL_HOST']; // Set the SMTP server to send through
+ $mail->SMTPAuth = true; // Enable SMTP authentication
+ $mail->Username = $_ENV['MAIL_USERNAME']; // SMTP username
+ $mail->Password = $_ENV['MAIL_PASSWORD']; // SMTP password
+ $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted
+ $mail->Port = $_ENV['MAIL_PORT']; // TCP port to connect to
$mail->setFrom($_ENV['MAIL_SENT_FROM_ADDRESS'], $_ENV['MAIL_SENT_FROM_NAME']);
$mail->addAddress($schueler->getEmail()); // Email Schüler
- if ($regtype == 'BIK' or $regtype == 'BGJZ' or $regtype == 'BGJH') {
- } else{
+ $mail->addBCC($_ENV['MAIL_SECRETARY']);
+
+ if ($regtype != 'BIK' && $regtype != 'BGJZ' && $regtype != 'BGJH') {
$mail->addCC($ausbildung->getAusbilderemail());
- }
+ }
+
$mail->isHTML(true);
$mail->CharSet ="UTF-8";
- $mail->Subject = 'Online-Anmeldung Staatl. Berufsschule I Bayreuth';
+ $mail->Subject = 'Online-Anmeldung Staatl. Berufsschule Pegnitz';
$mail->Body = $htmlMail;
$mail->send();
@@ -147,7 +149,7 @@ class MailerController extends AbstractController
$now = new DateTime();
//$filename = "./pdfdownload/AnmeldungBS1BT-".$untispasswort."-".$now->format('UY-m-dHis').".pdf";
$dir = $this->getParameter('dir.downloads');
- $filename = $dir . "/bestaetigungen/AnmeldungBS1BT-".$untispasswort."-".$now->format('UY-m-dHis').".pdf";
+ $filename = $dir . "/bestaetigungen/AnmeldungBSPeg-".$untispasswort."-".$now->format('UY-m-dHis').".pdf";
file_put_contents($filename, $output);
diff --git a/src/Form/StartType.php b/src/Form/StartType.php
index 31bce31..804b927 100644
--- a/src/Form/StartType.php
+++ b/src/Form/StartType.php
@@ -20,14 +20,14 @@ class StartType extends AbstractType
'Ausbildung mit Ausbildungsvertrag' => 'AUAU',
'EQ-Maßnahme' => 'EQ',
'Umschüler mit Vertrag' => 'UM',
- 'Berufsgrundschuljahr: Holztechnik (Schreiner/Holzmechaniker)' => 'BGJH',
- 'Berufsgrundschuljahr: Zimmerer' => 'BGJZ',
+ //'Berufsgrundschuljahr: Holztechnik (Schreiner/Holzmechaniker)' => 'BGJH',
+ //'Berufsgrundschuljahr: Zimmerer' => 'BGJZ',
//'ohne Berufstätigkeit und arbeitslos' => 'OBA',
//'ungelernte Arbeitskräfte' => 'UAR',
//'Mithelfende Familienangehörige' => 'MF',
//'Ausbildung mit Praktikumsvertrag' => 'AUPR',
//'Berufsvorbereitungsjahr' => 'BVJ',
- 'Berufsintegrationsklasse (BIK)' => 'BIK'
+ //'Berufsintegrationsklasse (BIK)' => 'BIK'
]
])
->add('datenschutz', CheckboxType::class, [
@@ -39,8 +39,8 @@ class StartType extends AbstractType
'label' => 'Schuljahr',
'placeholder' => 'Auswählen...',
'choices' => [
- 'für das kommende Schuljahr (ab 01.08.' . (intval(date("m")) < 8 ? date("Y") : (date("Y")+1)) . ')' => (intval(date("m")) < 8 ? date("Y") . "_" . (date("Y")+1) : (date("Y")+1) . "_" . (date("Y")+2)),
- 'für das laufende Schuljahr (bis 31.07.' . (intval(date("m")) < 8 ? date("Y") : (date("Y")+1)) . ')' => (intval(date("m")) < 8 ? date("Y") . "_" . (date("Y")+1) : (date("Y")+1) . "_" . (date("Y")+2))
+ 'für das kommende Schuljahr (ab 01.08.' . (intval(date("m")) < 8 ? date("Y") : (date("Y")+1)) . ')' => (intval(date("m")) < 8 ? date("Y") . "_" . (date("Y")+1) : (date("Y")+1) . "_" . (date("Y")+2)),
+ 'für das laufende Schuljahr (bis 31.07.' . (intval(date("m")) < 8 ? date("Y") : (date("Y")+1)) . ')' => (intval(date("m")) < 8 ? (date("Y") - 1) . "_" . date("Y") : date("Y") . "_" . (date("Y")+1))
],
'expanded' => true
]);
diff --git a/templates/allgemein/_form.html.twig b/templates/allgemein/_form.html.twig
index e918434..b5024f3 100644
--- a/templates/allgemein/_form.html.twig
+++ b/templates/allgemein/_form.html.twig
@@ -7,7 +7,7 @@
{{ form_widget(form.wohnheim) }}
-
Hier für weitere Informationen zur Wohnheimunterbringung klicken.
+
Hier für weitere Informationen zur Wohnheimunterbringung klicken.
diff --git a/templates/allgemein/_mail_show.html.twig b/templates/allgemein/_mail_show.html.twig
index 635a012..e5225e0 100644
--- a/templates/allgemein/_mail_show.html.twig
+++ b/templates/allgemein/_mail_show.html.twig
@@ -4,13 +4,13 @@