diff --git a/.github/dev_bug_report.md b/.github/dev_bug_report.md deleted file mode 100755 index ef93e56..0000000 --- a/.github/dev_bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Dev Bug Report -about: Create a report to help us improve -title: '' -labels: stat_backlog, type_bug -assignees: '' - ---- - -# Bug Description -A clear and concise description of what the bug is. - -# How to Reproduce - -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -## Minimal Code Example - -``` -// your code ... -``` - -# Expected Behavior -A clear and concise description of what you expected to happen. - -# Screenshots -If applicable, add screenshots to help explain your problem. - -# Additional Information -Add any other context about the problem here. diff --git a/.github/dev_feature_request.md b/.github/dev_feature_request.md deleted file mode 100755 index 9573c35..0000000 --- a/.github/dev_feature_request.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Dev Feature Request -about: Suggest an idea for this project -title: '' -labels: stat_backlog, type_feature -assignees: '' - ---- - -# What is the feature you request -* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -* A clear and concise description of what you want to happen. - -# Alternatives -A clear and concise description of any alternative solutions or features you've considered. - -# Additional Information -Add any other context or screenshots about the feature request here. diff --git a/Admin/Install/Messages.install.json b/Admin/Install/Messages.install.json new file mode 100644 index 0000000..d800eea --- /dev/null +++ b/Admin/Install/Messages.install.json @@ -0,0 +1,44 @@ +[ + { + "type": "email_template", + "from": "", + "to": "", + "cc": "", + "bcc": "", + "ishtml": true, + "l11n": { + "en": { + "subject": "Header", + "body": "", + "bodyalt": "" + }, + "de": { + "subject": "Kopfzeile", + "body": "", + "bodyalt": "" + } + }, + "send": false + }, + { + "type": "email_template", + "from": "", + "to": "", + "cc": "", + "bcc": "", + "ishtml": true, + "l11n": { + "en": { + "subject": "Footer", + "body": "

Jingga e.K. - www.jingga.app - CEO Dennis Eichhorn - Amtsgericht Friedberg HRA 5058

", + "bodyalt": "\n\n\nJingga e.K. - www.jingga.app - CEO Dennis Eichhorn - Amtsgericht Friedberg HRA 5058" + }, + "de": { + "subject": "Fußzeile", + "body": "

Jingga e.K. - www.jingga.app - CEO Dennis Eichhorn - Amtsgericht Friedberg HRA 5058

", + "bodyalt": "\n\n\nJingga e.K. - www.jingga.app - CEO Dennis Eichhorn - Amtsgericht Friedberg HRA 5058" + } + }, + "send": false + } +] \ No newline at end of file diff --git a/Admin/Install/Messages.php b/Admin/Install/Messages.php new file mode 100644 index 0000000..63fcee8 --- /dev/null +++ b/Admin/Install/Messages.php @@ -0,0 +1,72 @@ + __DIR__ . '/Messages.install.json']); + + /** @var \Modules\Admin\Controller\ApiController $module */ + $module = $app->moduleManager->get('Admin'); + + $settings = [ + [ + 'id' => null, + 'name' => SettingsEnum::HEADER_TEMPLATE, + 'content' => (string) $messages['email_template'][0]['id'], + 'module' => 'Messages', + ], + [ + 'id' => null, + 'name' => SettingsEnum::FOOTER_TEMPLATE, + 'content' => (string) $messages['email_template'][1]['id'], + 'module' => 'Messages', + ], + ]; + + $response = new HttpResponse(); + $request = new HttpRequest(); + + $request->header->account = 1; + $request->setData('settings', \json_encode($settings)); + + $module->apiSettingsSet($request, $response); + } +} diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 2440216..47f3abf 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -31,6 +31,11 @@ use phpOMS\Message\ResponseAbstract; * @license OMS License 2.0 * @link https://jingga.app * @since 1.0.0 + * + * @todo Implement general email header & footer which can be used by all templates + * Load normal template + * Replace {header_template} + * Replace {footer_template} */ final class ApiController extends Controller { diff --git a/Models/SettingsEnum.php b/Models/SettingsEnum.php new file mode 100644 index 0000000..b3385d3 --- /dev/null +++ b/Models/SettingsEnum.php @@ -0,0 +1,32 @@ +getQuota(); echo $this->data['nav']->render(); ?>
-