From: Michael Tremer Date: Thu, 1 Dec 2022 17:22:58 +0000 (+0000) Subject: pppsetup.cgi: Add support for QMI profiles X-Git-Tag: v2.27-core173~302 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=80989cc935682e637b55d262e8e0e0a0077937c3 pppsetup.cgi: Add support for QMI profiles Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/pppsetup.cgi b/html/cgi-bin/pppsetup.cgi index d7e5799ec0..696fa2c967 100644 --- a/html/cgi-bin/pppsetup.cgi +++ b/html/cgi-bin/pppsetup.cgi @@ -87,6 +87,16 @@ elsif ($pppsettings{'ACTION'} eq $Lang::tr{'save'}) $errormessage = $Lang::tr{'invalid input'}; goto ERROR; } + if ($pppsettings{'TYPE'} eq "qmi") { + # APN cannot be empty + if ($pppsettings{'APN'} eq "") { + $errormessage = $Lang::tr{'access point name is required'}; + goto ERROR; + } elsif (!&General::validdomainname($pppsettings{'APN'})) { + $errormessage = $Lang::tr{'access point name is invalid'}; + goto ERROR; + } + } if ($pppsettings{'PROFILENAME'} eq '') { $errormessage = $Lang::tr{'profile name not given'}; @@ -523,6 +533,7 @@ print <PPPoE + END ; @@ -719,7 +730,8 @@ END ; } -print < $Lang::tr{'idle timeout'} * @@ -738,7 +750,7 @@ print < END ; -print < $Lang::tr{'persistent'} @@ -767,6 +779,7 @@ END END ; +} if ($pppsettings{'TYPE'} eq 'pptp') { @@ -908,6 +921,26 @@ print < $Lang::tr{'authentication'} +END +; + +# Ask for the APN for QMI +if ($pppsettings{'TYPE'} eq 'qmi') { + print < + + $Lang::tr{'access point name'} +   + * + + + + + +END +} + +print < $Lang::tr{'username'} * diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index d0cd68738b..80753b8419 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -129,6 +129,9 @@ 'a connection with this name already exists' => 'A connection with this name already exists.', 'abort' => 'abort', 'access allowed' => 'Access allowed from:', +'access point name' => 'Access Point Name', +'access point name is invalid' => 'Access Point Name is invalid', +'access point name is required' => 'Access Point Name is required', 'access refused with this oinkcode' => 'Access refused with this Oink Code', 'accounting' => 'Accounting', 'accounting user nonpdc' => 'Accounting - none PDC Mode',