Phone number
This commit is contained in:
parent
96297f2bc4
commit
534c80907a
@ -12,7 +12,7 @@
|
||||
}
|
||||
}}
|
||||
|
||||
\begin{Form}[action=http://localhost:5000/,method=post]
|
||||
\begin{Form}[]
|
||||
\paPage{QSM – Allgemeiner Teil}{
|
||||
% Abschnitt 1: Antragsteller : entweder Institution oder Person
|
||||
% -> aktiviert/deaktiviert zugehörige Felder (über radio buttons) mit JavaScript
|
||||
@ -56,6 +56,15 @@
|
||||
}
|
||||
}}
|
||||
|
||||
% Validate: Telefonnummer
|
||||
\newcommand{\validatePhone}{\detokenize{
|
||||
var phone = event.value;
|
||||
if (phone && !/^\+?[0-9]{1,3}[-\s]?[0-9]{1,4}[-\s]?[0-9]{1,4}[-\s]?[0-9]{1,9}$/.test(phone)) { /*$*/
|
||||
app.alert("Ungueltige Telefonnummer: " + phone + ". Bitte geben Sie eine gueltige Telefonnummer ein.");
|
||||
event.rc = false;
|
||||
}
|
||||
}}
|
||||
|
||||
% Abschnitt 2: Ansprechperson
|
||||
\FormSection{Ansprechperson}{%
|
||||
\begin{tabular}{@{}p{0.3\textwidth}p{0.35\textwidth}p{0.35\textwidth}@{}}
|
||||
@ -69,6 +78,9 @@
|
||||
\textbf{E-Mail-Adresse} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-email}{}{E-Mail-Addresse}{width=\linewidth,validate=\validateEmail}
|
||||
} \\
|
||||
\textbf{Telefonnummer} & \multicolumn{2}{p{0.73\textwidth}}{
|
||||
\CustomTextFieldDefault{pa-phone}{}{Telefonnummer}{width=\linewidth,validate=\validatePhone}
|
||||
} \\
|
||||
\end{tabular}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user