Skip to content

Commit

Permalink
Merge pull request #17 from alexplusde/company-defaults
Browse files Browse the repository at this point in the history
Standard-Werte für Unternehmensname und Unternehmens-URL
  • Loading branch information
alxndr-w authored Aug 23, 2022
2 parents 73ce149 + 7249f99 commit 659c8bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
{
Expand Down
8 changes: 8 additions & 0 deletions pages/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
$field->setLabel(rex_i18n::msg('staff_editor'));
$field->setNotice('z.B. <code>class="form-control cke5-editor" data-lang="de" data-profile="default"</code>');

$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);
Expand Down

0 comments on commit 659c8bc

Please sign in to comment.