aboutsummaryrefslogtreecommitdiff
path: root/lib/admissionrules/termsadmission
diff options
context:
space:
mode:
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.php2
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>