diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /lib/admissionrules/termsadmission | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/admissionrules/termsadmission')
| -rw-r--r-- | lib/admissionrules/termsadmission/TermsAdmission.php (renamed from lib/admissionrules/termsadmission/TermsAdmission.class.php) | 20 | ||||
| -rw-r--r-- | lib/admissionrules/termsadmission/templates/input.php | 2 |
2 files changed, 10 insertions, 12 deletions
diff --git a/lib/admissionrules/termsadmission/TermsAdmission.class.php b/lib/admissionrules/termsadmission/TermsAdmission.php index 112a12e..eb83dfc 100644 --- a/lib/admissionrules/termsadmission/TermsAdmission.class.php +++ b/lib/admissionrules/termsadmission/TermsAdmission.php @@ -1,6 +1,6 @@ <?php /** - * TermsAdmission.class.php + * TermsAdmission.php * * Represents a rule for course access with conditions of admission to be accepted. * @@ -14,8 +14,6 @@ * @category Stud.IP */ -require_once 'lib/classes/admission/AdmissionRule.class.php'; - class TermsAdmission extends AdmissionRule { // Terms of admission @@ -61,16 +59,16 @@ class TermsAdmission extends AdmissionRule /** * Shows an input form * - * @return String A template-based input form. - * @throws Flexi_TemplateNotFoundException + * @return string A template-based input form. + * @throws Flexi\TemplateNotFoundException */ public function getInput() { - $factory = new Flexi_TemplateFactory(__DIR__ . '/templates'); + $factory = new Flexi\Factory(__DIR__ . '/templates'); $template = $factory->open('input'); $template->rule = $this; - return MessageBox::info($template->render())->hideClose(true); + return (string) MessageBox::info($template->render())->hideClose(); } /** @@ -84,11 +82,11 @@ class TermsAdmission extends AdmissionRule * Gets the template that provides a configuration GUI for this rule. * * @return String - * @throws Flexi_TemplateNotFoundException + * @throws Flexi\TemplateNotFoundException */ public function getTemplate() { - $factory = new Flexi_TemplateFactory(__DIR__ . '/templates'); + $factory = new Flexi\Factory(__DIR__ . '/templates'); $template = $factory->open('configure'); $template->rule = $this; @@ -158,11 +156,11 @@ class TermsAdmission extends AdmissionRule * A textual description of the current rule. * * @return String - * @throws Flexi_TemplateNotFoundException + * @throws Flexi\TemplateNotFoundException */ public function toString() { - $factory = new Flexi_TemplateFactory(__DIR__ . '/templates/'); + $factory = new Flexi\Factory(__DIR__ . '/templates/'); $template = $factory->open('info'); $template->rule = $this; diff --git a/lib/admissionrules/termsadmission/templates/input.php b/lib/admissionrules/termsadmission/templates/input.php index 4c91f7f..0151c54 100644 --- a/lib/admissionrules/termsadmission/templates/input.php +++ b/lib/admissionrules/termsadmission/templates/input.php @@ -6,5 +6,5 @@ <label> <input type="checkbox" name="terms_accepted" value="1"> - <?= _('Hiermit akzeptiere ich die oben angezeigten Teilnahmebedingungen') ?> + <?= _('Hiermit akzeptiere ich die Teilnahmebedingungen') ?> </label> |
