Fully built self-aware formatting and validating PDF
This commit is contained in:
parent
b92b168874
commit
2b1944ead0
@ -1,5 +1,17 @@
|
||||
% !TEX root = ../Main.tex
|
||||
|
||||
|
||||
% Input Validation: Summe
|
||||
\newcommand{\validateCurrency}{\detokenize{
|
||||
var amount = String(event.value ?? "0").replaceAll(".", "").replaceAll(",", ".");
|
||||
if (amount && (isNaN(amount) || parseFloat(amount) < 0)) {
|
||||
app.alert("Ungueltiger Betrag: " + event.value + ". Bitte geben Sie eine gueltige Zahl ein.");
|
||||
event.rc = false;
|
||||
} else {
|
||||
event.value = parseFloat(amount).toLocaleString("de-DE", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
}}
|
||||
|
||||
\begin{Form}[action=http://localhost:5000/,method=post]
|
||||
\paPage{QSM – Allgemeiner Teil}{
|
||||
% Abschnitt 1: Antragsteller : entweder Institution oder Person
|
||||
@ -34,6 +46,15 @@
|
||||
} \\
|
||||
\end{tabular}
|
||||
}
|
||||
|
||||
% Validate: E-Mail-Adresse
|
||||
\newcommand{\validateEmail}{\detokenize{
|
||||
var email = event.value;
|
||||
if (email && !/^[a-zA-Z0-9._\%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/.test(email)) { /*$*/
|
||||
app.alert("Ungueltige E-Mail-Adresse: " + email + ". Bitte geben Sie eine gueltige E-Mail-Adresse ein.");
|
||||
event.rc = false;
|
||||
}
|
||||
}}
|
||||
|
||||
% Abschnitt 2: Ansprechperson
|
||||
\FormSection{Ansprechperson}{%
|
||||
@ -46,20 +67,28 @@
|
||||
\CustomChoiceMenuDefault{pa-role}{}{width=\linewidth,default=-}{-,Student,Professor,Mitarbeiter,ASTA,Referatsleitung,Fachschaftsvorstand}
|
||||
} \\
|
||||
\textbf{E-Mail-Adresse} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-email}{}{E-Mail-Addresse}{width=\linewidth}
|
||||
\CustomTextFieldDefault{pa-email}{}{E-Mail-Addresse}{width=\linewidth,validate=\validateEmail}
|
||||
} \\
|
||||
\end{tabular}
|
||||
}
|
||||
|
||||
% Abschnitt 3: Allgmeine Informationen zum Projekt
|
||||
\FormSection{Allgemeine Informationen zum Projekt}{%
|
||||
% Validate: Teilnehmerzahl >= 0 und integer
|
||||
\newcommand{\validateParticipants}{\detokenize{
|
||||
if (isNaN(event.value) || parseInt(event.value) != parseFloat(event.value) || parseInt(event.value) < 0) {
|
||||
app.alert("Ungueltige Teilnehmerzahl: " + event.value + ". Bitte geben Sie eine positive ganze Zahl ein.");
|
||||
event.rc = false;
|
||||
}
|
||||
}}
|
||||
|
||||
\begin{tabular}{@{}p{0.3\textwidth}p{0.35\textwidth}p{0.35\textwidth}@{}}
|
||||
\textbf{Projektname} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-project-name}{}{Projektname}{width=\linewidth}
|
||||
} \\
|
||||
% Sofern zutreffend: Bekannte Anzahl der Teilnehmer
|
||||
\multicolumn{2}{p{0.667\textwidth}}{\hspace{-6pt}\textbf{Anzahl der stud. Teilnehmer (sofern bekannt)}} & {
|
||||
\CustomTextFieldDefault{pa-participants}{}{Anzahl der Teilnehmer}{width=\linewidth}
|
||||
\CustomTextFieldDefault{pa-participants}{}{Anzahl der Teilnehmer}{width=\linewidth,align=2,default=0,validate=\validateParticipants}
|
||||
} \\
|
||||
\textbf{Teilnehmende Fakultäten} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
%\CustomChoiceMenuDefault{pa-participing-faculties}{}{width=\linewidth,default=-}{-,Hochschulöffentlich=ALL,INF,ESB,LS,TEC,TEX,NXT}
|
||||
@ -108,9 +137,49 @@
|
||||
} \\
|
||||
\end{tabular}
|
||||
|
||||
% Input Validation: Date
|
||||
\newcommand{\validateStartDate}{\detokenize{
|
||||
if (event.value != "JJJJ-MM") {
|
||||
var date = new Date(event.value);
|
||||
if (date == "Invalid Date") {
|
||||
app.alert("Ungueltiges Datum: " + event.value + ". Bitte geben Sie ein gueltiges Datum im Format JJJJ-MM ein.");
|
||||
event.rc = false;
|
||||
} else {
|
||||
event.value = date.toISOString().slice(0, 7);
|
||||
}
|
||||
if (this.getField("pa-end-date").value != "JJJJ-MM") {
|
||||
var endDate = new Date(this.getField("pa-end-date").value);
|
||||
if (date >= endDate) {
|
||||
app.alert("Das Startdatum muss vor dem Enddatum liegen.");
|
||||
event.rc = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
% Input Validation: End Date
|
||||
\newcommand{\validateEndDate}{\detokenize{
|
||||
if (event.value != "JJJJ-MM") {
|
||||
var date = new Date(event.value);
|
||||
if (date == "Invalid Date") {
|
||||
app.alert("Ungueltiges Datum: " + event.value + ". Bitte geben Sie ein gueltiges Datum im Format JJJJ-MM ein.");
|
||||
event.rc = false;
|
||||
} else {
|
||||
event.value = date.toISOString().slice(0, 7);
|
||||
}
|
||||
if (this.getField("pa-start-date").value != "JJJJ-MM") {
|
||||
var startDate = new Date(this.getField("pa-start-date").value);
|
||||
if (startDate >= date) {
|
||||
app.alert("Das Enddatum muss nach dem Startdatum liegen.");
|
||||
event.rc = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
\begin{tabular}{@{}p{0.3\textwidth}p{0.35\textwidth}p{0.35\textwidth}@{}}
|
||||
\textbf{Antragssumme (insg.)} & & \hspace{\fill} \CustomTextFieldDefault{pa-requested-amount-euro}{}{Antragssumme (\euro)}{width=6em,align=2,default=0.00}~\euro \\
|
||||
\textbf{Projektzeitraum (von, bis)} & & \hspace{\fill} \CustomTextFieldDefault{pa-start-date}{}{von}{width=0.4\linewidth,default=MM-JJJJ,align=1} – \CustomTextFieldDefault{pa-end-date}{}{bis}{width=0.4\linewidth,default=MM-JJJJ,align=1}{\BeginAccSupp{ActualText=}\color{white}~\euro\EndAccSupp{}} \\
|
||||
\textbf{Antragssumme (insg.)} & & \hspace{\fill} \CustomTextFieldDefault{pa-requested-amount-euro-sum}{}{Antragssumme (\euro)}{width=6em,align=2,default={0,00},validate=\validateCurrency}~\euro \\
|
||||
\textbf{Projektzeitraum (von, bis)} & & \hspace{\fill} \CustomTextFieldDefault{pa-start-date}{}{von}{width=0.4\linewidth,default=JJJJ-MM,align=1,validate=\validateStartDate} – \CustomTextFieldDefault{pa-end-date}{}{bis}{width=0.4\linewidth,default=JJJJ-MM,align=1,validate=\validateEndDate}{\BeginAccSupp{ActualText=}\color{white}~\euro\EndAccSupp{}} \\
|
||||
\end{tabular}
|
||||
}
|
||||
|
||||
@ -184,58 +253,55 @@
|
||||
\end{minipage}
|
||||
|
||||
% JS-Code to update cell on blur of any number field
|
||||
\newcommand{\updateField}{\detokenize{
|
||||
\newcommand{\updateSum}{\detokenize{
|
||||
var total = 0;
|
||||
for (var i = 1; i <= 24; i++) {
|
||||
var amountField = this.getField("pa-cost-" + i + "-amount-euro");
|
||||
if (amountField) {
|
||||
var value = parseFloat(amountField.value) || 0;
|
||||
var amount = String(amountField.value ?? "0").replaceAll(".", "").replaceAll(",", ".");
|
||||
var value = parseFloat(amount) || 0;
|
||||
total += value;
|
||||
amountField.value = value.toLocaleString("de-DE", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
}
|
||||
this.getField("pa-requested-amount-euro").value = total.toFixed(2);
|
||||
this.getField("pa-requested-amount-euro-sum").value = total.toLocaleString("de-DE", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}}
|
||||
|
||||
\newcommand{\validateField}{\detokenize{
|
||||
% Validate that the field is a float; Gets `event` and `app` as arguments
|
||||
if (event.value && (isNaN(event.value.replace(",", ".")) || parseFloat(event.value) < 0)) {
|
||||
app.alert("Ungueltiger Betrag: " + event.value + ". Bitte geben Sie eine gueltige Zahl ein.");
|
||||
event.rc = false;
|
||||
} else {
|
||||
\updateField
|
||||
}
|
||||
}}
|
||||
\newcommand{\validateAndUpdateSum}{
|
||||
\validateCurrency
|
||||
\updateSum
|
||||
}
|
||||
|
||||
% Tabelle für die Kostenaufstellung
|
||||
\begin{tabular}{@{}p{0.02\textwidth}p{0.82\textwidth}p{0.16\textwidth}@{}}
|
||||
% Index
|
||||
\textbf{\#} & \multicolumn{1}{c}{\textbf{Bezeichnung}} & \multicolumn{1}{c}{\textbf{Kosten (\euro)}} \\
|
||||
% Insg. 24 Positionen
|
||||
1 & \CustomTextFieldDefault{pa-cost-1-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-1-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField,validate=\validateField} \\
|
||||
2 & \CustomTextFieldDefault{pa-cost-2-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-2-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
3 & \CustomTextFieldDefault{pa-cost-3-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-3-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
4 & \CustomTextFieldDefault{pa-cost-4-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-4-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
5 & \CustomTextFieldDefault{pa-cost-5-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-5-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
6 & \CustomTextFieldDefault{pa-cost-6-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-6-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
7 & \CustomTextFieldDefault{pa-cost-7-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-7-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
8 & \CustomTextFieldDefault{pa-cost-8-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-8-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
9 & \CustomTextFieldDefault{pa-cost-9-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-9-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
10 & \CustomTextFieldDefault{pa-cost-10-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-10-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
11 & \CustomTextFieldDefault{pa-cost-11-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-11-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
12 & \CustomTextFieldDefault{pa-cost-12-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-12-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
13 & \CustomTextFieldDefault{pa-cost-13-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-13-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
14 & \CustomTextFieldDefault{pa-cost-14-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-14-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
15 & \CustomTextFieldDefault{pa-cost-15-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-15-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
16 & \CustomTextFieldDefault{pa-cost-16-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-16-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
17 & \CustomTextFieldDefault{pa-cost-17-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-17-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
18 & \CustomTextFieldDefault{pa-cost-18-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-18-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
19 & \CustomTextFieldDefault{pa-cost-19-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-19-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
20 & \CustomTextFieldDefault{pa-cost-20-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-20-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
21 & \CustomTextFieldDefault{pa-cost-21-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-21-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
22 & \CustomTextFieldDefault{pa-cost-22-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-22-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
23 & \CustomTextFieldDefault{pa-cost-23-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-23-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
24 & \CustomTextFieldDefault{pa-cost-24-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-24-amount-euro}{}{Kosten}{width=6em,align=2,default=0.00,onchange=\updateField,onblur=\updateField} \\
|
||||
\textbf{$\Sigma$} & & \CustomTextFieldDefault{pa-requested-amount-euro}{}{Summe}{width=6em,align=2,default=0.00} \\
|
||||
1 & \CustomTextFieldDefault{pa-cost-1-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-1-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
2 & \CustomTextFieldDefault{pa-cost-2-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-2-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
3 & \CustomTextFieldDefault{pa-cost-3-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-3-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
4 & \CustomTextFieldDefault{pa-cost-4-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-4-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
5 & \CustomTextFieldDefault{pa-cost-5-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-5-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
6 & \CustomTextFieldDefault{pa-cost-6-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-6-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
7 & \CustomTextFieldDefault{pa-cost-7-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-7-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
8 & \CustomTextFieldDefault{pa-cost-8-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-8-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
9 & \CustomTextFieldDefault{pa-cost-9-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-9-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
10 & \CustomTextFieldDefault{pa-cost-10-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-10-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
11 & \CustomTextFieldDefault{pa-cost-11-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-11-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
12 & \CustomTextFieldDefault{pa-cost-12-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-12-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
13 & \CustomTextFieldDefault{pa-cost-13-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-13-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
14 & \CustomTextFieldDefault{pa-cost-14-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-14-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
15 & \CustomTextFieldDefault{pa-cost-15-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-15-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
16 & \CustomTextFieldDefault{pa-cost-16-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-16-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
17 & \CustomTextFieldDefault{pa-cost-17-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-17-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
18 & \CustomTextFieldDefault{pa-cost-18-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-18-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
19 & \CustomTextFieldDefault{pa-cost-19-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-19-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
20 & \CustomTextFieldDefault{pa-cost-20-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-20-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
21 & \CustomTextFieldDefault{pa-cost-21-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-21-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
22 & \CustomTextFieldDefault{pa-cost-22-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-22-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
23 & \CustomTextFieldDefault{pa-cost-23-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-23-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
24 & \CustomTextFieldDefault{pa-cost-24-name}{}{Bezeichnung}{width=\linewidth} & \CustomTextFieldDefault{pa-cost-24-amount-euro}{}{Kosten}{width=6em,align=2,default={0,00},onblur=\updateSum,validate=\validateAndUpdateSum} \\
|
||||
\textbf{$\Sigma$} & & \CustomTextFieldDefault{pa-requested-amount-euro-sum}{}{Summe}{width=6em,align=2,default={0,00},validate=\validateCurrency} \\
|
||||
\end{tabular}
|
||||
}
|
||||
}
|
||||
@ -379,7 +445,7 @@
|
||||
\textbf{Bezeichnung} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-offer-1-provider}{}{Anbieter}{width=\linewidth}
|
||||
} \\
|
||||
\textbf{Angebotssumme} & & \hspace{\fill} \CustomTextFieldDefault{pa-offer-1-amount-euro}{}{Angebotssumme (\euro)}{width=6em,align=2,default=0.00}~\euro \\
|
||||
\textbf{Angebotssumme} & & \hspace{\fill} \CustomTextFieldDefault{pa-offer-1-amount-euro}{}{Angebotssumme (\euro)}{width=6em,align=2,default={0,00},validate=\validateCurrency}~\euro \\
|
||||
\end{tabular}
|
||||
\vspace{0.5em}\\
|
||||
\textbf{Kommentar / Begründung:}\vspace{0.5em}\\
|
||||
@ -401,7 +467,7 @@
|
||||
\textbf{Bezeichnung} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-offer-2-provider}{}{Anbieter}{width=\linewidth}
|
||||
} \\
|
||||
\textbf{Angebotssumme} & & \hspace{\fill} \CustomTextFieldDefault{pa-offer-2-amount-euro}{}{Angebotssumme (\euro)}{width=6em,align=2,default=0.00}~\euro \\
|
||||
\textbf{Angebotssumme} & & \hspace{\fill} \CustomTextFieldDefault{pa-offer-2-amount-euro}{}{Angebotssumme (\euro)}{width=6em,align=2,default={0,00},validate=\validateCurrency}~\euro \\
|
||||
\end{tabular}
|
||||
\vspace{0.5em}\\
|
||||
\textbf{Kommentar:}\vspace{0.5em}\\
|
||||
@ -423,7 +489,7 @@
|
||||
\textbf{Bezeichnung} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-offer-3-provider}{}{Anbieter}{width=\linewidth}
|
||||
} \\
|
||||
\textbf{Angebotssumme} & & \hspace{\fill} \CustomTextFieldDefault{pa-offer-3-amount-euro}{}{Angebotssumme (\euro)}{width=6em,align=2,default=0.00}~\euro \\
|
||||
\textbf{Angebotssumme} & & \hspace{\fill} \CustomTextFieldDefault{pa-offer-3-amount-euro}{}{Angebotssumme (\euro)}{width=6em,align=2,default={0,00},validate=\validateCurrency}~\euro \\
|
||||
\end{tabular}
|
||||
\vspace{0.5em}\\
|
||||
\textbf{Kommentar:}\vspace{0.5em}\\
|
||||
|
||||
@ -5,179 +5,198 @@
|
||||
\newcommand{\isReadOnlyVariant}{false}
|
||||
|
||||
\DeclareRobustCommand{\CustomTextField}[7]{\raisebox{#3}[#4][#5]{\TextField[
|
||||
print,
|
||||
name=#1,
|
||||
width=1.7cm,
|
||||
color=black,
|
||||
backgroundcolor=white,
|
||||
bordercolor=white,
|
||||
value=#2,
|
||||
align=1,
|
||||
format = { var f = this.getField('pa-id');
|
||||
f.textFont = 'NotoSans-Regular';
|
||||
},
|
||||
readonly=\isReadOnlyVariant,
|
||||
% On Hover show the altname as Tooltip (#6)
|
||||
altname={#6},
|
||||
onmouseover={if (event.target.display == display.hidden) event.target.display = display.visible;},
|
||||
#7
|
||||
]{}}}
|
||||
print,
|
||||
name=#1,
|
||||
width=1.7cm,
|
||||
color=black,
|
||||
backgroundcolor=white,
|
||||
bordercolor=white,
|
||||
value=#2,
|
||||
align=1,
|
||||
readonly=\isReadOnlyVariant,
|
||||
% On Hover show the altname as Tooltip (#6)
|
||||
altname={#6},
|
||||
onmouseover={if (event.target.display == display.hidden) event.target.display = display.visible;},
|
||||
#7
|
||||
]{}}}
|
||||
|
||||
\DeclareRobustCommand{\CustomChoiceMenu}[7]{\raisebox{#3}[#4][#5]{\ChoiceMenu[
|
||||
name=#1,
|
||||
color=black,
|
||||
backgroundcolor=white,
|
||||
value=#2,
|
||||
align=1,
|
||||
combo,
|
||||
print,
|
||||
readonly=\isReadOnlyVariant,
|
||||
#6
|
||||
]{}{#7}}}
|
||||
name=#1,
|
||||
color=black,
|
||||
backgroundcolor=white,
|
||||
value=#2,
|
||||
align=1,
|
||||
combo,
|
||||
print,
|
||||
readonly=\isReadOnlyVariant,
|
||||
#6
|
||||
]{}{#7}}}
|
||||
|
||||
\DeclareRobustCommand{\CustomTextFieldThuge}[4]{\CustomTextField{#1}{#2}{-5pt}{0pt}{0pt}{#3}{
|
||||
charsize=16pt,
|
||||
height=1em,
|
||||
width=3.6cm,
|
||||
readonly=true,
|
||||
bordercolor=black,
|
||||
backgroundcolor=black!5!white,
|
||||
borderwidth=2pt,
|
||||
color=black,
|
||||
#4
|
||||
}}
|
||||
charsize=16pt,
|
||||
height=1em,
|
||||
width=3.6cm,
|
||||
backgroundcolor=black!5!white,
|
||||
borderwidth=2pt,
|
||||
color=black,
|
||||
#4
|
||||
}}
|
||||
|
||||
\DeclareRobustCommand{\CustomTextFieldDefault}[4]{\CustomTextField{#1}{#2}{-4pt}{2pt}{2pt}{#3}{
|
||||
charsize=12pt,
|
||||
height=1.4em,
|
||||
width=5cm,
|
||||
bordercolor=gray,
|
||||
align=0,
|
||||
#4
|
||||
}}
|
||||
charsize=12pt,
|
||||
height=1.4em,
|
||||
width=5cm,
|
||||
bordercolor=black,
|
||||
align=0,
|
||||
#4
|
||||
}}
|
||||
|
||||
\DeclareRobustCommand{\CustomChoiceMenuDefault}[4]{\CustomChoiceMenu{#1}{#2}{-4pt}{2pt}{2pt}{
|
||||
charsize=12pt,
|
||||
height=1.4em,
|
||||
width=5cm,
|
||||
bordercolor=black,
|
||||
align=0,
|
||||
#3
|
||||
}{#4}}
|
||||
charsize=12pt,
|
||||
height=1.4em,
|
||||
width=5cm,
|
||||
bordercolor=black,
|
||||
align=0,
|
||||
#3
|
||||
}{#4}}
|
||||
|
||||
% Command für einen Abschnitt – graue Box rund um den Abschnitt; Abschnittsname in der oberen linken Ecke
|
||||
% #1: Abschnittsname
|
||||
% #2: Abschnittsinhalt
|
||||
\DeclareRobustCommand{\FormSection}[2]{
|
||||
\color{black}
|
||||
{\hspace{-1em}\small\textbf{#1}}\vspace{0.2em}
|
||||
% Create Box using mdframed
|
||||
\begin{mdframed}[
|
||||
backgroundcolor=white,
|
||||
hidealllines=true,
|
||||
skipabove=0,
|
||||
skipbelow=0.7\baselineskip,
|
||||
splitbottomskip=2pt,
|
||||
splittopskip=4pt,
|
||||
roundcorner=0pt,
|
||||
topline=true,
|
||||
bottomline=true,
|
||||
leftline=true,
|
||||
rightline=true,
|
||||
linecolor=black
|
||||
]
|
||||
\begin{minipage}[t]{0.95\textwidth}
|
||||
\color{black}#2
|
||||
\end{minipage}
|
||||
\end{mdframed}
|
||||
}
|
||||
\color{black}
|
||||
{\hspace{-1em}\small\textbf{#1}}\vspace{0.2em}
|
||||
% Create Box using mdframed
|
||||
\begin{mdframed}[
|
||||
backgroundcolor=white,
|
||||
hidealllines=true,
|
||||
skipabove=0,
|
||||
skipbelow=0.7\baselineskip,
|
||||
splitbottomskip=2pt,
|
||||
splittopskip=4pt,
|
||||
roundcorner=0pt,
|
||||
topline=true,
|
||||
bottomline=true,
|
||||
leftline=true,
|
||||
rightline=true,
|
||||
linecolor=black
|
||||
]
|
||||
\begin{minipage}[t]{0.95\textwidth}
|
||||
\color{black}#2
|
||||
\end{minipage}
|
||||
\end{mdframed}
|
||||
}
|
||||
|
||||
\newcommand{\paPage}[2]{
|
||||
\newpage
|
||||
\setlength{\imageHeight}{2cm*\real{\mainLogoScale}*\real{\logosScale}}
|
||||
\begin{tikzpicture}[overlay, remember picture]
|
||||
\node[anchor=north west, inner sep=0pt, xshift=0.85cm, yshift=-1.5cm, opacity=0] (logo0) at (current page.north west) {
|
||||
\includegraphics[height=\imageHeight]{\imagesPath/DUMMY_FOOT.png}
|
||||
};
|
||||
\foreach \i in {1,...,\value{logoCounter}} {
|
||||
% Calculate name for i-1
|
||||
\pgfmathtruncatemacro{\prev}{\i-1}
|
||||
\node[anchor=west, inner sep=0pt, xshift=-0.1cm, opacity=0.3] (logo\i) at (logo\prev.east) {
|
||||
\makeatletter
|
||||
\testarray{LogosScales}(\i)
|
||||
\setlength{\imageHeight}{1.5cm*\real{\temp@macro}*\real{\logosScale}}
|
||||
\testarray{LogosExtensions}(\i)
|
||||
\let\extension\temp@macro
|
||||
\testarray{LogosOpacities}(\i)
|
||||
\let\opacity\temp@macro
|
||||
\testarray{LogosPaths}(\i)
|
||||
\ifthenelse{\equal{\extension}{svg}}{
|
||||
\begin{tikzpicture}
|
||||
\node[opacity=\opacity] {
|
||||
\includesvg[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
}{
|
||||
\begin{tikzpicture}
|
||||
\node[opacity=\opacity] {
|
||||
\includegraphics[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
\makeatother
|
||||
};
|
||||
}
|
||||
% Address of the Student Parliament on the right:
|
||||
% Verfasste Studierendenschaft ▪ Hochschule Reutlingen ▪ Alteburgstraße 150 ▪ 72762 Reutlingen stupa.reutlingen.university ▪ T. +49 (0)7121 271-1099 ▪ asta@reutlingen-university.de
|
||||
\node[anchor=north east, inner sep=0pt, xshift=-0.85cm, yshift=-2cm, opacity=0.7] (logo\the\numexpr\value{logoCounter}+1) at (current page.north east) {
|
||||
\hspace*{\fill}\begin{minipage}{0.3\textwidth}
|
||||
\color{black}
|
||||
\blenderfont
|
||||
\footnotesize
|
||||
\textbf{Verfasste Studierendenschaft} \\
|
||||
\setstretch{1.0}
|
||||
Hochschule Reutlingen \\
|
||||
Alteburgstraße 150 \\
|
||||
72762 Reutlingen \\
|
||||
\href{https://stupa.reutlingen.university}{stupa.reutlingen.university} \\
|
||||
T. \href{tel:+4971212711099}{+49 (0)7121 271-1099} \\
|
||||
\href{mailto:asta@reutlingen-university.de}{asta@reutlingen-university.de}
|
||||
\end{minipage}
|
||||
};
|
||||
%
|
||||
\node[anchor=north east, inner sep=0pt, xshift=-2cm, yshift=-5.5cm, opacity=0.3] (logo\the\numexpr\value{logoCounter}+1) at (current page.north east) {
|
||||
\huge
|
||||
\iffalse
|
||||
\CustomTextFieldThuge{pa-id}{}{Jahr/Antragsnummer}{width=3.8cm}
|
||||
\CustomTextFieldThuge{pa-key}{}{}{
|
||||
name=pa-key,
|
||||
width=0.1pt,
|
||||
readonly=true,
|
||||
bordercolor=white,
|
||||
backgroundcolor=white,
|
||||
maxlen=16
|
||||
}
|
||||
\fi
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\newpage
|
||||
\setlength{\imageHeight}{2cm*\real{\mainLogoScale}*\real{\logosScale}}
|
||||
\begin{tikzpicture}[overlay, remember picture]
|
||||
\node[anchor=north west, inner sep=0pt, xshift=0.85cm, yshift=-1.5cm, opacity=0] (logo0) at (current page.north west) {
|
||||
\includegraphics[height=\imageHeight]{\imagesPath/DUMMY_FOOT.png}
|
||||
};
|
||||
\foreach \i in {1,...,\value{logoCounter}} {
|
||||
% Calculate name for i-1
|
||||
\pgfmathtruncatemacro{\prev}{\i-1}
|
||||
\node[anchor=west, inner sep=0pt, xshift=-0.1cm, opacity=0.3] (logo\i) at (logo\prev.east) {
|
||||
\makeatletter
|
||||
\testarray{LogosScales}(\i)
|
||||
\setlength{\imageHeight}{1.5cm*\real{\temp@macro}*\real{\logosScale}}
|
||||
\testarray{LogosExtensions}(\i)
|
||||
\let\extension\temp@macro
|
||||
\testarray{LogosOpacities}(\i)
|
||||
\let\opacity\temp@macro
|
||||
\testarray{LogosPaths}(\i)
|
||||
\ifthenelse{\equal{\extension}{svg}}{
|
||||
\begin{tikzpicture}
|
||||
\node[opacity=\opacity] {
|
||||
\includesvg[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
}{
|
||||
\begin{tikzpicture}
|
||||
\node[opacity=\opacity] {
|
||||
\includegraphics[height=\imageHeight]{\classPath/Assets/Images/\temp@macro.\extension}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
\makeatother
|
||||
};
|
||||
}
|
||||
% Address of the Student Parliament on the right:
|
||||
% Verfasste Studierendenschaft ▪ Hochschule Reutlingen ▪ Alteburgstraße 150 ▪ 72762 Reutlingen stupa.reutlingen.university ▪ T. +49 (0)7121 271-1099 ▪ asta@reutlingen-university.de
|
||||
\node[anchor=north east, inner sep=0pt, xshift=-0.85cm, yshift=-2cm, opacity=0.7] (logo\the\numexpr\value{logoCounter}+1) at (current page.north east) {
|
||||
\hspace*{\fill}\begin{minipage}{0.3\textwidth}
|
||||
\color{black}
|
||||
\blenderfont
|
||||
\footnotesize
|
||||
\textbf{Verfasste Studierendenschaft} \\
|
||||
\setstretch{1.0}
|
||||
Hochschule Reutlingen \\
|
||||
Alteburgstraße 150 \\
|
||||
72762 Reutlingen \\
|
||||
\href{https://stupa.reutlingen.university}{stupa.reutlingen.university} \\
|
||||
T. \href{tel:+4971212711099}{+49 (0)7121 271-1099} \\
|
||||
\href{mailto:asta@reutlingen-university.de}{asta@reutlingen-university.de}
|
||||
\end{minipage}
|
||||
};
|
||||
%
|
||||
\node[anchor=north east, inner sep=0pt, xshift=-2cm, yshift=-5.5cm, opacity=0.3] (logo\the\numexpr\value{logoCounter}+1) at (current page.north east) {
|
||||
\huge
|
||||
\iffalse
|
||||
\CustomTextFieldThuge{pa-id}{}{Jahr/Antragsnummer}{width=3.8cm}
|
||||
\CustomTextFieldThuge{pa-key}{}{}{
|
||||
name=pa-key,
|
||||
width=0.1pt,
|
||||
readonly=true,
|
||||
bordercolor=white,
|
||||
backgroundcolor=white,
|
||||
maxlen=16
|
||||
}
|
||||
\fi
|
||||
};
|
||||
|
||||
\vskip 5em
|
||||
|
||||
% title
|
||||
\begin{flushleft}
|
||||
{
|
||||
\noindent
|
||||
\color{black}\textbf{
|
||||
\blenderfont\huge\hspace*{-2.5pt}Projektantrag: #1
|
||||
}\\\vspace*{-0.5em}
|
||||
{
|
||||
\blenderfont Antrag auf finanzielle Förderung durch das STUPA
|
||||
}\\
|
||||
}
|
||||
\color{black}
|
||||
\vspace{-.8em}
|
||||
\rule{\textwidth}{0.5mm}
|
||||
\end{flushleft}
|
||||
\node[anchor=north, inner sep=0pt, xshift=0cm, yshift=-0.5cm, opacity=0.3] (logo\the\numexpr\value{logoCounter}+2) at (current page.north) {
|
||||
\ifnum1=\value{page}
|
||||
\CustomTextFieldThuge{warning-not-supported}{}{}{
|
||||
default={Warning: JavaScript is not supported! Please a supported Editor (e.g. Chrome, Firefox, Safari, Edge)},
|
||||
width=21cm,
|
||||
height=0.75cm,
|
||||
borderwidth=0pt,
|
||||
backgroundcolor=yellow,
|
||||
readonly,
|
||||
align=1,
|
||||
charsize=12pt,
|
||||
color=red,
|
||||
format={\detokenize{
|
||||
console.println(this);
|
||||
var f = this.getField('warning-not-supported');
|
||||
f.fillColor = ['T'];
|
||||
f.textColor = ['T'];
|
||||
f.disabled = true;
|
||||
f.display = display.hidden;
|
||||
}}
|
||||
}
|
||||
\fi
|
||||
};
|
||||
\end{tikzpicture}
|
||||
|
||||
#2
|
||||
}
|
||||
\vskip 5em
|
||||
|
||||
% title
|
||||
\begin{flushleft}
|
||||
{
|
||||
\noindent
|
||||
\color{black}\textbf{
|
||||
\blenderfont\huge\hspace*{-2.5pt}Projektantrag: #1
|
||||
}\\\vspace*{-0.5em}
|
||||
{
|
||||
\blenderfont Antrag auf finanzielle Förderung durch das STUPA
|
||||
}\\
|
||||
}
|
||||
\color{black}
|
||||
\vspace{-.8em}
|
||||
\rule{\textwidth}{0.5mm}
|
||||
\end{flushleft}
|
||||
|
||||
#2
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user