From fd2838c32620242cd0b884fa7b7973452148a587 Mon Sep 17 00:00:00 2001 From: blakej115 Date: Tue, 27 Sep 2022 19:40:48 +0000 Subject: [PATCH 01/16] Reworked mail_recipients property into a "dictionary" type (Updated description still needs non-English translations), Removed spaceless tag --- classes/SharedProperties.php | 2 +- components/partials/flash.htm | 27 +++++++++++---------------- lang/en/lang.php | 2 +- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/classes/SharedProperties.php b/classes/SharedProperties.php index 31e1710..2791765 100644 --- a/classes/SharedProperties.php +++ b/classes/SharedProperties.php @@ -77,7 +77,7 @@ public function defineProperties() { 'mail_recipients' => [ 'title' => 'martin.forms::lang.components.shared.mail_recipients.title', 'description' => 'martin.forms::lang.components.shared.mail_recipients.description', - 'type' => 'stringList', + 'type' => 'dictionary', 'group' => 'martin.forms::lang.components.shared.group_mail', 'showExternalParam' => false ], diff --git a/components/partials/flash.htm b/components/partials/flash.htm index 1b89b06..fa06a3f 100644 --- a/components/partials/flash.htm +++ b/components/partials/flash.htm @@ -1,7 +1,5 @@ -{% spaceless %} - - - - {% if jscript %} - - {% endif %} - -{% endspaceless %} +{% if jscript %} + +{% endif %} \ No newline at end of file diff --git a/lang/en/lang.php b/lang/en/lang.php index 2e1c9f1..f772b92 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -93,7 +93,7 @@ 'messages_partial' => ['title' => 'Use Custom Partial' , 'description' => 'Override flash messages with your custom partial inside your theme'], 'mail_enabled' => ['title' => 'Send Notifications' , 'description' => 'Send mail notifications on every form submitted'], 'mail_subject' => ['title' => 'Subject' , 'description' => 'Override default email subject'], - 'mail_recipients' => ['title' => 'Recipients' , 'description' => 'Specify email recipients (add one address per line)'], + 'mail_recipients' => ['title' => 'Recipients' , 'description' => 'Specify email recipients. Use email addresses as keys and names as the values.'], 'mail_bcc' => ['title' => 'BCC' , 'description' => 'Send blind carbon copy to email recipients (add one address per line)'], 'mail_replyto' => ['title' => 'ReplyTo Email Field', 'description' => 'Form field containing the email address of sender to be used as "ReplyTo"'], 'mail_template' => ['title' => 'Mail Template' , 'description' => 'Use custom mail template. Specify template code like "martin.forms::mail.notification" (found on Settings, Mail templates). Leave empty to use default.'], From 5f864c4c88980eea9c3ab69e1357d0d5d8ae1673 Mon Sep 17 00:00:00 2001 From: blakej115 Date: Sat, 1 Oct 2022 15:00:57 -0400 Subject: [PATCH 02/16] Update plugin namespace and name, added additional translations for the mail_recipients property --- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- Plugin.php | 68 +++--- README.md | 11 +- classes/BackendHelpers.php | 2 +- classes/GDPR.php | 10 +- classes/MagicForm.php | 26 +-- classes/ReCaptcha.php | 6 +- classes/ReCaptchaValidator.php | 4 +- classes/SendMail.php | 8 +- classes/SharedProperties.php | 216 +++++++++--------- classes/UnreadRecords.php | 4 +- components/EmptyForm.php | 8 +- components/GenericForm.php | 8 +- components/UploadForm.php | 58 ++--- components/uploadform/file-multi.htm | 4 +- components/uploadform/file-single.htm | 2 +- composer.json | 4 +- controllers/Exports.php | 18 +- controllers/Records.php | 32 +-- controllers/exports/config_form.yaml | 4 +- controllers/exports/index.htm | 8 +- controllers/records/config_filter.yaml | 6 +- controllers/records/config_list.yaml | 8 +- .../records/partials/_list_toolbar.htm | 18 +- .../records/partials/_view_toolbar.htm | 2 +- controllers/records/view.htm | 12 +- lang/de/lang.php | 4 +- lang/en/lang.php | 2 +- lang/fr/lang.php | 4 +- lang/nl/lang.php | 4 +- lang/pt-br/lang.php | 2 +- lang/ru/lang.php | 4 +- lang/tr/lang.php | 2 +- lang/zh-cn/lang.php | 4 +- models/Record.php | 4 +- models/Settings.php | 8 +- models/export/fields.yaml | 28 +-- models/record/columns.yaml | 16 +- models/settings/_gdpr_help.htm | 4 +- models/settings/_plugin_help.htm | 4 +- models/settings/fields.yaml | 34 +-- tests/unit/classes/BackendHelpersTest.php | 12 +- tests/unit/classes/GDPRTest.php | 8 +- tests/unit/classes/UnreadRecordsTest.php | 6 +- traits/ComponentUtils.php | 2 +- traits/FileUploader.php | 4 +- updates/add_group_field.php | 8 +- updates/add_unread_field.php | 10 +- updates/create_records_table.php | 6 +- 50 files changed, 364 insertions(+), 367 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 6d58d78..5a0e677 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -9,6 +9,6 @@ Use issues to report errors / bugs only. Do you have questions? * Read the docs: https://skydiver.github.io/october-plugin-forms/docs/introduction/ -* Start a discussion: https://github.com/skydiver/october-plugin-forms/discussions +* Start a discussion: https://github.com/blakej115/magic-forms/discussions --> \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 5e733e2..501d491 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: Ask a question - url: https://github.com/skydiver/october-plugin-forms/discussions + url: https://github.com/blakej115/magic-forms/discussions about: Ask questions and discuss with other community members \ No newline at end of file diff --git a/Plugin.php b/Plugin.php index 107cb00..13069e8 100644 --- a/Plugin.php +++ b/Plugin.php @@ -1,25 +1,25 @@ 'martin.forms::lang.plugin.name', - 'description' => 'martin.forms::lang.plugin.description', - 'author' => 'Martin M.', + 'name' => 'blakejones.magicforms::lang.plugin.name', + 'description' => 'blakejones.magicforms::lang.plugin.description', + 'author' => 'Martin M. (Forked by Blake Jones)', 'icon' => 'icon-bolt', - 'homepage' => 'https://github.com/skydiver/' + 'homepage' => 'https://github.com/blakej115/magic-forms' ]; } @@ -27,25 +27,25 @@ public function registerNavigation() { if(Settings::get('global_hide_button', false)) { return; } return [ 'forms' => [ - 'label' => 'martin.forms::lang.menu.label', + 'label' => 'blakejones.magicforms::lang.menu.label', 'icon' => 'icon-bolt', - 'iconSvg' => 'plugins/martin/forms/assets/imgs/icon.svg', - 'url' => BackendHelpers::getBackendURL(['martin.forms.access_records' => 'martin/forms/records', 'martin.forms.access_exports' => 'martin/forms/exports'], 'martin.forms.access_records'), - 'permissions' => ['martin.forms.*'], + 'iconSvg' => 'plugins/blakejones/magicforms/assets/imgs/icon.svg', + 'url' => BackendHelpers::getBackendURL(['blakejones.magicforms.access_records' => 'blakejones/magicforms/records', 'blakejones.magicforms.access_exports' => 'blakejones/magicforms/exports'], 'blakejones.magicforms.access_records'), + 'permissions' => ['blakejones.magicforms.*'], 'sideMenu' => [ 'records' => [ - 'label' => 'martin.forms::lang.menu.records.label', + 'label' => 'blakejones.magicforms::lang.menu.records.label', 'icon' => 'icon-database', - 'url' => Backend::url('martin/forms/records'), - 'permissions' => ['martin.forms.access_records'], + 'url' => Backend::url('blakejones/magicforms/records'), + 'permissions' => ['blakejones.magicforms.access_records'], 'counter' => UnreadRecords::getTotal(), 'counterLabel' => 'Un-Read Messages' ], 'exports' => [ - 'label' => 'martin.forms::lang.menu.exports.label', + 'label' => 'blakejones.magicforms::lang.menu.exports.label', 'icon' => 'icon-download', - 'url' => Backend::url('martin/forms/exports'), - 'permissions' => ['martin.forms.access_exports'] + 'url' => Backend::url('blakejones/magicforms/exports'), + 'permissions' => ['blakejones.magicforms.access_exports'] ], ] ] @@ -55,12 +55,12 @@ public function registerNavigation() { public function registerSettings() { return [ 'config' => [ - 'label' => 'martin.forms::lang.menu.label', - 'description' => 'martin.forms::lang.menu.settings', + 'label' => 'blakejones.magicforms::lang.menu.label', + 'description' => 'blakejones.magicforms::lang.menu.settings', 'category' => SettingsManager::CATEGORY_CMS, 'icon' => 'icon-bolt', - 'class' => 'Martin\Forms\Models\Settings', - 'permissions' => ['martin.forms.access_settings'], + 'class' => 'BlakeJones\MagicForms\Models\Settings', + 'permissions' => ['blakejones.magicforms.access_settings'], 'order' => 500 ] ]; @@ -68,31 +68,31 @@ public function registerSettings() { public function registerPermissions() { return [ - 'martin.forms.access_settings' => ['tab' => 'martin.forms::lang.permissions.tab', 'label' => 'martin.forms::lang.permissions.access_settings'], - 'martin.forms.access_records' => ['tab' => 'martin.forms::lang.permissions.tab', 'label' => 'martin.forms::lang.permissions.access_records'], - 'martin.forms.access_exports' => ['tab' => 'martin.forms::lang.permissions.tab', 'label' => 'martin.forms::lang.permissions.access_exports'], - 'martin.forms.gdpr_cleanup' => ['tab' => 'martin.forms::lang.permissions.tab', 'label' => 'martin.forms::lang.permissions.gdpr_cleanup'], + 'blakejones.magicforms.access_settings' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.access_settings'], + 'blakejones.magicforms.access_records' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.access_records'], + 'blakejones.magicforms.access_exports' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.access_exports'], + 'blakejones.magicforms.gdpr_cleanup' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.gdpr_cleanup'], ]; } public function registerComponents() { return [ - 'Martin\Forms\Components\GenericForm' => 'genericForm', - 'Martin\Forms\Components\UploadForm' => 'uploadForm', - 'Martin\Forms\Components\EmptyForm' => 'emptyForm', + 'BlakeJones\MagicForms\Components\GenericForm' => 'genericForm', + 'BlakeJones\MagicForms\Components\UploadForm' => 'uploadForm', + 'BlakeJones\MagicForms\Components\EmptyForm' => 'emptyForm', ]; } public function registerMailTemplates() { return [ - 'martin.forms::mail.notification' => Lang::get('martin.forms::lang.mails.form_notification.description'), - 'martin.forms::mail.autoresponse' => Lang::get('martin.forms::lang.mails.form_autoresponse.description'), + 'blakejones.magicforms::mail.notification' => Lang::get('blakejones.magicforms::lang.mails.form_notification.description'), + 'blakejones.magicforms::mail.autoresponse' => Lang::get('blakejones.magicforms::lang.mails.form_autoresponse.description'), ]; } public function register() { $this->app->resolving('validator', function($validator) { - Validator::extend('recaptcha', 'Martin\Forms\Classes\ReCaptchaValidator@validateReCaptcha'); + Validator::extend('recaptcha', 'BlakeJones\MagicForms\Classes\ReCaptchaValidator@validateReCaptcha'); }); } diff --git a/README.md b/README.md index d870380..a44e7cd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# Magic Forms for OctoberCMS +# Magic Forms for October CMS v3 Create easy (and almost magic) AJAX forms. - +# Support for October CMS v3 (Forked) +The original version of this plugin was [abandoned](https://github.com/blakej115/magic-forms/discussions/267). This is an actively maintained fork of the [original plugin](https://octobercms.com/plugin/martin-forms) that supports October CMS v3. ## Why Magic Forms? Almost everyday we do forms for our clients, personal projects, etc @@ -10,8 +11,6 @@ Sometimes we need to add or remove fields, change validations, store data and at So, the objective was to find a way to just put the HTML elements on the page, skip the repetitive task of coding and (with some kind of magic) store this data on a database or send by mail. - - ## Features * Create any type of form: contact, feedback, registration, uploads, etc * Write only HTML @@ -29,8 +28,6 @@ So, the objective was to find a way to just put the HTML elements on the page, s * Inline errors with fields (read documentation for more info) * AJAX file uploads (BETA, available since v1.3.0) - - ## Documentation Checkout our docs at: -> https://skydiver.github.io/october-plugin-forms/ +> https://blakejones.github.io/magic-forms/ \ No newline at end of file diff --git a/classes/BackendHelpers.php b/classes/BackendHelpers.php index f461dc0..bdf97f4 100644 --- a/classes/BackendHelpers.php +++ b/classes/BackendHelpers.php @@ -1,6 +1,6 @@ isReCaptchaMisconfigured()) { - $this->page['recaptcha_warn'] = Lang::get('martin.forms::lang.components.shared.recaptcha_warn'); + $this->page['recaptcha_warn'] = Lang::get('blakejones.magicforms::lang.components.shared.recaptcha_warn'); } if ($this->property('inline_errors') == 'display') { @@ -59,7 +59,7 @@ public function onFormSubmit() { throw new AjaxException(['#' . $this->alias . '_forms_flash' => $this->renderPartial($flash_partial, [ 'status' => 'error', 'type' => 'danger', - 'content' => Lang::get('martin.forms::lang.components.shared.csrf_error'), + 'content' => Lang::get('blakejones.magicforms::lang.components.shared.csrf_error'), ])]); } @@ -150,7 +150,7 @@ public function onFormSubmit() { // PREPARE RECAPTCHA VALIDATION $rules = ['g-recaptcha-response' => 'recaptcha']; - $err_msg = ['g-recaptcha-response.recaptcha' => Lang::get('martin.forms::lang.validation.recaptcha_error')]; + $err_msg = ['g-recaptcha-response.recaptcha' => Lang::get('blakejones.magicforms::lang.validation.recaptcha_error')]; // DO SECOND VALIDATION $validator = Validator::make($post, $rules, $err_msg); @@ -165,7 +165,7 @@ public function onFormSubmit() { throw new AjaxException($this->_exceptionResponse($validator, [ 'status' => 'error', 'type' => 'danger', - 'content' => Lang::get('martin.forms::lang.validation.recaptcha_error'), + 'content' => Lang::get('blakejones.magicforms::lang.validation.recaptcha_error'), 'errors' => json_encode($validator->messages()->messages()), 'jscript' => $this->property('js_on_error'), ])); @@ -179,7 +179,7 @@ public function onFormSubmit() { unset($post['_token'], $post['g-recaptcha-response'], $post['_session_key'], $post['_uploader']); // FIRE BEFORE SAVE EVENT - Event::fire('martin.forms.beforeSaveRecord', [&$post, $this]); + Event::fire('blakejones.magicforms.beforeSaveRecord', [&$post, $this]); if (count($custom_attributes)) { $post = collect($post)->mapWithKeys(function ($val, $key) use ($custom_attributes) { @@ -211,7 +211,7 @@ public function onFormSubmit() { } // FIRE AFTER SAVE EVENT - Event::fire('martin.forms.afterSaveRecord', [&$post, $this, $record]); + Event::fire('blakejones.magicforms.afterSaveRecord', [&$post, $this, $record]); // CHECK FOR REDIRECT if ($this->property('redirect')) { diff --git a/classes/ReCaptcha.php b/classes/ReCaptcha.php index 8aba6a8..5181f98 100644 --- a/classes/ReCaptcha.php +++ b/classes/ReCaptcha.php @@ -1,10 +1,10 @@ $record->id, @@ -122,7 +122,7 @@ public static function sendAutoResponse($properties, $post, $record) { if (filter_var($to, FILTER_VALIDATE_EMAIL) && filter_var($from, FILTER_VALIDATE_EMAIL)) { // CUSTOM TEMPLATE - $template = isset($properties['mail_resp_template']) && $properties['mail_resp_template'] != '' && MailTemplate::findOrMakeTemplate($properties['mail_resp_template']) ? $properties['mail_resp_template'] : 'martin.forms::mail.autoresponse'; + $template = isset($properties['mail_resp_template']) && $properties['mail_resp_template'] != '' && MailTemplate::findOrMakeTemplate($properties['mail_resp_template']) ? $properties['mail_resp_template'] : 'blakejones.magicforms::mail.autoresponse'; Mail::sendTo($to, $template, [ 'id' => $record->id, diff --git a/classes/SharedProperties.php b/classes/SharedProperties.php index 2791765..0c56430 100644 --- a/classes/SharedProperties.php +++ b/classes/SharedProperties.php @@ -1,6 +1,6 @@ [ - 'title' => 'martin.forms::lang.components.shared.group.title', - 'description' => 'martin.forms::lang.components.shared.group.description', + 'title' => 'blakejones.magicforms::lang.components.shared.group.title', + 'description' => 'blakejones.magicforms::lang.components.shared.group.description', 'type' => 'string', 'showExternalParam' => false, ], 'rules' => [ - 'title' => 'martin.forms::lang.components.shared.rules.title', - 'description' => 'martin.forms::lang.components.shared.rules.description', + 'title' => 'blakejones.magicforms::lang.components.shared.rules.title', + 'description' => 'blakejones.magicforms::lang.components.shared.rules.description', 'type' => 'dictionary', - 'group' => 'martin.forms::lang.components.shared.group_validation', + 'group' => 'blakejones.magicforms::lang.components.shared.group_validation', 'showExternalParam' => false, ], 'rules_messages' => [ - 'title' => 'martin.forms::lang.components.shared.rules_messages.title', - 'description' => 'martin.forms::lang.components.shared.rules_messages.description', + 'title' => 'blakejones.magicforms::lang.components.shared.rules_messages.title', + 'description' => 'blakejones.magicforms::lang.components.shared.rules_messages.description', 'type' => 'dictionary', - 'group' => 'martin.forms::lang.components.shared.group_validation', + 'group' => 'blakejones.magicforms::lang.components.shared.group_validation', 'showExternalParam' => false, ], 'custom_attributes' => [ - 'title' => 'martin.forms::lang.components.shared.custom_attributes.title', - 'description' => 'martin.forms::lang.components.shared.custom_attributes.description', + 'title' => 'blakejones.magicforms::lang.components.shared.custom_attributes.title', + 'description' => 'blakejones.magicforms::lang.components.shared.custom_attributes.description', 'type' => 'dictionary', - 'group' => 'martin.forms::lang.components.shared.group_validation', + 'group' => 'blakejones.magicforms::lang.components.shared.group_validation', 'showExternalParam' => false, ], 'messages_success' => [ - 'title' => 'martin.forms::lang.components.shared.messages_success.title', - 'description' => 'martin.forms::lang.components.shared.messages_success.description', + 'title' => 'blakejones.magicforms::lang.components.shared.messages_success.title', + 'description' => 'blakejones.magicforms::lang.components.shared.messages_success.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_messages', - 'default' => Lang::get('martin.forms::lang.components.shared.messages_success.default'), + 'group' => 'blakejones.magicforms::lang.components.shared.group_messages', + 'default' => Lang::get('blakejones.magicforms::lang.components.shared.messages_success.default'), 'showExternalParam' => false, - 'validation' => ['required' => ['message' => Lang::get('martin.forms::lang.components.shared.validation_req')]] + 'validation' => ['required' => ['message' => Lang::get('blakejones.magicforms::lang.components.shared.validation_req')]] ], 'messages_errors' => [ - 'title' => 'martin.forms::lang.components.shared.messages_errors.title', - 'description' => 'martin.forms::lang.components.shared.messages_errors.description', + 'title' => 'blakejones.magicforms::lang.components.shared.messages_errors.title', + 'description' => 'blakejones.magicforms::lang.components.shared.messages_errors.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_messages', - 'default' => Lang::get('martin.forms::lang.components.shared.messages_errors.default'), + 'group' => 'blakejones.magicforms::lang.components.shared.group_messages', + 'default' => Lang::get('blakejones.magicforms::lang.components.shared.messages_errors.default'), 'showExternalParam' => false, - 'validation' => ['required' => ['message' => Lang::get('martin.forms::lang.components.shared.validation_req')]] + 'validation' => ['required' => ['message' => Lang::get('blakejones.magicforms::lang.components.shared.validation_req')]] ], 'messages_partial' => [ - 'title' => 'martin.forms::lang.components.shared.messages_partial.title', - 'description' => 'martin.forms::lang.components.shared.messages_partial.description', + 'title' => 'blakejones.magicforms::lang.components.shared.messages_partial.title', + 'description' => 'blakejones.magicforms::lang.components.shared.messages_partial.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_messages', + 'group' => 'blakejones.magicforms::lang.components.shared.group_messages', 'showExternalParam' => false ], 'mail_enabled' => [ - 'title' => 'martin.forms::lang.components.shared.mail_enabled.title', - 'description' => 'martin.forms::lang.components.shared.mail_enabled.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_enabled.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_enabled.description', 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'mail_subject' => [ - 'title' => 'martin.forms::lang.components.shared.mail_subject.title', - 'description' => 'martin.forms::lang.components.shared.mail_subject.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_subject.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_subject.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'mail_recipients' => [ - 'title' => 'martin.forms::lang.components.shared.mail_recipients.title', - 'description' => 'martin.forms::lang.components.shared.mail_recipients.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_recipients.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_recipients.description', 'type' => 'dictionary', - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'mail_bcc' => [ - 'title' => 'martin.forms::lang.components.shared.mail_bcc.title', - 'description' => 'martin.forms::lang.components.shared.mail_bcc.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_bcc.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_bcc.description', 'type' => 'stringList', - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'mail_replyto' => [ - 'title' => 'martin.forms::lang.components.shared.mail_replyto.title', - 'description' => 'martin.forms::lang.components.shared.mail_replyto.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_replyto.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_replyto.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'mail_template' => [ - 'title' => 'martin.forms::lang.components.shared.mail_template.title', - 'description' => 'martin.forms::lang.components.shared.mail_template.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_template.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_template.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'mail_resp_enabled' => [ - 'title' => 'martin.forms::lang.components.shared.mail_resp_enabled.title', - 'description' => 'martin.forms::lang.components.shared.mail_resp_enabled.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_resp_enabled.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_resp_enabled.description', 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_mail_resp', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail_resp', 'showExternalParam' => false ], 'mail_resp_field' => [ - 'title' => 'martin.forms::lang.components.shared.mail_resp_field.title', - 'description' => 'martin.forms::lang.components.shared.mail_resp_field.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_resp_field.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_resp_field.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail_resp', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail_resp', 'showExternalParam' => false ], 'mail_resp_from' => [ - 'title' => 'martin.forms::lang.components.shared.mail_resp_from.title', - 'description' => 'martin.forms::lang.components.shared.mail_resp_from.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_resp_from.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_resp_from.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail_resp', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail_resp', 'showExternalParam' => false ], 'mail_resp_subject' => [ - 'title' => 'martin.forms::lang.components.shared.mail_resp_subject.title', - 'description' => 'martin.forms::lang.components.shared.mail_resp_subject.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_resp_subject.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_resp_subject.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail_resp', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail_resp', 'showExternalParam' => false ], 'mail_resp_template' => [ - 'title' => 'martin.forms::lang.components.shared.mail_template.title', - 'description' => 'martin.forms::lang.components.shared.mail_template.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_template.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_template.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_mail_resp', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail_resp', 'showExternalParam' => false ], 'reset_form' => [ - 'title' => 'martin.forms::lang.components.shared.reset_form.title', - 'description' => 'martin.forms::lang.components.shared.reset_form.description', + 'title' => 'blakejones.magicforms::lang.components.shared.reset_form.title', + 'description' => 'blakejones.magicforms::lang.components.shared.reset_form.description', 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_settings', + 'group' => 'blakejones.magicforms::lang.components.shared.group_settings', 'showExternalParam' => false ], 'redirect' => [ - 'title' => 'martin.forms::lang.components.shared.redirect.title', - 'description' => 'martin.forms::lang.components.shared.redirect.description', + 'title' => 'blakejones.magicforms::lang.components.shared.redirect.title', + 'description' => 'blakejones.magicforms::lang.components.shared.redirect.description', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_settings', + 'group' => 'blakejones.magicforms::lang.components.shared.group_settings', 'showExternalParam' => false ], 'inline_errors' => [ - 'title' => 'martin.forms::lang.components.shared.inline_errors.title', - 'description' => 'martin.forms::lang.components.shared.inline_errors.description', + 'title' => 'blakejones.magicforms::lang.components.shared.inline_errors.title', + 'description' => 'blakejones.magicforms::lang.components.shared.inline_errors.description', 'type' => 'dropdown', - 'options' => ['disabled' => 'martin.forms::lang.components.shared.inline_errors.disabled', 'display' => 'martin.forms::lang.components.shared.inline_errors.display', 'variable' => 'martin.forms::lang.components.shared.inline_errors.variable'], + 'options' => ['disabled' => 'blakejones.magicforms::lang.components.shared.inline_errors.disabled', 'display' => 'blakejones.magicforms::lang.components.shared.inline_errors.display', 'variable' => 'blakejones.magicforms::lang.components.shared.inline_errors.variable'], 'default' => 'disabled', - 'group' => 'martin.forms::lang.components.shared.group_settings', + 'group' => 'blakejones.magicforms::lang.components.shared.group_settings', 'showExternalParam' => false ], 'js_on_success' => [ - 'title' => 'martin.forms::lang.components.shared.js_on_success.title', - 'description' => 'martin.forms::lang.components.shared.js_on_success.description', + 'title' => 'blakejones.magicforms::lang.components.shared.js_on_success.title', + 'description' => 'blakejones.magicforms::lang.components.shared.js_on_success.description', 'type' => 'text', - 'group' => 'martin.forms::lang.components.shared.group_settings', + 'group' => 'blakejones.magicforms::lang.components.shared.group_settings', 'showExternalParam' => false ], 'js_on_error' => [ - 'title' => 'martin.forms::lang.components.shared.js_on_error.title', - 'description' => 'martin.forms::lang.components.shared.js_on_error.description', + 'title' => 'blakejones.magicforms::lang.components.shared.js_on_error.title', + 'description' => 'blakejones.magicforms::lang.components.shared.js_on_error.description', 'type' => 'text', - 'group' => 'martin.forms::lang.components.shared.group_settings', + 'group' => 'blakejones.magicforms::lang.components.shared.group_settings', 'showExternalParam' => false ], 'allowed_fields' => [ - 'title' => 'martin.forms::lang.components.shared.allowed_fields.title', - 'description' => 'martin.forms::lang.components.shared.allowed_fields.description', + 'title' => 'blakejones.magicforms::lang.components.shared.allowed_fields.title', + 'description' => 'blakejones.magicforms::lang.components.shared.allowed_fields.description', 'type' => 'stringList', - 'group' => 'martin.forms::lang.components.shared.group_security', + 'group' => 'blakejones.magicforms::lang.components.shared.group_security', 'showExternalParam' => false ], 'sanitize_data' => [ - 'title' => 'martin.forms::lang.components.shared.sanitize_data.title', - 'description' => 'martin.forms::lang.components.shared.sanitize_data.description', + 'title' => 'blakejones.magicforms::lang.components.shared.sanitize_data.title', + 'description' => 'blakejones.magicforms::lang.components.shared.sanitize_data.description', 'type' => 'dropdown', - 'options' => ['disabled' => 'martin.forms::lang.components.shared.sanitize_data.disabled', 'htmlspecialchars' => 'martin.forms::lang.components.shared.sanitize_data.htmlspecialchars'], + 'options' => ['disabled' => 'blakejones.magicforms::lang.components.shared.sanitize_data.disabled', 'htmlspecialchars' => 'blakejones.magicforms::lang.components.shared.sanitize_data.htmlspecialchars'], 'default' => 'disabled', - 'group' => 'martin.forms::lang.components.shared.group_security', + 'group' => 'blakejones.magicforms::lang.components.shared.group_security', 'showExternalParam' => false ], 'anonymize_ip' => [ - 'title' => 'martin.forms::lang.components.shared.anonymize_ip.title', - 'description' => 'martin.forms::lang.components.shared.anonymize_ip.description', + 'title' => 'blakejones.magicforms::lang.components.shared.anonymize_ip.title', + 'description' => 'blakejones.magicforms::lang.components.shared.anonymize_ip.description', 'type' => 'dropdown', - 'options' => ['disabled' => 'martin.forms::lang.components.shared.anonymize_ip.disabled', 'partial' => 'martin.forms::lang.components.shared.anonymize_ip.partial', 'full' => 'martin.forms::lang.components.shared.anonymize_ip.full'], + 'options' => ['disabled' => 'blakejones.magicforms::lang.components.shared.anonymize_ip.disabled', 'partial' => 'blakejones.magicforms::lang.components.shared.anonymize_ip.partial', 'full' => 'blakejones.magicforms::lang.components.shared.anonymize_ip.full'], 'default' => 'disabled', - 'group' => 'martin.forms::lang.components.shared.group_security', + 'group' => 'blakejones.magicforms::lang.components.shared.group_security', 'showExternalParam' => false ], 'recaptcha_enabled' => [ - 'title' => 'martin.forms::lang.components.shared.recaptcha_enabled.title', - 'description' => 'martin.forms::lang.components.shared.recaptcha_enabled.description', + 'title' => 'blakejones.magicforms::lang.components.shared.recaptcha_enabled.title', + 'description' => 'blakejones.magicforms::lang.components.shared.recaptcha_enabled.description', 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_recaptcha', + 'group' => 'blakejones.magicforms::lang.components.shared.group_recaptcha', 'showExternalParam' => false ], 'recaptcha_theme' => [ - 'title' => 'martin.forms::lang.components.shared.recaptcha_theme.title', - 'description' => 'martin.forms::lang.components.shared.recaptcha_theme.description', + 'title' => 'blakejones.magicforms::lang.components.shared.recaptcha_theme.title', + 'description' => 'blakejones.magicforms::lang.components.shared.recaptcha_theme.description', 'type' => 'dropdown', - 'options' => ['light' => 'martin.forms::lang.components.shared.recaptcha_theme.light', 'dark' => 'martin.forms::lang.components.shared.recaptcha_theme.dark'], + 'options' => ['light' => 'blakejones.magicforms::lang.components.shared.recaptcha_theme.light', 'dark' => 'blakejones.magicforms::lang.components.shared.recaptcha_theme.dark'], 'default' => 'light', - 'group' => 'martin.forms::lang.components.shared.group_recaptcha', + 'group' => 'blakejones.magicforms::lang.components.shared.group_recaptcha', 'showExternalParam' => false ], 'recaptcha_type' => [ - 'title' => 'martin.forms::lang.components.shared.recaptcha_type.title', - 'description' => 'martin.forms::lang.components.shared.recaptcha_type.description', + 'title' => 'blakejones.magicforms::lang.components.shared.recaptcha_type.title', + 'description' => 'blakejones.magicforms::lang.components.shared.recaptcha_type.description', 'type' => 'dropdown', - 'options' => ['image' => 'martin.forms::lang.components.shared.recaptcha_type.image', 'audio' => 'martin.forms::lang.components.shared.recaptcha_type.audio'], + 'options' => ['image' => 'blakejones.magicforms::lang.components.shared.recaptcha_type.image', 'audio' => 'blakejones.magicforms::lang.components.shared.recaptcha_type.audio'], 'default' => 'image', - 'group' => 'martin.forms::lang.components.shared.group_recaptcha', + 'group' => 'blakejones.magicforms::lang.components.shared.group_recaptcha', 'showExternalParam' => false ], 'recaptcha_size' => [ - 'title' => 'martin.forms::lang.components.shared.recaptcha_size.title', - 'description' => 'martin.forms::lang.components.shared.recaptcha_size.description', + 'title' => 'blakejones.magicforms::lang.components.shared.recaptcha_size.title', + 'description' => 'blakejones.magicforms::lang.components.shared.recaptcha_size.description', 'type' => 'dropdown', 'options' => [ - 'normal' => 'martin.forms::lang.components.shared.recaptcha_size.normal', - 'compact' => 'martin.forms::lang.components.shared.recaptcha_size.compact', - 'invisible' => 'martin.forms::lang.components.shared.recaptcha_size.invisible', + 'normal' => 'blakejones.magicforms::lang.components.shared.recaptcha_size.normal', + 'compact' => 'blakejones.magicforms::lang.components.shared.recaptcha_size.compact', + 'invisible' => 'blakejones.magicforms::lang.components.shared.recaptcha_size.invisible', ], 'default' => 'normal', - 'group' => 'martin.forms::lang.components.shared.group_recaptcha', + 'group' => 'blakejones.magicforms::lang.components.shared.group_recaptcha', 'showExternalParam' => false ], 'skip_database' => [ - 'title' => 'martin.forms::lang.components.shared.skip_database.title', - 'description' => 'martin.forms::lang.components.shared.skip_database.description', + 'title' => 'blakejones.magicforms::lang.components.shared.skip_database.title', + 'description' => 'blakejones.magicforms::lang.components.shared.skip_database.description', 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_advanced', + 'group' => 'blakejones.magicforms::lang.components.shared.group_advanced', 'showExternalParam' => false ], 'emails_date_format' => [ - 'title' => 'martin.forms::lang.components.shared.emails_date_format.title', - 'description' => 'martin.forms::lang.components.shared.emails_date_format.description', + 'title' => 'blakejones.magicforms::lang.components.shared.emails_date_format.title', + 'description' => 'blakejones.magicforms::lang.components.shared.emails_date_format.description', 'default' => 'Y-m-d', - 'group' => 'martin.forms::lang.components.shared.group_advanced', + 'group' => 'blakejones.magicforms::lang.components.shared.group_advanced', 'showExternalParam' => false ], ]; diff --git a/classes/UnreadRecords.php b/classes/UnreadRecords.php index c514a90..0dd0b56 100644 --- a/classes/UnreadRecords.php +++ b/classes/UnreadRecords.php @@ -1,8 +1,8 @@ 'martin.forms::lang.components.empty_form.name', - 'description' => 'martin.forms::lang.components.empty_form.description', + 'name' => 'blakejones.magicforms::lang.components.empty_form.name', + 'description' => 'blakejones.magicforms::lang.components.empty_form.description', ]; } diff --git a/components/GenericForm.php b/components/GenericForm.php index 8a0ffe7..5219756 100644 --- a/components/GenericForm.php +++ b/components/GenericForm.php @@ -1,15 +1,15 @@ 'martin.forms::lang.components.generic_form.name', - 'description' => 'martin.forms::lang.components.generic_form.description', + 'name' => 'blakejones.magicforms::lang.components.generic_form.name', + 'description' => 'blakejones.magicforms::lang.components.generic_form.description', ]; } diff --git a/components/UploadForm.php b/components/UploadForm.php index c210d9d..c883650 100644 --- a/components/UploadForm.php +++ b/components/UploadForm.php @@ -1,20 +1,20 @@ 'martin.forms::lang.components.upload_form.name', - 'description' => 'martin.forms::lang.components.upload_form.description', + 'name' => 'blakejones.magicforms::lang.components.upload_form.name', + 'description' => 'blakejones.magicforms::lang.components.upload_form.description', ]; } @@ -40,59 +40,59 @@ public function onRun() { public function defineProperties() { $local = [ 'mail_uploads' => [ - 'title' => 'martin.forms::lang.components.shared.mail_uploads.title', - 'description' => 'martin.forms::lang.components.shared.mail_uploads.description', + 'title' => 'blakejones.magicforms::lang.components.shared.mail_uploads.title', + 'description' => 'blakejones.magicforms::lang.components.shared.mail_uploads.description', 'type' => 'checkbox', 'default' => false, - 'group' => 'martin.forms::lang.components.shared.group_mail', + 'group' => 'blakejones.magicforms::lang.components.shared.group_mail', 'showExternalParam' => false ], 'uploader_enable' => [ - 'title' => 'martin.forms::lang.components.shared.uploader_enable.title', - 'description' => 'martin.forms::lang.components.shared.uploader_enable.description', + 'title' => 'blakejones.magicforms::lang.components.shared.uploader_enable.title', + 'description' => 'blakejones.magicforms::lang.components.shared.uploader_enable.description', 'default' => false, 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_uploader', + 'group' => 'blakejones.magicforms::lang.components.shared.group_uploader', 'showExternalParam' => false, ], 'uploader_multi' => [ - 'title' => 'martin.forms::lang.components.shared.uploader_multi.title', - 'description' => 'martin.forms::lang.components.shared.uploader_multi.description', + 'title' => 'blakejones.magicforms::lang.components.shared.uploader_multi.title', + 'description' => 'blakejones.magicforms::lang.components.shared.uploader_multi.description', 'default' => true, 'type' => 'checkbox', - 'group' => 'martin.forms::lang.components.shared.group_uploader', + 'group' => 'blakejones.magicforms::lang.components.shared.group_uploader', 'showExternalParam' => false, ], 'placeholderText' => [ - 'title' => 'martin.forms::lang.components.shared.uploader_pholder.title', - 'description' => 'martin.forms::lang.components.shared.uploader_pholder.description', - 'default' => Lang::get('martin.forms::lang.components.shared.uploader_pholder.default'), + 'title' => 'blakejones.magicforms::lang.components.shared.uploader_pholder.title', + 'description' => 'blakejones.magicforms::lang.components.shared.uploader_pholder.description', + 'default' => Lang::get('blakejones.magicforms::lang.components.shared.uploader_pholder.default'), 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_uploader', + 'group' => 'blakejones.magicforms::lang.components.shared.group_uploader', 'showExternalParam' => false, ], 'removeText' => [ - 'title' => 'martin.forms::lang.components.shared.uploader_remFile.title', - 'description' => 'martin.forms::lang.components.shared.uploader_remFile.description', - 'default' => Lang::get('martin.forms::lang.components.shared.uploader_remFile.default'), + 'title' => 'blakejones.magicforms::lang.components.shared.uploader_remFile.title', + 'description' => 'blakejones.magicforms::lang.components.shared.uploader_remFile.description', + 'default' => Lang::get('blakejones.magicforms::lang.components.shared.uploader_remFile.default'), 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_uploader', + 'group' => 'blakejones.magicforms::lang.components.shared.group_uploader', 'showExternalParam' => false, ], 'maxSize' => [ - 'title' => 'martin.forms::lang.components.shared.uploader_maxsize.title', - 'description' => 'martin.forms::lang.components.shared.uploader_maxsize.description', + 'title' => 'blakejones.magicforms::lang.components.shared.uploader_maxsize.title', + 'description' => 'blakejones.magicforms::lang.components.shared.uploader_maxsize.description', 'default' => '5', 'type' => 'string', - 'group' => 'martin.forms::lang.components.shared.group_uploader', + 'group' => 'blakejones.magicforms::lang.components.shared.group_uploader', 'showExternalParam' => false, ], 'fileTypes' => [ - 'title' => 'martin.forms::lang.components.shared.uploader_types.title', - 'description' => 'martin.forms::lang.components.shared.uploader_types.description', + 'title' => 'blakejones.magicforms::lang.components.shared.uploader_types.title', + 'description' => 'blakejones.magicforms::lang.components.shared.uploader_types.description', 'default' => Definitions::get('defaultExtensions'), 'type' => 'stringList', - 'group' => 'martin.forms::lang.components.shared.group_uploader', + 'group' => 'blakejones.magicforms::lang.components.shared.group_uploader', 'showExternalParam' => false, ], ]; diff --git a/components/uploadform/file-multi.htm b/components/uploadform/file-multi.htm index c17f5ae..db8f1a0 100644 --- a/components/uploadform/file-multi.htm +++ b/components/uploadform/file-multi.htm @@ -22,7 +22,7 @@ {% if file.isImage %} {% else %} - + {% endif %}
@@ -49,7 +49,7 @@