From 96202612a024de48afafec3930c7040656f512d2 Mon Sep 17 00:00:00 2001
From: Elke Kreim <elke.kreim@hs-hannover.de>
Date: Tue, 1 Feb 2022 11:14:22 +0100
Subject: [PATCH] Add text to contact form

---
 contact.php           | 7 +++++--
 contact_form.php      | 3 ++-
 lang/de/local_hsh.php | 3 +++
 lang/en/local_hsh.php | 3 +++
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/contact.php b/contact.php
index c08dd18..8abc402 100644
--- a/contact.php
+++ b/contact.php
@@ -24,8 +24,10 @@ $strtitle = get_string('pluginname','local_hsh');
 $PAGE->set_title($strtitle);
 $PAGE->set_heading($strtitle);
 
+$formtitle = get_string('formtitle', 'local_hsh');
+$intro_1 = get_string('intro_1', 'local_hsh');
+$intro_2 = get_string('intro_2', 'local_hsh');
 
-// Standard form processing if statement.
 if ($requestform->is_cancelled()){
     redirect($returnurl);
 } else if ($data = $requestform->get_data()) {
@@ -50,7 +52,8 @@ contactform::create($eventdata);
 $PAGE->navbar->add($strtitle);
 
 echo $OUTPUT->header();
-echo $OUTPUT->heading($strtitle);
+echo $OUTPUT->heading($formtitle);
+echo ('<p>' . $intro_1 . '<br />' . $intro_2 . '</p>');
 // Show the request form.
 $requestform->display();
 echo $OUTPUT->footer();
diff --git a/contact_form.php b/contact_form.php
index 942393e..572d38d 100644
--- a/contact_form.php
+++ b/contact_form.php
@@ -47,11 +47,12 @@ class contact_form extends moodleform {
             $mform->setDefault('email', $USER->email);
             $mform->setDefault('telephone', $USER->phone1);
         }
+// > 2022-02-01 Elke Kreim: Remove recaptcha as it does not work
 //        if (!empty($CFG->recaptchapublickey) && !empty($CFG->recaptchaprivatekey)) {
 //			$mform->addElement('recaptcha', 'recaptcha_element', get_string('security_question', 'auth'), 'style="margin: 10em"');
 //
 //        }
-
+// <
         $this->add_action_buttons(true, get_string('submit', 'local_hsh'));
     }
 
diff --git a/lang/de/local_hsh.php b/lang/de/local_hsh.php
index 3a67a9c..a9d594f 100644
--- a/lang/de/local_hsh.php
+++ b/lang/de/local_hsh.php
@@ -6,6 +6,9 @@
  */
 
 $string['pluginname'] = 'Kontaktformular';
+$string['formtitle'] = 'Kontakt zum Servicezentrum Lehre';
+$string['intro_1'] = 'Sie haben Fragen zu Moodle oder benötigen Unterstützung bei der Umsetzung Ihrer digitalen Lehre?';
+$string['intro_2'] = 'Schreiben Sie uns Ihr Anliegen über das Kontaktformular. Wir melden uns zeitnah bei Ihnen.';
 $string['missingfield'] = 'Pflichtfeld!';
 $string['contactform'] = 'Kontaktformular';
 $string['contactto'] = 'Anfrage an';
diff --git a/lang/en/local_hsh.php b/lang/en/local_hsh.php
index 55a3213..21d5fb8 100644
--- a/lang/en/local_hsh.php
+++ b/lang/en/local_hsh.php
@@ -5,6 +5,9 @@
  * Time: 10:48
  */
 $string['pluginname'] = 'HSH edits';
+$string['formtitle'] = 'Kontakt zum Servicezentrum Lehre';
+$string['intro_1'] = 'Sie haben Fragen zu Moodle oder benötigen Unterstützung bei der Umsetzung Ihrer digitalen Lehre?';
+$string['intro_2'] = 'Schreiben Sie uns Ihr Anliegen über das Kontaktformular. Wir melden uns zeitnah bei Ihnen.';
 $string['missingfield'] = 'Required field!';
 $string['contactform'] = 'Contact us';
 $string['contactto'] = 'Request for';
-- 
GitLab