From 7249f9968e544fff8796d0570cf38b58aad27023 Mon Sep 17 00:00:00 2001 From: Alexander Walther Date: Tue, 23 Aug 2022 17:31:45 +0200 Subject: [PATCH] =?UTF-8?q?Standard-Werte=20f=C3=BCr=20Unternehmensname=20?= =?UTF-8?q?und=20Unternehmens-URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #7 --- lib/staff.php | 6 ++++++ pages/settings.php | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/staff.php b/lib/staff.php index 23285c8..e3eca4c 100644 --- a/lib/staff.php +++ b/lib/staff.php @@ -59,6 +59,9 @@ public function getTitle() } public function getCompany() { + if ($this->getValue('company') == "") { + return rex_config::get("staff", "default_company_name"); + } return $this->getValue('company'); } public function getMailWork() @@ -88,6 +91,9 @@ public function getCountry() public function getUrl() { return $this->getValue('url'); + if ($this->getValue('company') == "") { + return rex_config::get("staff", "default_company_url"); + } } public function getPhoneCell() { diff --git a/pages/settings.php b/pages/settings.php index 79fecdf..f7c678f 100644 --- a/pages/settings.php +++ b/pages/settings.php @@ -8,6 +8,14 @@ $field->setLabel(rex_i18n::msg('staff_editor')); $field->setNotice('z.B. class="form-control cke5-editor" data-lang="de" data-profile="default"'); +$field = $form->addInputField('text', 'editor', null, ['class' => 'form-control']); +$field->setLabel(rex_i18n::msg('default_company_name')); +$field->setNotice('optional: Standard-Unternehmens-Name, wenn nicht beim Mitarbeitenden ausgefüllt.'); + +$field = $form->addInputField('text', 'editor', null, ['class' => 'form-control']); +$field->setLabel(rex_i18n::msg('default_company_url')); +$field->setNotice('optional: Standard-Unternehmens-Website, wenn nicht beim Mitarbeitenden ausgefüllt.'); + $fragment = new rex_fragment(); $fragment->setVar('class', 'edit', false); $fragment->setVar('title', $addon->i18n('staff_settings'), false);