From 00af87206c82eef5eff096ae5dfc822e7163b725 Mon Sep 17 00:00:00 2001 From: merdan Date: Fri, 4 Jun 2021 15:06:44 +0500 Subject: [PATCH] Shablon verstka --- plugins/janvince/smallcontactform/LICENCE.md | 21 + plugins/janvince/smallcontactform/Plugin.php | 213 ++++ plugins/janvince/smallcontactform/README.md | 440 +++++++ .../components/SmallContactForm.php | 1094 +++++++++++++++++ .../components/smallcontactform/default.htm | 11 + .../components/smallcontactform/scf-form.htm | 61 + .../smallcontactform/scf-message.htm | 28 + .../janvince/smallcontactform/composer.json | 8 + .../smallcontactform/controllers/Messages.php | 158 +++ .../controllers/messages/_list_toolbar.htm | 72 ++ .../controllers/messages/config_export.yaml | 10 + .../controllers/messages/config_filter.yaml | 10 + .../controllers/messages/config_list.yaml | 43 + .../controllers/messages/export.htm | 25 + .../controllers/messages/index.htm | 2 + .../controllers/messages/preview.htm | 71 ++ .../smallcontactform/lang/cs/lang.php | 523 ++++++++ .../smallcontactform/lang/de/lang.php | 491 ++++++++ .../smallcontactform/lang/en/lang.php | 529 ++++++++ .../smallcontactform/lang/fr/lang.php | 426 +++++++ .../smallcontactform/lang/hu/lang.php | 146 +++ .../pl/janvince/smallcontactform/lang.php | 436 +++++++ .../smallcontactform/lang/ru/lang.php | 322 +++++ .../smallcontactform/lang/sk/lang.php | 305 +++++ .../smallcontactform/models/Message.php | 540 ++++++++ .../smallcontactform/models/MessageExport.php | 29 + .../smallcontactform/models/Settings.php | 438 +++++++ .../models/message/columns.yaml | 67 + .../models/message/columns_export.yaml | 49 + .../models/settings/_mapping_help.htm | 9 + .../models/settings/_mapping_warning.htm | 9 + .../models/settings/fields.yaml | 870 +++++++++++++ .../reportwidgets/Messages.php | 27 + .../reportwidgets/NewMessage.php | 27 + .../messages/partials/_messages.htm | 17 + .../newmessage/partials/_newmessage.htm | 13 + .../smallcontactform/updates/scf_tables.php | 31 + .../updates/scf_tables_02.php | 32 + .../updates/scf_tables_03.php | 40 + .../updates/scf_tables_04.php | 31 + .../updates/scf_tables_05.php | 31 + .../smallcontactform/updates/version.yaml | 244 ++++ .../smallcontactform/vendor/autoload.php | 7 + .../vendor/composer/ClassLoader.php | 445 +++++++ .../smallcontactform/vendor/composer/LICENSE | 21 + .../vendor/composer/autoload_classmap.php | 9 + .../vendor/composer/autoload_namespaces.php | 9 + .../vendor/composer/autoload_psr4.php | 11 + .../vendor/composer/autoload_real.php | 52 + .../vendor/composer/autoload_static.php | 39 + .../vendor/composer/installed.json | 184 +++ .../vendor/google/recaptcha/LICENSE | 29 + .../vendor/google/recaptcha/README.md | 140 +++ .../vendor/google/recaptcha/composer.json | 39 + .../recaptcha/src/ReCaptcha/ReCaptcha.php | 269 ++++ .../recaptcha/src/ReCaptcha/RequestMethod.php | 50 + .../src/ReCaptcha/RequestMethod/Curl.php | 82 ++ .../src/ReCaptcha/RequestMethod/CurlPost.php | 104 ++ .../src/ReCaptcha/RequestMethod/Post.php | 88 ++ .../src/ReCaptcha/RequestMethod/Socket.php | 112 ++ .../ReCaptcha/RequestMethod/SocketPost.php | 108 ++ .../src/ReCaptcha/RequestParameters.php | 111 ++ .../recaptcha/src/ReCaptcha/Response.php | 218 ++++ .../vendor/google/recaptcha/src/autoload.php | 69 ++ .../smallcontactform/views/mail/autoreply.htm | 77 ++ .../views/mail/autoreply_cs.htm | 76 ++ .../views/mail/autoreply_es.htm | 77 ++ .../views/mail/autoreply_pl.htm | 77 ++ .../views/mail/notification.htm | 71 ++ .../views/mail/notification_cs.htm | 71 ++ .../views/mail/notification_es.htm | 70 ++ .../views/mail/notification_pl.htm | 77 ++ plugins/lovata/toolbox/models/Settings.php | 2 + .../toolbox/models/settings/fields.yaml | 35 +- .../.github/ISSUE_TEMPLATE/1_BUG_REPORT.md | 15 + .../ISSUE_TEMPLATE/2_GENERAL_SUPPORT.md | 13 + plugins/rainlab/pages/.gitignore | 2 + plugins/rainlab/pages/LICENCE.md | 19 + plugins/rainlab/pages/Plugin.php | 252 ++++ plugins/rainlab/pages/README.md | 91 ++ plugins/rainlab/pages/assets/css/pages.css | 133 ++ .../pages/assets/images/content-icons.png | Bin 0 -> 1761 bytes .../pages/assets/images/menu-icons.png | Bin 0 -> 1198 bytes .../pages/assets/images/pages-icon.svg | 31 + .../pages/assets/images/snippet-icons.png | Bin 0 -> 1436 bytes plugins/rainlab/pages/assets/js/pages-page.js | 644 ++++++++++ .../rainlab/pages/assets/js/pages-snippets.js | 213 ++++ plugins/rainlab/pages/assets/less/pages.less | 204 +++ plugins/rainlab/pages/classes/Content.php | 35 + plugins/rainlab/pages/classes/Controller.php | 123 ++ plugins/rainlab/pages/classes/Menu.php | 300 +++++ plugins/rainlab/pages/classes/MenuItem.php | 214 ++++ .../pages/classes/MenuItemReference.php | 58 + plugins/rainlab/pages/classes/Page.php | 962 +++++++++++++++ plugins/rainlab/pages/classes/PageList.php | 236 ++++ plugins/rainlab/pages/classes/Router.php | 178 +++ plugins/rainlab/pages/classes/Snippet.php | 687 +++++++++++ .../rainlab/pages/classes/SnippetManager.php | 278 +++++ .../rainlab/pages/classes/content/fields.yaml | 38 + .../rainlab/pages/classes/menu/fields.yaml | 33 + .../pages/classes/menuitem/fields.yaml | 69 ++ .../rainlab/pages/classes/page/fields.yaml | 68 + .../rainlab/pages/components/ChildPages.php | 60 + .../pages/components/StaticBreadcrumbs.php | 77 ++ .../rainlab/pages/components/StaticMenu.php | 121 ++ .../rainlab/pages/components/StaticPage.php | 176 +++ .../pages/components/childpages/default.htm | 9 + .../components/staticbreadcrumbs/default.htm | 9 + .../pages/components/staticmenu/default.htm | 5 + .../pages/components/staticmenu/items.htm | 15 + .../pages/components/staticpage/default.htm | 1 + plugins/rainlab/pages/composer.json | 25 + plugins/rainlab/pages/controllers/Index.php | 939 ++++++++++++++ .../index/_concurrency_resolve_form.htm | 29 + .../controllers/index/_content_toolbar.htm | 25 + .../pages/controllers/index/_form_page.htm | 25 + .../pages/controllers/index/_menu_toolbar.htm | 25 + .../pages/controllers/index/_page_toolbar.htm | 35 + .../pages/controllers/index/_sidepanel.htm | 29 + .../index/config_content_list.yaml | 11 + .../rainlab/pages/controllers/index/index.htm | 32 + .../pages/docs/component-childpages.md | 35 + .../pages/docs/component-staticbreadcrumbs.md | 44 + .../pages/docs/component-staticmenu.md | 65 + .../pages/docs/component-staticpage.md | 39 + plugins/rainlab/pages/docs/documentation.md | 464 +++++++ .../rainlab/pages/docs/images/menu-item.png | Bin 0 -> 29061 bytes .../pages/docs/images/menu-management.png | Bin 0 -> 24092 bytes .../pages/docs/images/snippets-backend.png | Bin 0 -> 99372 bytes .../pages/docs/images/snippets-frontend.png | Bin 0 -> 131463 bytes .../pages/docs/images/snippets-partial.png | Bin 0 -> 119719 bytes .../pages/docs/images/static-layout.png | Bin 0 -> 17594 bytes .../rainlab/pages/docs/images/static-page.png | Bin 0 -> 88560 bytes .../pages/formwidgets/MenuItemSearch.php | 105 ++ .../rainlab/pages/formwidgets/MenuItems.php | 175 +++ .../rainlab/pages/formwidgets/MenuPicker.php | 49 + .../rainlab/pages/formwidgets/PagePicker.php | 64 + .../menuitems/assets/js/menu-items-editor.js | 627 ++++++++++ .../menuitems/partials/_editortemplate.htm | 29 + .../formwidgets/menuitems/partials/_item.htm | 38 + .../menuitems/partials/_itemlist.htm | 5 + .../formwidgets/menuitems/partials/_items.htm | 11 + .../menuitems/partials/_menuitems.htm | 27 + .../menuitemsearch/partials/_body.htm | 10 + plugins/rainlab/pages/lang/cs/lang.php | 125 ++ plugins/rainlab/pages/lang/de/lang.php | 114 ++ plugins/rainlab/pages/lang/el/lang.php | 133 ++ plugins/rainlab/pages/lang/en/lang.php | 153 +++ plugins/rainlab/pages/lang/es/lang.php | 115 ++ plugins/rainlab/pages/lang/fa/lang.php | 131 ++ plugins/rainlab/pages/lang/fi/lang.php | 133 ++ plugins/rainlab/pages/lang/fr/lang.php | 143 +++ plugins/rainlab/pages/lang/hu/lang.php | 145 +++ plugins/rainlab/pages/lang/it/lang.php | 116 ++ plugins/rainlab/pages/lang/lv/lang.php | 120 ++ plugins/rainlab/pages/lang/nb-no/lang.php | 114 ++ plugins/rainlab/pages/lang/nl/lang.php | 116 ++ plugins/rainlab/pages/lang/pl/lang.php | 142 +++ plugins/rainlab/pages/lang/pt-br/lang.php | 115 ++ plugins/rainlab/pages/lang/ru/lang.php | 118 ++ plugins/rainlab/pages/lang/sk/lang.php | 141 +++ plugins/rainlab/pages/lang/sl/lang.php | 145 +++ plugins/rainlab/pages/lang/sv/lang.php | 115 ++ plugins/rainlab/pages/lang/tr/lang.php | 141 +++ plugins/rainlab/pages/lang/uk/lang.php | 118 ++ plugins/rainlab/pages/lang/zh-cn/lang.php | 132 ++ .../snippets_rename_viewbag_properties.php | 34 + plugins/rainlab/pages/updates/version.yaml | 60 + plugins/rainlab/pages/widgets/MenuList.php | 122 ++ plugins/rainlab/pages/widgets/PageList.php | 168 +++ plugins/rainlab/pages/widgets/SnippetList.php | 113 ++ .../pages/widgets/menulist/partials/_body.htm | 10 + .../widgets/menulist/partials/_items.htm | 39 + .../widgets/menulist/partials/_menus.htm | 10 + .../widgets/menulist/partials/_toolbar.htm | 37 + .../pages/widgets/pagelist/partials/_body.htm | 10 + .../widgets/pagelist/partials/_items.htm | 9 + .../widgets/pagelist/partials/_pages.htm | 12 + .../widgets/pagelist/partials/_toolbar.htm | 37 + .../widgets/pagelist/partials/_treebranch.htm | 55 + .../widgets/snippetlist/partials/_body.htm | 8 + .../widgets/snippetlist/partials/_items.htm | 28 + .../snippetlist/partials/_snippets.htm | 10 + .../widgets/snippetlist/partials/_toolbar.htm | 20 + shablon/index.html | 2 +- themes/demo/content/item2.htm | 0 themes/demo/content/slider/item1.htm | 0 themes/demo/meta/menus/main.yaml | 2 + themes/demo/meta/static-pages.yaml | 1 + 189 files changed, 22719 insertions(+), 2 deletions(-) create mode 100644 plugins/janvince/smallcontactform/LICENCE.md create mode 100644 plugins/janvince/smallcontactform/Plugin.php create mode 100644 plugins/janvince/smallcontactform/README.md create mode 100644 plugins/janvince/smallcontactform/components/SmallContactForm.php create mode 100644 plugins/janvince/smallcontactform/components/smallcontactform/default.htm create mode 100644 plugins/janvince/smallcontactform/components/smallcontactform/scf-form.htm create mode 100644 plugins/janvince/smallcontactform/components/smallcontactform/scf-message.htm create mode 100644 plugins/janvince/smallcontactform/composer.json create mode 100644 plugins/janvince/smallcontactform/controllers/Messages.php create mode 100644 plugins/janvince/smallcontactform/controllers/messages/_list_toolbar.htm create mode 100644 plugins/janvince/smallcontactform/controllers/messages/config_export.yaml create mode 100644 plugins/janvince/smallcontactform/controllers/messages/config_filter.yaml create mode 100644 plugins/janvince/smallcontactform/controllers/messages/config_list.yaml create mode 100644 plugins/janvince/smallcontactform/controllers/messages/export.htm create mode 100644 plugins/janvince/smallcontactform/controllers/messages/index.htm create mode 100644 plugins/janvince/smallcontactform/controllers/messages/preview.htm create mode 100644 plugins/janvince/smallcontactform/lang/cs/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/de/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/en/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/fr/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/hu/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/pl/janvince/smallcontactform/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/ru/lang.php create mode 100644 plugins/janvince/smallcontactform/lang/sk/lang.php create mode 100644 plugins/janvince/smallcontactform/models/Message.php create mode 100644 plugins/janvince/smallcontactform/models/MessageExport.php create mode 100644 plugins/janvince/smallcontactform/models/Settings.php create mode 100644 plugins/janvince/smallcontactform/models/message/columns.yaml create mode 100644 plugins/janvince/smallcontactform/models/message/columns_export.yaml create mode 100644 plugins/janvince/smallcontactform/models/settings/_mapping_help.htm create mode 100644 plugins/janvince/smallcontactform/models/settings/_mapping_warning.htm create mode 100644 plugins/janvince/smallcontactform/models/settings/fields.yaml create mode 100644 plugins/janvince/smallcontactform/reportwidgets/Messages.php create mode 100644 plugins/janvince/smallcontactform/reportwidgets/NewMessage.php create mode 100644 plugins/janvince/smallcontactform/reportwidgets/messages/partials/_messages.htm create mode 100644 plugins/janvince/smallcontactform/reportwidgets/newmessage/partials/_newmessage.htm create mode 100644 plugins/janvince/smallcontactform/updates/scf_tables.php create mode 100644 plugins/janvince/smallcontactform/updates/scf_tables_02.php create mode 100644 plugins/janvince/smallcontactform/updates/scf_tables_03.php create mode 100644 plugins/janvince/smallcontactform/updates/scf_tables_04.php create mode 100644 plugins/janvince/smallcontactform/updates/scf_tables_05.php create mode 100644 plugins/janvince/smallcontactform/updates/version.yaml create mode 100644 plugins/janvince/smallcontactform/vendor/autoload.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/ClassLoader.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/LICENSE create mode 100644 plugins/janvince/smallcontactform/vendor/composer/autoload_classmap.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/autoload_namespaces.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/autoload_psr4.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/autoload_real.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/autoload_static.php create mode 100644 plugins/janvince/smallcontactform/vendor/composer/installed.json create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/LICENSE create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/README.md create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/composer.json create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestMethod.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/CurlPost.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Socket.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/SocketPost.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/RequestParameters.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/ReCaptcha/Response.php create mode 100644 plugins/janvince/smallcontactform/vendor/google/recaptcha/src/autoload.php create mode 100644 plugins/janvince/smallcontactform/views/mail/autoreply.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/autoreply_cs.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/autoreply_es.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/autoreply_pl.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/notification.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/notification_cs.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/notification_es.htm create mode 100644 plugins/janvince/smallcontactform/views/mail/notification_pl.htm create mode 100644 plugins/rainlab/pages/.github/ISSUE_TEMPLATE/1_BUG_REPORT.md create mode 100644 plugins/rainlab/pages/.github/ISSUE_TEMPLATE/2_GENERAL_SUPPORT.md create mode 100644 plugins/rainlab/pages/.gitignore create mode 100644 plugins/rainlab/pages/LICENCE.md create mode 100644 plugins/rainlab/pages/Plugin.php create mode 100644 plugins/rainlab/pages/README.md create mode 100644 plugins/rainlab/pages/assets/css/pages.css create mode 100644 plugins/rainlab/pages/assets/images/content-icons.png create mode 100644 plugins/rainlab/pages/assets/images/menu-icons.png create mode 100644 plugins/rainlab/pages/assets/images/pages-icon.svg create mode 100644 plugins/rainlab/pages/assets/images/snippet-icons.png create mode 100644 plugins/rainlab/pages/assets/js/pages-page.js create mode 100644 plugins/rainlab/pages/assets/js/pages-snippets.js create mode 100644 plugins/rainlab/pages/assets/less/pages.less create mode 100644 plugins/rainlab/pages/classes/Content.php create mode 100644 plugins/rainlab/pages/classes/Controller.php create mode 100644 plugins/rainlab/pages/classes/Menu.php create mode 100644 plugins/rainlab/pages/classes/MenuItem.php create mode 100644 plugins/rainlab/pages/classes/MenuItemReference.php create mode 100644 plugins/rainlab/pages/classes/Page.php create mode 100644 plugins/rainlab/pages/classes/PageList.php create mode 100644 plugins/rainlab/pages/classes/Router.php create mode 100644 plugins/rainlab/pages/classes/Snippet.php create mode 100644 plugins/rainlab/pages/classes/SnippetManager.php create mode 100644 plugins/rainlab/pages/classes/content/fields.yaml create mode 100644 plugins/rainlab/pages/classes/menu/fields.yaml create mode 100644 plugins/rainlab/pages/classes/menuitem/fields.yaml create mode 100644 plugins/rainlab/pages/classes/page/fields.yaml create mode 100644 plugins/rainlab/pages/components/ChildPages.php create mode 100644 plugins/rainlab/pages/components/StaticBreadcrumbs.php create mode 100644 plugins/rainlab/pages/components/StaticMenu.php create mode 100644 plugins/rainlab/pages/components/StaticPage.php create mode 100644 plugins/rainlab/pages/components/childpages/default.htm create mode 100644 plugins/rainlab/pages/components/staticbreadcrumbs/default.htm create mode 100644 plugins/rainlab/pages/components/staticmenu/default.htm create mode 100644 plugins/rainlab/pages/components/staticmenu/items.htm create mode 100644 plugins/rainlab/pages/components/staticpage/default.htm create mode 100644 plugins/rainlab/pages/composer.json create mode 100644 plugins/rainlab/pages/controllers/Index.php create mode 100644 plugins/rainlab/pages/controllers/index/_concurrency_resolve_form.htm create mode 100644 plugins/rainlab/pages/controllers/index/_content_toolbar.htm create mode 100644 plugins/rainlab/pages/controllers/index/_form_page.htm create mode 100644 plugins/rainlab/pages/controllers/index/_menu_toolbar.htm create mode 100644 plugins/rainlab/pages/controllers/index/_page_toolbar.htm create mode 100644 plugins/rainlab/pages/controllers/index/_sidepanel.htm create mode 100644 plugins/rainlab/pages/controllers/index/config_content_list.yaml create mode 100644 plugins/rainlab/pages/controllers/index/index.htm create mode 100644 plugins/rainlab/pages/docs/component-childpages.md create mode 100644 plugins/rainlab/pages/docs/component-staticbreadcrumbs.md create mode 100644 plugins/rainlab/pages/docs/component-staticmenu.md create mode 100644 plugins/rainlab/pages/docs/component-staticpage.md create mode 100644 plugins/rainlab/pages/docs/documentation.md create mode 100644 plugins/rainlab/pages/docs/images/menu-item.png create mode 100644 plugins/rainlab/pages/docs/images/menu-management.png create mode 100644 plugins/rainlab/pages/docs/images/snippets-backend.png create mode 100644 plugins/rainlab/pages/docs/images/snippets-frontend.png create mode 100644 plugins/rainlab/pages/docs/images/snippets-partial.png create mode 100644 plugins/rainlab/pages/docs/images/static-layout.png create mode 100644 plugins/rainlab/pages/docs/images/static-page.png create mode 100644 plugins/rainlab/pages/formwidgets/MenuItemSearch.php create mode 100644 plugins/rainlab/pages/formwidgets/MenuItems.php create mode 100644 plugins/rainlab/pages/formwidgets/MenuPicker.php create mode 100644 plugins/rainlab/pages/formwidgets/PagePicker.php create mode 100644 plugins/rainlab/pages/formwidgets/menuitems/assets/js/menu-items-editor.js create mode 100644 plugins/rainlab/pages/formwidgets/menuitems/partials/_editortemplate.htm create mode 100644 plugins/rainlab/pages/formwidgets/menuitems/partials/_item.htm create mode 100644 plugins/rainlab/pages/formwidgets/menuitems/partials/_itemlist.htm create mode 100644 plugins/rainlab/pages/formwidgets/menuitems/partials/_items.htm create mode 100644 plugins/rainlab/pages/formwidgets/menuitems/partials/_menuitems.htm create mode 100644 plugins/rainlab/pages/formwidgets/menuitemsearch/partials/_body.htm create mode 100644 plugins/rainlab/pages/lang/cs/lang.php create mode 100644 plugins/rainlab/pages/lang/de/lang.php create mode 100644 plugins/rainlab/pages/lang/el/lang.php create mode 100644 plugins/rainlab/pages/lang/en/lang.php create mode 100644 plugins/rainlab/pages/lang/es/lang.php create mode 100644 plugins/rainlab/pages/lang/fa/lang.php create mode 100644 plugins/rainlab/pages/lang/fi/lang.php create mode 100644 plugins/rainlab/pages/lang/fr/lang.php create mode 100644 plugins/rainlab/pages/lang/hu/lang.php create mode 100644 plugins/rainlab/pages/lang/it/lang.php create mode 100644 plugins/rainlab/pages/lang/lv/lang.php create mode 100644 plugins/rainlab/pages/lang/nb-no/lang.php create mode 100644 plugins/rainlab/pages/lang/nl/lang.php create mode 100644 plugins/rainlab/pages/lang/pl/lang.php create mode 100644 plugins/rainlab/pages/lang/pt-br/lang.php create mode 100644 plugins/rainlab/pages/lang/ru/lang.php create mode 100644 plugins/rainlab/pages/lang/sk/lang.php create mode 100644 plugins/rainlab/pages/lang/sl/lang.php create mode 100644 plugins/rainlab/pages/lang/sv/lang.php create mode 100644 plugins/rainlab/pages/lang/tr/lang.php create mode 100644 plugins/rainlab/pages/lang/uk/lang.php create mode 100644 plugins/rainlab/pages/lang/zh-cn/lang.php create mode 100644 plugins/rainlab/pages/updates/snippets_rename_viewbag_properties.php create mode 100644 plugins/rainlab/pages/updates/version.yaml create mode 100644 plugins/rainlab/pages/widgets/MenuList.php create mode 100644 plugins/rainlab/pages/widgets/PageList.php create mode 100644 plugins/rainlab/pages/widgets/SnippetList.php create mode 100644 plugins/rainlab/pages/widgets/menulist/partials/_body.htm create mode 100644 plugins/rainlab/pages/widgets/menulist/partials/_items.htm create mode 100644 plugins/rainlab/pages/widgets/menulist/partials/_menus.htm create mode 100644 plugins/rainlab/pages/widgets/menulist/partials/_toolbar.htm create mode 100644 plugins/rainlab/pages/widgets/pagelist/partials/_body.htm create mode 100644 plugins/rainlab/pages/widgets/pagelist/partials/_items.htm create mode 100644 plugins/rainlab/pages/widgets/pagelist/partials/_pages.htm create mode 100644 plugins/rainlab/pages/widgets/pagelist/partials/_toolbar.htm create mode 100644 plugins/rainlab/pages/widgets/pagelist/partials/_treebranch.htm create mode 100644 plugins/rainlab/pages/widgets/snippetlist/partials/_body.htm create mode 100644 plugins/rainlab/pages/widgets/snippetlist/partials/_items.htm create mode 100644 plugins/rainlab/pages/widgets/snippetlist/partials/_snippets.htm create mode 100644 plugins/rainlab/pages/widgets/snippetlist/partials/_toolbar.htm create mode 100644 themes/demo/content/item2.htm create mode 100644 themes/demo/content/slider/item1.htm create mode 100644 themes/demo/meta/menus/main.yaml create mode 100644 themes/demo/meta/static-pages.yaml diff --git a/plugins/janvince/smallcontactform/LICENCE.md b/plugins/janvince/smallcontactform/LICENCE.md new file mode 100644 index 000000000..727b0403f --- /dev/null +++ b/plugins/janvince/smallcontactform/LICENCE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Jan Vince + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/janvince/smallcontactform/Plugin.php b/plugins/janvince/smallcontactform/Plugin.php new file mode 100644 index 000000000..53fcaccc8 --- /dev/null +++ b/plugins/janvince/smallcontactform/Plugin.php @@ -0,0 +1,213 @@ + 'janvince.smallcontactform::lang.plugin.name', + 'description' => 'janvince.smallcontactform::lang.plugin.description', + 'author' => 'Jan Vince', + 'icon' => 'icon-inbox' + ]; + } + + public function boot() { + + /** + * Custom Validator rules + */ + Validator::extend('custom_not_regex', function ($attribute, $value, $parameters) { + + if (is_array($parameters)) { + $param = $parameters[0]; + } else { + $param = $parameters; + } + + try { + $result = preg_match($param, $value); + + if ($result === 1) { + return false; + } else { + return true; + } + } catch (\Exception $e) { + Log::error('Error in Small Contact Form custom_not_regex validation rule! ' . $e->getMessage()); + } + + return false; + }); + + } + + public function registerSettings() { + + return [ + 'settings' => [ + 'label' => 'janvince.smallcontactform::lang.plugin.name', + 'description' => 'janvince.smallcontactform::lang.plugin.description', + 'category' => 'Small plugins', + 'icon' => 'icon-inbox', + 'class' => 'JanVince\SmallContactForm\Models\Settings', + 'keywords' => 'small contact form message recaptcha antispam', + 'order' => 990, + 'permissions' => ['janvince.smallcontactform.access_settings'], + ] + ]; + } + + public function registerNavigation(){ + return [ + 'smallcontactform' => [ + 'label' => 'janvince.smallcontactform::lang.navigation.main_label', + 'url' => Backend::url('janvince/smallcontactform/messages'), + 'icon' => 'icon-inbox', + 'permissions' => ['janvince.smallcontactform.access_messages'], + 'order' => 990, + + 'sideMenu' => [ + 'messages' => [ + 'label' => 'janvince.smallcontactform::lang.navigation.messages', + 'icon' => 'icon-envelope-o', + 'url' => Backend::url('janvince/smallcontactform/messages'), + 'permissions' => ['janvince.smallcontactform.access_messages'] + ], + + ], + + ], + + ]; + + } + + public function registerPermissions(){ + + return [ + 'janvince.smallcontactform.access_messages' => [ + 'label' => 'janvince.smallcontactform::lang.permissions.access_messages', + 'tab' => 'janvince.smallcontactform::lang.plugin.name', + ], + 'janvince.smallcontactform.access_settings' => [ + 'label' => 'janvince.smallcontactform::lang.permissions.access_settings', + 'tab' => 'janvince.smallcontactform::lang.plugin.name', + ], + 'janvince.smallcontactform.delete_messages' => [ + 'label' => 'janvince.smallcontactform::lang.permissions.delete_messages', + 'tab' => 'janvince.smallcontactform::lang.plugin.name', + ], + 'janvince.smallcontactform.export_messages' => [ + 'label' => 'janvince.smallcontactform::lang.permissions.export_messages', + 'tab' => 'janvince.smallcontactform::lang.plugin.name', + ], + ]; + + } + + public function registerComponents() + { + return [ + 'JanVince\SmallContactForm\Components\SmallContactForm' => 'contactForm', + ]; + } + + public function registerPageSnippets() + { + return [ + 'JanVince\SmallContactForm\Components\SmallContactForm' => 'contactForm', + ]; + } + + public function registerMailTemplates() + { + + return Settings::getTranslatedTemplates(); + + } + + public function registerMarkupTags() + { + return [ + 'filters' => [ + ], + 'functions' => [ + 'trans' => function($value) { return e(trans($value)); }, + 'html_entity_decode' => function($value) { return html_entity_decode($value); }, + 'settingsGet' => function($value, $default = NULL) { return Settings::get($value, $default); } + ] + ]; + } + + /** + * Custom list types + */ + public function registerListColumnTypes() + { + + + return [ + 'strong' => function($value) { return ''. $value . ''; }, + 'text_preview' => function($value) { $content = mb_substr(strip_tags($value), 0, 150); if(mb_strlen($content) > 150) { return ($content . '...'); } else { return $content; } }, + 'array_preview' => function($value) { $content = mb_substr(strip_tags( implode(' --- ', $value) ), 0, 150); if(mb_strlen($content) > 150) { return ($content . '...'); } else { return $content; } }, + 'switch_icon_star' => function($value) { return '
' . ($value==1 ? e(trans('janvince.smallcontactform::lang.models.message.columns.new')) : e(trans('janvince.smallcontactform::lang.models.message.columns.read')) ) . '
'; }, + 'switch_extended_input' => function($value) { if($value){return '';} else { return '';} }, + 'switch_extended' => function($value) { if($value){return '';} else { return '';} }, + 'attached_images_count' => function($value){ return (count($value) ? count($value) : NULL); }, + 'image_preview' => function($value) { + $width = Settings::get('records_list_preview_width') ? Settings::get('records_list_preview_width') : 50; + $height = Settings::get('records_list_preview_height') ? Settings::get('records_list_preview_height') : 50; + + if($value){ return ""; } + }, + 'scf_files_link' => function($value){ + if(!empty($value)) { + $output = []; + foreach($value as $file) { + $output[] = "
Open file
"; + } + return implode('', $output); + } + }, + ]; + } + + public function registerReportWidgets() + { + return [ + 'JanVince\SmallContactForm\ReportWidgets\Messages' => [ + 'label' => 'janvince.smallcontactform::lang.reportwidget.partials.messages.label', + 'context' => 'dashboard' + ], + 'JanVince\SmallContactForm\ReportWidgets\NewMessage' => [ + 'label' => 'janvince.smallcontactform::lang.reportwidget.partials.new_message.label', + 'context' => 'dashboard' + ], + ]; + } + +} diff --git a/plugins/janvince/smallcontactform/README.md b/plugins/janvince/smallcontactform/README.md new file mode 100644 index 000000000..129f35368 --- /dev/null +++ b/plugins/janvince/smallcontactform/README.md @@ -0,0 +1,440 @@ +# Small Contact form +> Simple but flexible contact form builder with custom fields, validation and passive antispam. + + +## Installation + +**GitHub** clone into `/plugins` dir: + +```sh +git clone https://github.com/jan-vince/smallcontactform +``` + +**OctoberCMS backend** + +Just look for 'Small Contact Form' in search field in: +> Settings > Updates & Plugins > Install plugins + +### Permissions + +> Settings > Administrators + +You can set permissions to restrict access to *Settings > Small plugins > Contact form* and to messages list. + + +### Installation with composer + +* Edit composer.json by adding new repository +``` +"repositories": [ + { + "type": "vcs", + "url": "https://github.com/jan-vince/smallcontactform" + } +] +``` +* run in command line +```sh +composer require janvince/smallcontactform +``` + + +## Setup new Contact form + +> Settings > Small Contact form + +### FORM + +* You can set your own CSS class name and general success/error messages. +* If you need it, placeholders can be used instead of labels +* Form can be hidden after successful submit. + + +#### Enable AJAX + +By default, sending form will trigger page reload. With AJAX, everything can be done without page reloading which will be more user friendly. +*If user's browser doesn't support (or has disabled) JavaScript, form will still work with page reloads after send.* + +* For AJAX enabled form, before send confirmation dialog can be required. + + +#### Add Assets + +If you want to start quickly, you can enable Add assets checkbox - and then Add CSS and JS assets. +This will include necessary styles (Bootstrap, AJAX, October AJAX) and scripts (jQuery, Bootstrap, October AJAX framework and extras). + +But you have to include Twig tags ````{% styles %}```` and ````{% scripts %}```` into your layout or page like this: + +```` + + + {% styles %} + + + + {% page %} + + {% scripts %} + + + + +```` + +If you want to insert assets by hand, you can do it this way (or similar): + +```` + + + + + + + {% page %} + + + + + + +```` + +### SEND BUTTON + +* You can set button class and text. + +#### Redirection after the form is sent + +You have some options to control redirection after form is successfully sent: + +* In main form settings you can allow redirection and set fixed URL (internal or external) +* In component properties (on CMS Page or Layout) you can override main redirection settings for a specific form +* You can add a dynamic redirect URL as a markup parameter eg. `{% component 'contactForm' redirect_url = ('/success#'~this.page.id) %}` + +> If you use markup parameter do not forget to allow form redirection in form main settings or (rather) in component parameters ! There is no markup parametr to allow redirection. + + +### FIELDS + +Here you can add fields to build your contact (or other) form. + +The idea is simple (and solution is so I hope): + +* Click to add new field + * Set it's name (this is used for ````````), so it should be lowercase without special characters. + * Set Label if you need one (it is used for descriptive text above input field) + * Set autofocus if you want cursor to automatically jump to this field (if checked more than one field, cursor jumps to first one) + +When dropdown is selected there will be values/options repeater shown. You can add as many values you need. + +> Hint: you can add dropdown empty option by adding a value with empty ID. + +You can also use **Custom code** and have complete control of generated code. + +There is also a **Custom content** field to add formated content in place of a field. + +#### Field data validation + +You can select from predefined rules or add custom Validator rules (read [documentation](https://octobercms.com/docs/services/validation#available-validation-rules)). + +Some rules require additional validation pattern some of them not. + + * You can add one or more validation rules and error messages for them + * Error messages will be shown above input field + * You can reorder fields by drag and drop left circle (all fields can be collapsed by pressing Ctrl+click (Cmd+click on MacOS) on arrow in right top corners) + +> Hint: For dropdown validation you can use `custom` validation type with rule `in` and list of IDs in `pattern` field (eg: 1,2,3). + +> Note: There is a `custom_not_regex` validation rule as an inverse to built in `regex`. + +### COLUMNS MAPPING + +System writes all form data in database, but for quick overview Name, Email and Message columns are visible separately in Messages list. + +But you have to help system to identify these columns by mapping to your form fields. + +These mappings are also used for autoreply emails where at least Email field mapping is important. + + +### ANTISPAM + +#### Passive antispam + +Very simple implementation of passive antispam (inspired by [Nette AntiSpam Control](https://gist.github.com/Michal-Mikolas/2388131)). + +The idea behind this is to check how fast is form send and if robots-catching field is filled. + +* When allowed, you can set form delay (in seconds) to prevent too fast form sending (mostly by robots). You can add custom error message (will be shown in general error message box above form). +* You can add antispam field label and error message for non JavaScript enabled browsers. + * If JavaScript is working, antispam field is automatically hidden and cleared. + +#### Google reCaptcha + +Implementation of Google reCaptcha antispam protection. + +##### Setup + +First you have to create new API keys pair in reCaptcha admin panel. + +Hit **Get reCAPTCHA** button on [reCaptcha wellcome page](https://www.google.com/recaptcha). Set label and check reCAPTCHA v2 option and hit button Register. + +Copy Site key and Secret key to Contact Form's settings fields. + +If you want Contact Form to automatically include server scripts in your layout, check the button in Form settings. + +#### Check sender's IP + +You can add an extra form protection with limit submits from one IP address. + +This check has own error message and custom field to set maximum submits. + + +### EMAIL + +Mails can be sent directly or queued ([OctoberCMS queue](https://octobercms.com/docs/services/queues) must be configured!). + +Don't forget to configure mail preferences in *Settings > Mail > Mail configuration*! + +#### Data in email templates + +There are variables available in all email templates: + +* **fields** is array of [ 'field name' => 'post value' ] +* **fieldsDetails** is array of [ 'field name' => ['name', 'value', 'type', ...] ] + +* **uploads** is array of uploads (of class `System\Models\File`) + +* **messageObject** is a model instance of a selected message + +#### Allow autoreply + +Email can be send to form sender as confirmation. + +* You have to enter email address and name - it will be used as FROM field +* Email subject can be manually added here (or edited in *Settings > Mail > Mail templates (code: janvince.smallcontactform::mail.autoreply)*) +* Email TO address and name have to be assigned to form fields (in selections only corresponding field types are shown - if you don't see one, try to check it's type in Fields tab) +* Email REPLY TO address can be set +* Message field can be also assigned (and will be saved separately into database) + +#### Allow notifications + +Once a Contact form is sent a notification can be immediately send to a provided email address (or comma-separated list of addresses). + +*A **Reply to** address of notification email will be set to an email address from Contact form (if this field is used).* + +You can also force **From** address to be set to the one entered in Contact form - but not all email systems support this! + + +## TRANSLATION + +You can allow translation with [RainLab Translate](https://octobercms.com/plugin/rainlab-translate) plugin. + +> After installation of Translate plugin, please add at least two languages in *Settings > Translate > Manage languages*. +> For translations to work there must be a localePicker component included in your layout/page. + +#### Form texts + +Most of Small Contact form texts can be edited right in *Settings > Small plugins > Contact form*. + +#### Custom form fields + +Translate plugin doesn't supports translation of individual repeater fields yet, so form field texts (label, validation error messages) have to be - for now - translated in a dictionary: *Settings > Translate > Translate messages* + +> Please note that form fields labels will be shown in dictionary after first form render (on your frontend page) and validation error messages after first send. + +#### Email templates + +You can create your own email templates in *Settings > Mail > Mail templates* (for hint look inside of default templates starting with *janvince.smallcontactform::*). + +Remember your email templates CODE and put in in Small Contact form email settings in *Settings > Small plugins > Contact form > Email tab*. For each language there can be specific template. + +There are `{{fields}}` and `{{fieldsDetails}}` arrays available inside of email templates. + +You can also use `{{url}}` variable to get original request URL. + +*If your custom form field has name eg. 'email', you use it in template with ````{{fields.email}}````.* + +You can itterate over uploaded files with: +``` +{% for item in uploads %} + Uploaded file +{% endfor %} +``` + +You can access model data with eg. `{{ messageObject.id }}`. + +## GOOGLE ANALYTICS + +> if you want to use these settings, be sure to have Google Analytics scripts included on your site. You can use [Rainlab Google Analytics plugin](https://octobercms.com/plugin/rainlab-googleanalytics). + +### Events + +You can allow events to be send to your GA account when the form is successfully sent. + +There are (translatable) fields for category, action and label. + +*All event settings can be overriden in component property so if you use more then one form, you can custommize events for each of them.* + + +## MESSAGES LIST + +All sent data from Contact form are saved and listed in backend Messages list. + +If email, name and message fields are assigned on *Settings > Small plugins > contact form > Columns mapping tab*, they will be saved and shown in separate columns. + +You can click on a record to see all form data. The message will be marked as read. + + +## DASHBOARD REPORT WIDGETS + +There are available report widgets to be used on OctoberCMS dashboard. + +#### Messages stats + +Shows basic messages statistics. + + +#### New messages + +Shows number of new messages. The color changes to green if there are any. + +You can simply click widget to open Messages list. + +## Overriding form settings + +You can override some of the form settings in component dropdown (on page or layout) or by passing them in component call. + + +#### Form settings + +*There is also an Alias column that contain component's alias of the used form and is saved in messages log (this field is invisible by default in messages table).* + +```` +[contactForm myForm] +form_description = 'Form used in home page' +disable_fields = 'name|message' +send_btn_label = 'Go' +form_success_msg = 'Ok, sent :)' +form_error_msg = 'Houston, we have a problem' +```` + + +You can override form's property in Twig component tag, eg: + +```` +{% component 'myForm' form_description = 'My other description' send_btn_label = 'Stay in touch' %} +```` + +This can be even more complex: +```` +{% set myVar = 12345 %} +{% component 'myForm' form_description = ('Current value: ' ~ myVar) %} +```` + +In email template you can access some of these variables like this: +```` +Form alias: {{fields.form_alias}} +Form description: {{fields.form_description}} +```` + +> When you override form description in ````{% component form_description = 'My description' %}````, description will be added as a **hidden field** into a form. Do not use this to store private data as this is easily visible in page HTML code! + +#### Override notification email options +You can set different email address to which notification about sent form will be delivered and also change a notification template. + +*Template must exist in Settings > Mail > Mail configuration*. + +If you add a locale string to ````notification_template```` property (like ````notification_template_en````) than that one has priority and will be used if ````App::getLocale()```` returns ````en````. + +```` +[contactForm salesForm] +disable_notifications = true +notification_address_to = 'sales@domain.com' +notification_address_from = 'contactform@domain.com' +notification_template = 'notification-sales' +notification_template_en = 'notification-sales-en' +notification_template_cs = 'notification-sales-cs' +notification_subject = 'Notification sent by form {{ fields.form_alias }} on {{ "now"|date }}' +```` + +> Local strings in `notification_template` canot be used in Twig! + +#### Override autoreply email options +You can set different email address and name for autoreply message and also use different autoreply template. + +*Template must exist in Settings > Mail > Mail configuration*. + +If you add a locale string to ````autoreply_template```` or ````autoreply_address_from_name```` property (like ````autoreply_template_en```` or ````autoreply_address_from_name_en````) than that one has priority and will be used if ````App::getLocale()```` returns ````en````. + +```` +[contactForm orderForm] +autoreply_address_from = 'order@domain.com' +autoreply_address_from_name = 'Orders' +autoreply_address_from_name_en = 'Orders' +autoreply_address_from_name_cs = 'Objednávky' +autoreply_template = 'autoreply-order' +autoreply_template_en = 'autoreply-order-en' +autoreply_template_cs = 'autoreply-order-cs' +autoreply_subject = 'Autoreply sent by form {{ fields.form_alias }} on {{ "now"|date }}' +```` +> Do you know that you can use form variables in an email template subject. In Settings > Mail templates create new template and set the Subject field to eg: `My form {{ fields.form_alias }}`. + +#### Disable some form fields +You can disable some of defined form fields by passing their names in ````disable_fields```` component property. + +Several fields can be added while separated with pipe ````|````. + +```` +[contactForm] +disable_fields = 'phone|name|confirmation' +```` + +Or you can disable some of functions: + +```` +[contactForm] +disable_notifications = true +disable_autoreply = true +```` + +---- + +## HOWTO + +### Fight SPAM + +#### Prohibit sending URLs in a (message) field. + +* Use Custom rule +* Add your validation error text +* Use validation rule: `custom_not_regex` +* Use validation: `/(http|https|ftp|ftps)\:\/\/?/` + +![Custom regex to prevent sending URLs](https://www.vince.cz/storage/app/media/OctoberCMS/scf-custom-regex-urls.png) + + +### Add an empty option to dropdown field + +You can easily add an empty option with empty ID and some value. + +![Dropdown empty field](https://www.vince.cz/storage/app/media/OctoberCMS/scf-settings-dropdown.png) + +#### Validate dropdown field + +If you want to validate dropdown options, you can use custom validation rule `in` with list of IDs as a validation pattern. + +![Dropdown validation](https://www.vince.cz/storage/app/media/OctoberCMS/scf-settings-dropdown-validation.png) + + +---- +> My thanks goes to: +> [OctoberCMS](http://www.octobercms.com) team members and supporters for this great system. +> [Andrew Measham](https://unsplash.com/@andrewmeasham) for his photo. +> [Font Awesome](http://fontawesome.io/icons/) for nice icons. + + +Created by [Jan Vince](http://www.vince.cz), freelance web designer from Czech Republic. diff --git a/plugins/janvince/smallcontactform/components/SmallContactForm.php b/plugins/janvince/smallcontactform/components/SmallContactForm.php new file mode 100644 index 000000000..94dc95071 --- /dev/null +++ b/plugins/janvince/smallcontactform/components/SmallContactForm.php @@ -0,0 +1,1094 @@ + 'janvince.smallcontactform::lang.controller.contact_form.name', + 'description' => 'janvince.smallcontactform::lang.controller.contact_form.description' + ]; + } + + public function defineProperties(){ + + return [ + + 'form_description' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.form_description', + 'description' => 'janvince.smallcontactform::lang.components.properties.form_description_comment', + 'type' => 'string', + 'default' => null, + ], + + 'disable_fields' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.disable_fields', + 'description' => 'janvince.smallcontactform::lang.components.properties.disable_fields_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_form', + ], + 'send_btn_label' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.send_btn_label', + 'description' => 'janvince.smallcontactform::lang.components.properties.send_btn_label_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_form', + ], + 'form_success_msg' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.form_success_msg', + 'description' => 'janvince.smallcontactform::lang.components.properties.form_success_msg_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_form', + ], + 'form_error_msg' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.form_error_msg', + 'description' => 'janvince.smallcontactform::lang.components.properties.form_error_msg_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_form', + ], + + + 'disable_notifications' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.disable_notifications', + 'description' => 'janvince.smallcontactform::lang.components.properties.disable_notifications_comment', + 'type' => 'checkbox', + 'default' => false, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_notifications', + ], + 'notification_address_to' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.notification_address_to', + 'description' => 'janvince.smallcontactform::lang.components.properties.notification_address_to_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_notifications', + ], + 'notification_address_from' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.notification_address_from', + 'description' => 'janvince.smallcontactform::lang.components.properties.notification_address_from_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_notifications', + ], + 'notification_address_from_name' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.notification_address_from_name', + 'description' => 'janvince.smallcontactform::lang.components.properties.notification_address_from_name_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_notifications', + ], + 'notification_template' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.notification_template', + 'description' => 'janvince.smallcontactform::lang.components.properties.notification_template_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_notifications', + ], + 'notification_subject' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.notification_subject', + 'description' => 'janvince.smallcontactform::lang.components.properties.notification_subject_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_notifications', + ], + + + 'disable_autoreply' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.disable_autoreply', + 'description' => 'janvince.smallcontactform::lang.components.properties.disable_autoreply_comment', + 'type' => 'checkbox', + 'default' => false, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_autoreply', + ], + 'autoreply_address_from' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.autoreply_address_from', + 'description' => 'janvince.smallcontactform::lang.components.properties.autoreply_address_from_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_autoreply', + ], + 'autoreply_address_from_name' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.autoreply_address_from_name', + 'description' => 'janvince.smallcontactform::lang.components.properties.autoreply_address_from_name_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_autoreply', + ], + 'autoreply_address_replyto' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.autoreply_address_replyto', + 'description' => 'janvince.smallcontactform::lang.components.properties.autoreply_address_replyto_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_autoreply', + ], + 'autoreply_template' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.autoreply_template', + 'description' => 'janvince.smallcontactform::lang.components.properties.autoreply_template_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_autoreply', + ], + 'autoreply_subject' => [ + 'title' => 'janvince.smallcontactform::lang.components.properties.autoreply_subject', + 'description' => 'janvince.smallcontactform::lang.components.properties.autoreply_subject_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_autoreply', + ], + + 'allow_redirect' => [ + 'title' => 'janvince.smallcontactform::lang.settings.redirect.allow_redirect', + 'description' => 'janvince.smallcontactform::lang.settings.redirect.allow_redirect_comment', + 'type' => 'checkbox', + 'default' => false, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_redirect', + ], + + 'redirect_url' => [ + 'title' => 'janvince.smallcontactform::lang.settings.redirect.redirect_url', + 'description' => 'janvince.smallcontactform::lang.settings.redirect.redirect_url_comment', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_redirect', + ], + + 'redirect_url_external' => [ + 'title' => 'janvince.smallcontactform::lang.settings.redirect.redirect_url_external', + 'description' => 'janvince.smallcontactform::lang.settings.redirect.redirect_url_external_comment', + 'type' => 'checkbox', + 'default' => false, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_redirect', + ], + + 'ga_success_event_allow' => [ + 'title' => 'janvince.smallcontactform::lang.settings.ga.ga_success_event_allow', + 'type' => 'checkbox', + 'default' => false, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_ga', + ], + + 'ga_success_event_category' => [ + 'title' => 'janvince.smallcontactform::lang.settings.form_fields.event_category', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_ga', + ], + + 'ga_success_event_action' => [ + 'title' => 'janvince.smallcontactform::lang.settings.form_fields.event_action', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_ga', + ], + + 'ga_success_event_label' => [ + 'title' => 'janvince.smallcontactform::lang.settings.form_fields.event_label', + 'type' => 'string', + 'default' => null, + 'group' => 'janvince.smallcontactform::lang.components.groups.override_ga', + ], + + ]; + + } + + public function onRun() { + + $this->page['currentLocale'] = App::getLocale(); + + $this->page['formSentAlias'] = Session::get('formSentAlias', null); + $this->page['formError'] = Session::get('formError', null); + $this->page['formSuccess'] = Session::get('formSuccess', null); + + $this->formDescription = $this->property('form_description'); + $this->formRedirect = $this->property('redirect_url'); + + // Inject CSS assets if required + if(Settings::getTranslated('add_assets') && Settings::getTranslated('add_css_assets')){ + $this->addCss('/modules/system/assets/css/framework.extras.css'); + $this->addCss('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'); + } + + // Inject JS assets if required + if(Settings::getTranslated('add_assets') && Settings::getTranslated('add_js_assets')){ + $this->addJs('https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js'); + $this->addJs('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'); + $this->addJs('/modules/system/assets/js/framework.js'); + $this->addJs('/modules/system/assets/js/framework.extras.js'); + } + + } + + public function onRender() { + + // Component markup parameters are accesible only from onRender method! + if($this->formDescription != $this->property('form_description') ) { + $this->formDescriptionOverride = $this->property('form_description'); + } + + if($this->formRedirect != $this->property('redirect_url') ) { + $this->formRedirectOverride = $this->property('redirect_url'); + } + + } + + /** + * Form handler + */ + public function onFormSend(){ + + /** + * Validation + */ + $this->setFieldsValidationRules(); + $errors = []; + + $this->post = Input::all(); + + // IP protection is enabled (has highest priority) + // But privacy must allow messages saving + if( Settings::getTranslated('add_ip_protection') and !Settings::getTranslated('privacy_disable_messages_saving') ) { + + $max = ( Settings::getTranslated('add_ip_protection_count') ? intval(Settings::getTranslated('add_ip_protection_count')) : intval(e(trans('janvince.smallcontactform::lang.settings.antispam.add_ip_protection_count_placeholder'))) ); + + if( empty($max) ) { + $max = 3; + } + + $currentIp = Request::ip(); + + if( empty($currentIp) ) { + Log::error('SMALL CONTACT FORM ERROR: Could not get remote IP address!'); + $errors[] = e(trans('janvince.smallcontactform::lang.settings.antispam.add_ip_protection_error_get_ip')); + } else { + + $message = new Message; + + if($message->testIPAddress($currentIp) >= $max) { + $errors[] = ( Settings::getTranslated('add_ip_protection_error_too_many_submits') ? Settings::getTranslated('add_ip_protection_error_too_many_submits') : e(trans('janvince.smallcontactform::lang.settings.antispam.add_ip_protection_error_too_many_submits_placeholder')) ); + } + + } + + } + + // Antispam validation if allowed + if( Settings::getTranslated('add_antispam')) { + $this->validationRules[('_protect-' . $this->alias)] = 'size:0'; + + if( !empty($this->post['_form_created']) ) { + + try { + $delay = ( Settings::getTranslated('antispam_delay') ? intval(Settings::getTranslated('antispam_delay')) : intval(e(trans('janvince.smallcontactform::lang.settings.antispam.antispam_delay_placeholder'))) ); + + if(!$delay) { + $delay = 5; + } + + $formCreatedTime = strtr(Input::get('_form_created'), 'jihgfedcba', '0123456789'); + + $this->post['_form_created'] = intval($formCreatedTime) + $delay; + + $this->validationRules['_form_created'] = 'numeric|max:' . time(); + } + catch (\Exception $e) + { + Log::error($e->getMessage()); + $errors[] = e(trans('janvince.smallcontactform::lang.settings.antispam.antispam_delay_error_msg_placeholder')); + } + } + + } + + // reCaptcha validation if enabled + if(Settings::getTranslated('add_google_recaptcha')) + { + try { + /** + * Text if allow_url_fopen is disabled + */ + if (!ini_get('allow_url_fopen')) + { + $recaptcha = new ReCaptcha(Settings::get('google_recaptcha_secret_key'), new \ReCaptcha\RequestMethod\SocketPost()); + } + else { + // allow_url_fopen = On + $recaptcha = new ReCaptcha(Settings::get('google_recaptcha_secret_key')); + } + + $response = $recaptcha->setExpectedHostname($_SERVER['SERVER_NAME'])->verify(post('g-recaptcha-response'), $_SERVER['REMOTE_ADDR']); + } + catch(\Exception $e) + { + Log::error($e->getMessage()); + $errors[] = e(trans('janvince.smallcontactform::lang.settings.antispam.google_recaptcha_error_msg_placeholder')); + } + + if(!$response->isSuccess()) { + $errors[] = ( Settings::getTranslated('google_recaptcha_error_msg') ? Settings::getTranslated('google_recaptcha_error_msg') : e(trans('janvince.smallcontactform::lang.settings.antispam.google_recaptcha_error_msg_placeholder'))); + } + + } + + // Validate sent data + $validator = Validator::make($this->post, $this->validationRules, $this->validationMessages); + $validator->valid(); + $this->validationMessages = $validator->messages(); + $this->setPostData($validator->messages()); + + if($validator->failed() or count($errors)){ + + // Form main error msg (can be overriden by component property) + if ( $this->property('form_error_msg') ) { + + $errors[] = $this->property('form_error_msg'); + + } else { + + $errors[] = ( Settings::getTranslated('form_error_msg') ? Settings::getTranslated('form_error_msg') : e(trans('janvince.smallcontactform::lang.settings.form.error_msg_placeholder'))); + + } + + // Validation error msg for Antispam field + if( empty($this->postData[('_protect' . $this->alias)]['error']) && !empty($this->postData['_form_created']['error']) ) { + $errors[] = ( Settings::getTranslated('antispam_delay_error_msg') ? Settings::getTranslated('antispam_delay_error_msg') : e(trans('janvince.smallcontactform::lang.settings.antispam.antispam_delay_error_msg_placeholder'))); + } + + Flash::error(implode(PHP_EOL, $errors)); + + if (Request::ajax()) { + + $this->page['formSentAlias'] = $this->alias; + $this->page['formError'] = true; + $this->page['formSuccess'] = null; + + } else { + + Session::flash('formSentAlias', $this->alias); + Session::flash('formError', true); + + } + + // Fill hidden fields if request has errors to maintain + $this->formDescriptionOverride = post('_form_description'); + $this->formRedirectOverride = post('_form_redirect'); + + } else { + + // Form main success msg (can be overriden by component property) + if ($this->property('form_success_msg')) { + + $successMsg = $this->property('form_success_msg'); + + } else { + + $successMsg = ( Settings::getTranslated('form_success_msg') ? Settings::getTranslated('form_success_msg') : e(trans('janvince.smallcontactform::lang.settings.form.success_msg_placeholder')) ); + + } + + $message = new Message; + + // Store data in DB + $formDescription = !empty($this->post['_form_description']) ? e($this->post['_form_description']) : $this->property('form_description'); + $messageObject = $message->storeFormData($this->postData, $this->alias, $formDescription); + + // Send autoreply + $message->sendAutoreplyEmail($this->postData, $this->getProperties(), $this->alias, $formDescription, $messageObject); + + // Send notification + $message->sendNotificationEmail($this->postData, $this->getProperties(), $this->alias, $formDescription, $messageObject); + + /** + * Flash messages + */ + Flash::success($successMsg); + + if (Request::ajax()) { + + $this->postData = []; + $this->page['formSentAlias'] = $this->alias; + $this->page['formSuccess'] = true; + $this->page['formError'] = null; + + } else { + + Session::flash('formSentAlias', $this->alias); + Session::flash('formSuccess', true); + + } + + /** + * Keep properties overrides after Ajax request (onRender method is not called) + */ + if (Request::ajax()) { + + $this->formDescriptionOverride = post('_form_description'); + $this->formRedirectOverride = post('_form_redirect'); + + } + + /** + * Redirects + * + * Redirect to defined page or to prevent repeated sending of form + * Clear data after success AJAX send + */ + if( Settings::getTranslated('allow_redirect') or $this->property('allow_redirect') ) { + + // Component markup parameter (eg. {{ component 'contactForm' redirect_url = '/form-success-'~page.id }} ) overrides component property + if(!empty($this->post['_form_redirect'])) { + + $propertyRedirectUrl = e($this->post['_form_redirect']); + + } else { + + $propertyRedirectUrl = $this->property('redirect_url'); + + } + + // If redirection is allowed but no URL provided, just refresh (if not AJAX) + if(empty($propertyRedirectUrl) and empty(Settings::getTranslated('redirect_url'))) { + + Log::warning('SCF: Form redirect is allowed but no URL was provided!'); + + if (!Request::ajax()) { + + return Redirect::refresh(); + + } else { + + return; + + } + + } + + // Overrides take precedence + if( !empty(Settings::getTranslated('redirect_url_external')) and !empty($this->property('redirect_url_external')) ) { + + $path = $propertyRedirectUrl ? $propertyRedirectUrl : Settings::getTranslated('redirect_url'); + + } else { + + $path = $propertyRedirectUrl ? url($propertyRedirectUrl) : url(Settings::getTranslated('redirect_url')); + + } + + return Redirect::to($path); + + } else { + + if (!Request::ajax()) { + + return Redirect::refresh(); + + } + + } + + } + + } + + /** + * Get plugin settings + * Twig access: contactForm.fields + * @return array + */ + public function fields(){ + + $fields = Settings::getTranslated('form_fields', []); + + if( !empty($this->property('disable_fields')) ) { + + $disabledFields = explode( '|', $this->property('disable_fields') ); + + if(!is_array($disabledFields)) { + return $fields; + } + + foreach ($fields as $key => $value) { + + if( isset($value['name']) and in_array(trim($value['name']), $disabledFields) ) { + unset($fields[$key]); + } + + } + + } + + return $fields; + } + + /** + * Get form attributes + */ + public function getFormAttributes(){ + + $attributes = []; + + $attributes['request'] = $this->alias . '::onFormSend'; + $attributes['files'] = true; + + // Disabled hard coded hash URL in 1.41.0 as dynamic redirect is now available + // $attributes['url'] = '#scf-' . $this->alias; + + $attributes['method'] = 'POST'; + $attributes['class'] = null; + $attributes['id'] = 'scf-form-id-' . $this->alias; + + if( Settings::getTranslated('form_allow_ajax', 0) ) { + + $attributes['data-request'] = $this->alias . '::onFormSend'; + $attributes['data-request-validate'] = 'data-request-validate'; + $attributes['data-request-files'] = 'data-request-files'; + $attributes['data-request-update'] = "'". $this->alias ."::scf-message':'#scf-message-". $this->alias ."','". $this->alias ."::scf-form':'#scf-form-". $this->alias ."'"; + + } + + if( Settings::getTranslated('form_css_class') ) { + $attributes['class'] .= Settings::getTranslated('form_css_class'); + } + + if( !empty(Input::all()) ) { + $attributes['class'] .= ' was-validated'; + } + + if( Settings::getTranslated('form_send_confirm_msg') and Settings::getTranslated('form_allow_confirm_msg') ) { + + $attributes['data-request-confirm'] = Settings::getTranslated('form_send_confirm_msg'); + + } + + // Disable browser validation if enabled + if(!empty(Settings::getTranslated('form_disable_browser_validation'))){ + $attributes['novalidate'] = "novalidate"; + } + + return $attributes; + + } + + /** + * Generate field HTML code + * @return string + */ + public function getFieldHtmlCode(array $fieldSettings){ + + if(empty($fieldSettings['name']) && empty($fieldSettings['type'])){ + return NULL; + } + + $fieldType = Settings::getFieldTypes($fieldSettings['type']); + $fieldRequired = $this->isFieldRequired($fieldSettings); + + // If there is a custom code, return it only + if( !empty($fieldSettings['type']) and $fieldSettings['type'] == 'custom_code' and !empty($fieldSettings['field_custom_code']) ) { + + if( !empty($fieldSettings['field_custom_code_twig']) ) { + return(Twig::parse($fieldSettings['field_custom_code'])); + } else { + return($fieldSettings['field_custom_code']); + } + } + + $output = []; + + $wrapperCss = ( $fieldSettings['wrapper_css'] ? $fieldSettings['wrapper_css'] : $fieldType['wrapper_class'] ); + + // Add wrapper error class if there are any + if(!empty($this->postData[$fieldSettings['name']]['error'])){ + $wrapperCss .= ' has-error'; + } + + $output[] = '
'; + + // Checkbox wrapper + if ($fieldSettings['type'] == 'checkbox') { + $output[] = '
'; + } + + // Label classic + if( !empty($fieldSettings['label']) and !empty($fieldType['label']) ){ + $output[] = ''; + } + + // Label as container + if( !empty($fieldSettings['label']) and empty($fieldType['label']) ){ + $output[] = ''; + } + + // Checkbox wrapper + if ($fieldSettings['type'] == 'checkbox') { + $output[] = '
'; + } + + $output[] = "
"; + + return(implode('', $output)); + + } + + /** + * Generate antispam field HTML code + * @return string + */ + public function getAntispamFieldHtmlCode(){ + + if( !Settings::getTranslated('add_antispam') ){ + return NULL; + } + + $output = []; + + $output[] = '
'; + + $output[] = ''; + + $output[] = ''; + + // Add help-block if there are errors + if(!empty($this->postData[('_protect'.$this->alias)]['error'])){ + $output[] = '' . ( Settings::getTranslated('antispam_error_msg') ? Settings::getTranslated('antispam_error_msg') : e(trans('janvince.smallcontactform::lang.settings.antispam.antispam_error_msg_placeholder')) ) . ""; + } + + // Field attributes + $attributes = [ + 'id' => '_protect-'.$this->alias, + 'name' => '_protect', + 'class' => '_protect form-control', + 'value' => 'http://', + ]; + + // Add error class if field is not empty + if( Input::get('_protect-'.$this->alias) ){ + $attributes['class'] = $attributes['class'] . ' error'; + + if(empty($this->errorAutofocus)){ + $attributes['autofocus'] = NULL; + $this->errorAutofocus = true; + } + + } + + $output[] = 'formatAttributes($attributes) . '>'; + + $output[] = "
"; + + $output[] = " + + "; + + return(implode('', $output)); + + } + + + /** + * Generate description field HTML code + * @return string + */ + public function getDescriptionFieldHtmlCode(){ + + if( !$this->formDescriptionOverride ){ + return NULL; + } + + $output = []; + + // Field attributes + $attributes = [ + 'id' => '_form_description-'.$this->alias, + 'type' => 'hidden', + 'name' => '_form_description', + 'class' => '_form_description form-control', + 'value' => $this->formDescriptionOverride, + ]; + + $output[] = 'formatAttributes($attributes) . '>'; + + return(implode('', $output)); + + } + + /** + * Generate redirect field HTML code + * @return string + */ + public function getRedirectFieldHtmlCode(){ + + if (empty(Settings::getTranslated('allow_redirect')) and empty($this->property('allow_redirect'))) { + return NULL; + } + + if( !$this->formRedirectOverride ){ + return NULL; + } + + $output = []; + + // Field attributes + $attributes = [ + 'id' => '_form_redirect-'.$this->alias, + 'type' => 'hidden', + 'name' => '_form_redirect', + 'class' => '_form_redirect form-control', + 'value' => $this->formRedirectOverride, + ]; + + $output[] = 'formatAttributes($attributes) . '>'; + + return(implode('', $output)); + + } + + /** + * Generate success GA event field HTML code + * @return string + */ + public function getGaSuccessEventHtmlCode($addScriptTag = false) + { + + // If GA success event is not allowed + if (empty(Settings::getTranslated('ga_success_event_allow')) and empty($this->property('ga_success_event_allow'))) { + return; + } + + $output = []; + + // Field attributes + $attributes = [ + 'hitType' => 'event', + 'eventCategory' => ($this->property('ga_success_event_category') ? e($this->property('ga_success_event_category')) : Settings::getTranslated('ga_success_event_category')), + 'eventAction' => ($this->property('ga_success_event_action') ? e($this->property('ga_success_event_action')) : Settings::getTranslated('ga_success_event_action')), + 'eventLabel' => ($this->property('ga_success_event_label') ? e($this->property('ga_success_event_label')) : Settings::getTranslated('ga_success_event_label')), + ]; + + if($addScriptTag) { + $output[] = ""; + } + + return (implode('', $output)); + } + + /** + * Generate submit button field HTML code + * @return string + */ + public function getSubmitButtonHtmlCode(){ + + if( !count($this->fields()) ){ + return e(trans('janvince.smallcontactform::lang.controller.contact_form.no_fields')); + } + + $output = []; + + $wrapperCss = ( Settings::getTranslated('send_btn_wrapper_css') ? Settings::getTranslated('send_btn_wrapper_css') : e(trans('janvince.smallcontactform::lang.settings.buttons.send_btn_wrapper_css_placeholder')) ); + + $output[] = '
'; + + $output[] = ''; + + $output[] = "
"; + + return(implode('', $output)); + + } + + /** + * Get reCaptcha wrapper class + * @return string + */ + public function getReCaptchaWrapperClass(){ + + $wrapperCss = ( Settings::getTranslated('google_recaptcha_wrapper_css') ? Settings::getTranslated('google_recaptcha_wrapper_css') : e(trans('janvince.smallcontactform::lang.settings.antispam.google_recaptcha_wrapper_css_placeholder')) ); + + return $wrapperCss; + + } + + /** + * Generate validation rules and messages + */ + private function setFieldsValidationRules(){ + + $fieldsDefinition = $this->fields(); + + $validationRules = []; + $validationMessages = []; + foreach($fieldsDefinition as $field){ + + if(!empty($field['validation'])) { + $rules = []; + + foreach($field['validation'] as $rule) { + + if( $rule['validation_type']=='custom' && !empty($rule['validation_custom_type']) ){ + + if(!empty($rule['validation_custom_pattern'])) { + + switch ($rule['validation_custom_type']) { + + /** + * Keep regex pattern in an array + */ + case "regex": + + $rules[] = [$rule['validation_custom_type'], $rule['validation_custom_pattern']]; + + break; + + default: + + $rules[] = $rule['validation_custom_type'] . ':' . $rule['validation_custom_pattern']; + + break; + + } + + + + } else { + + $rules[] = $rule['validation_custom_type']; + + } + + if(!empty($rule['validation_error'])){ + + $validationMessages[($field['name'] . '.' . $rule['validation_custom_type'] )] = Settings::getDictionaryTranslated($rule['validation_error']); + } + + } else { + + $rules[] = $rule['validation_type']; + + if(!empty($rule['validation_error'])){ + + $validationMessages[($field['name'] . '.' . $rule['validation_type'] )] = Settings::getDictionaryTranslated($rule['validation_error']); + } + } + } + + $validationRules[$field['name']] = $rules; + } + } + + $this->validationRules = $validationRules; + $this->validationMessages = $validationMessages; + + } + + + /** + * Generate post data with errors + */ + private function setPostData(MessageBag $validatorMessages){ + + foreach( $this->fields() as $field){ + + $this->postData[ $field['name'] ] = [ + 'value' => e(Input::get($field['name'])), + 'error' => $validatorMessages->first($field['name']), + ]; + + } + + } + + /** + * Format attributes array + * @return array + */ + private function formatAttributes(array $attributes, $jsArray = false) { + + $output = []; + + foreach ($attributes as $key => $value) { + $output[] = $key . ($jsArray ? ': "' : '="') . $value . '"'; + } + + return implode(($jsArray ? ', ' : ' '), $output); + } + + /** + * Search for required validation type + */ + private function isFieldRequired($fieldSettings){ + + if(empty($fieldSettings['validation'])){ + return false; + } + + foreach($fieldSettings['validation'] as $rule) { + if(!empty($rule['validation_type']) && $rule['validation_type'] == 'required'){ + return true; + } + } + + return false; + } +} diff --git a/plugins/janvince/smallcontactform/components/smallcontactform/default.htm b/plugins/janvince/smallcontactform/components/smallcontactform/default.htm new file mode 100644 index 000000000..dbad0b63c --- /dev/null +++ b/plugins/janvince/smallcontactform/components/smallcontactform/default.htm @@ -0,0 +1,11 @@ +
+ +
+ {% partial __SELF__ ~ '::scf-message' %} +
+ +
+ {% partial __SELF__ ~ '::scf-form' %} +
+ +
\ No newline at end of file diff --git a/plugins/janvince/smallcontactform/components/smallcontactform/scf-form.htm b/plugins/janvince/smallcontactform/components/smallcontactform/scf-form.htm new file mode 100644 index 000000000..cfcc3aa13 --- /dev/null +++ b/plugins/janvince/smallcontactform/components/smallcontactform/scf-form.htm @@ -0,0 +1,61 @@ +{% if formSentAlias == __SELF__.alias and formError is empty and settingsGet('form_hide_after_success', 0) %} + + {# no errors and set to hide after send #} + +{% else %} + + {{ form_open(__SELF__.getFormAttributes) }} + + {% for field in __SELF__.fields %} + + {{ __SELF__.getFieldHtmlCode(field)|raw }} + + {% endfor %} + + {{ __SELF__.getAntispamFieldHtmlCode({})|raw }} + + {{ __SELF__.getDescriptionFieldHtmlCode({})|raw }} + + {{ __SELF__.getRedirectFieldHtmlCode({})|raw }} + + {% if (settingsGet('google_recaptcha_version') is null or settingsGet('google_recaptcha_version') == 'v2checkbox') and settingsGet('add_google_recaptcha') and settingsGet('google_recaptcha_site_key') %} + +
+ +
+ +
+ + {% endif %} + + {{ __SELF__.getSubmitButtonHtmlCode({})|raw }} + + {{ form_close() }} + + {% if settingsGet('add_google_recaptcha') and settingsGet('google_recaptcha_scripts_allow') %} + + + + {% if settingsGet('google_recaptcha_version') == 'v2invisible' %} + + + + {% endif %} + + {% endif %} + +{% endif %} diff --git a/plugins/janvince/smallcontactform/components/smallcontactform/scf-message.htm b/plugins/janvince/smallcontactform/components/smallcontactform/scf-message.htm new file mode 100644 index 000000000..20e14184b --- /dev/null +++ b/plugins/janvince/smallcontactform/components/smallcontactform/scf-message.htm @@ -0,0 +1,28 @@ + +{% if formSentAlias == __SELF__.alias %} + + {% if formSuccess %} + + {{ __SELF__.getGaSuccessEventHtmlCode(true)|raw }} + + {% flash success %} + +
+ {{ html_entity_decode(message)|nl2br }} +
+ + {% endflash %} + + {% elseif formError %} + + {% flash error %} + +
+ {{ html_entity_decode(message)|nl2br }} +
+ + {% endflash %} + + {% endif %} + +{% endif %} \ No newline at end of file diff --git a/plugins/janvince/smallcontactform/composer.json b/plugins/janvince/smallcontactform/composer.json new file mode 100644 index 000000000..b83feb732 --- /dev/null +++ b/plugins/janvince/smallcontactform/composer.json @@ -0,0 +1,8 @@ +{ + "name": "janvince/smallcontactform-plugin", + "type": "october-plugin", + "description": "None", + "require": { + "composer/installers": "~1.0" + } +} \ No newline at end of file diff --git a/plugins/janvince/smallcontactform/controllers/Messages.php b/plugins/janvince/smallcontactform/controllers/Messages.php new file mode 100644 index 000000000..293dc4c5d --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/Messages.php @@ -0,0 +1,158 @@ +count(); + break; + + case 'new_count': + return Message::isNew()->count(); + break; + + case 'latest_message_date': + + $data = Message::orderBy( 'created_at', 'DESC' )->first(); + + if ( !empty( $data->created_at ) ) { + Carbon::setLocale( App::getLocale() ); + return Carbon::createFromFormat( 'Y-m-d H:i:s', $data->created_at )->diffForHumans(); + } + + return NULL; + break; + + case 'latest_message_name': + $data = Message::orderBy( 'created_at', 'DESC' )->first(); + + if( !empty( $data->name ) ) { + return $data->name; + } + + return NULL; + break; + + default: + return NULL; + break; + + } + + } + + /** + * Preview page view + * @param $id + */ + public function preview( $id ){ + + $message = Message::find( $id ); + + if ( $message ) { + + $this->vars['message'] = $message; + $message->new_message = 0; + $message->save(); + + } else{ + + Flash::error( e( trans( 'janvince.smallcontactform::lang.controller.preview.record_not_found') ) ); + return Redirect::to( Backend::url( 'janvince/smallcontactform/messages' ) ); + + } + + } + + /** + * Index page view + */ + public function index(){ + + parent::index(); + + if (!$this->user->hasAccess('janvince.smallcontactform.access_messages')) { + + Flash::error( e(trans('janvince.smallcontactform::lang.controllers.index.unauthorized')) ); + return Redirect::to( Backend::url('/') ); + + } + + } + + /** + * Mark messages as read + * @param $record + */ + public function onMarkRead(){ + + if (!$this->user->hasAccess('janvince.smallcontactform.access_messages')) { + + Flash::error( e(trans('janvince.smallcontactform::lang.controllers.index.unauthorized')) ); + return; + + } + + if ( ($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds) ) { + + foreach ($checkedIds as $item) { + if (!$record = Message::find($item)) { + continue; + } + + $record->new_message = 0; + $record->save(); + + } + + Flash::success( e(trans('janvince.smallcontactform::lang.controller.scoreboard.mark_read_success')) ); + + return $this->listRefresh(); + + } + + } + +} diff --git a/plugins/janvince/smallcontactform/controllers/messages/_list_toolbar.htm b/plugins/janvince/smallcontactform/controllers/messages/_list_toolbar.htm new file mode 100644 index 000000000..5595c3ae2 --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/_list_toolbar.htm @@ -0,0 +1,72 @@ +
+
+
+
    +
  • getRecordsStats('new_count'); ?>
  • +
  • getRecordsStats('read_count'); ?>
  • +
+
+ +
+

+

getRecordsStats('new_count'); ?>

+

+
+ + +
+

+

getRecordsStats('latest_message_name'); ?>

+

getRecordsStats('latest_message_date'); ?>

+
+ +
+
+ + +
+ user->hasAccess('janvince.smallcontactform.delete_messages')): ?> + + + + + + + + user->hasAccess('janvince.smallcontactform.export_messages')): ?> + + + + + +
diff --git a/plugins/janvince/smallcontactform/controllers/messages/config_export.yaml b/plugins/janvince/smallcontactform/controllers/messages/config_export.yaml new file mode 100644 index 000000000..4d8cfbf3c --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/config_export.yaml @@ -0,0 +1,10 @@ +# =================================== +# Import/Export Behavior Config +# =================================== + +export: + title: janvince.smallcontactform::lang.controllers.messages.export + modelClass: JanVince\SmallContactForm\Models\MessageExport + list: $/janvince/smallcontactform/models/message/columns_export.yaml + redirect: /janvince/smallcontactform/messages + fileName: scf-export.csv diff --git a/plugins/janvince/smallcontactform/controllers/messages/config_filter.yaml b/plugins/janvince/smallcontactform/controllers/messages/config_filter.yaml new file mode 100644 index 000000000..206309bd7 --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/config_filter.yaml @@ -0,0 +1,10 @@ +# =================================== +# Filter Scope Definitions +# =================================== + +scopes: + + date: + label: janvince.smallcontactform::lang.controller.filter.columns.date + type: daterange + conditions: date >= ':after' AND date <= ':before' diff --git a/plugins/janvince/smallcontactform/controllers/messages/config_list.yaml b/plugins/janvince/smallcontactform/controllers/messages/config_list.yaml new file mode 100644 index 000000000..17f3a102c --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/config_list.yaml @@ -0,0 +1,43 @@ +# =================================== +# List Behavior Config +# =================================== + +# Model List Column configuration +list: $/janvince/smallcontactform/models/message/columns.yaml + +# Model Class name +modelClass: JanVince\SmallContactForm\Models\Message + +# List Title +title: "janvince.smallcontactform::lang.controllers.messages.list_title" + +# Message to display if the list is empty +noRecordsMessage: backend::lang.list.no_records + +recordUrl: 'janvince/smallcontactform/messages/preview/:id' + +# Records to display per page +recordsPerPage: 20 + +# Displays the list column set up button +showSetup: true + +# Displays the sorting link on each column +showSorting: true + +# Default sorting column +defaultSort: + column: created_at + direction: desc + +# Display checkboxes next to each record +showCheckboxes: true + +# Toolbar widget configuration +toolbar: + # Partial for toolbar buttons + buttons: list_toolbar + + # Search widget configuration + search: + prompt: backend::lang.list.search_prompt diff --git a/plugins/janvince/smallcontactform/controllers/messages/export.htm b/plugins/janvince/smallcontactform/controllers/messages/export.htm new file mode 100644 index 000000000..c0c73df08 --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/export.htm @@ -0,0 +1,25 @@ + + + + + 'layout']) ?> + +
+ exportRender() ?> +
+ +
+ +
+ + diff --git a/plugins/janvince/smallcontactform/controllers/messages/index.htm b/plugins/janvince/smallcontactform/controllers/messages/index.htm new file mode 100644 index 000000000..766877d92 --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/index.htm @@ -0,0 +1,2 @@ + +listRender() ?> diff --git a/plugins/janvince/smallcontactform/controllers/messages/preview.htm b/plugins/janvince/smallcontactform/controllers/messages/preview.htm new file mode 100644 index 000000000..59a1ee86a --- /dev/null +++ b/plugins/janvince/smallcontactform/controllers/messages/preview.htm @@ -0,0 +1,71 @@ + + + + +fatalError): ?> + +
+ +

+ +

created_at->format('j.n.Y H:i:s')); ?>

+ +
+ +

+ + + + form_data as $key => $field) : ?> + + + + + + + + + uploads): ?> + + + + + + + + + + + + + + + +
Uploads + uploads as $upload) : ?> + + + + + + +
remote_ip)) { echo($message->remote_ip); } ?>
form_description)) { echo($message->form_description); } ?>
+ +
+ +
+ +
+ + +

fatalError) ?>

+ + +

+ + + +

diff --git a/plugins/janvince/smallcontactform/lang/cs/lang.php b/plugins/janvince/smallcontactform/lang/cs/lang.php new file mode 100644 index 000000000..a97e67c19 --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/cs/lang.php @@ -0,0 +1,523 @@ + [ + 'name' => 'Kontaktní formulář', + 'description' => 'Jednoduchý kontaktní formulář', + 'category' => 'Small plugins', + ], + + 'permissions' => [ + 'access_messages' => 'Přístup k seznamu zpráv', + 'access_settings' => 'Přístup k nastavení', + 'delete_messages' => 'Smazat vybrané zprávy', + 'export_messages' => 'Exportovat zprávy', + ], + + 'navigation' => [ + 'main_label' => 'Kontaktní formulář', + 'messages' => 'Zprávy', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Kontaktní formulář', + 'description' => 'Přidá do stránky kontaktní formulář', + 'no_fields' => 'Přidejte prosím nějaká formulářová pole v administraci systému (Nastavení > Kontaktní formulář > Pole)...', + ], + + 'filter' => [ + 'date' => 'Rozmezí data', + ], + + 'scoreboard' => [ + 'records_count' => 'Zprávy', + 'latest_record' => 'nejnovější od', + 'new_count' => 'Nové', + 'new_description' => 'Zpráv', + 'read_count' => 'Přečtené', + 'all_count' => 'Celkem', + 'all_description' => 'Zpráv', + 'settings_btn' => 'Nastavení formuláře', + 'mark_read' => 'Označit jako přečtené', + 'mark_read_confirm' => 'Opravdu chcete vybrané zprávy označit jako přečtené?', + 'mark_read_success' => 'Zprávy byly označeny jako přečtené.', + ], + + 'preview' => [ + 'record_not_found' => 'Zpráva nebyla nalezena!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'id' => 'ID', + 'datetime' => 'Datum a čas', + 'form_data' => 'Data formuláře', + 'name' => 'Jméno', + 'email' => 'Email', + 'message' => 'Zpráva', + 'new_message' => 'Stav', + 'new' => 'Nová', + 'read' => 'Přečtená', + 'remote_ip' => 'IP odesílatele', + 'created_at' => 'Datum vytvoření', + 'updated_at' => 'Datum aktualizace', + ] + + ], + + + ], + + 'controllers' => [ + + 'messages' => [ + + 'list_title' => 'Zprávy', + 'preview' => 'Náhled', + 'preview_title' => 'Zpráva z kontaktního formuláře', + 'preview_date' => 'Ze dne:', + 'preview_content_title' => 'Obsah:', + 'remote_ip' => 'odesláno z ip', + 'form_alias' => 'Alias', + 'form_description' => 'Popisek', + 'export' => 'Export', + ], + + 'index' => [ + 'unauthorized' => 'Neoprávněný přístup!', + ], + + ], + + 'mail' => [ + + 'templates' => [ + 'autoreply' => 'Zpráva automatické odpovědi z kontaktního formuláře (Anglicky)', + 'notification' => 'Notifikace z kontaktního formuláře (Anglicky)', + 'autoreply_cs' => 'Zpráva automatické odpovědi z kontaktního formuláře (Česky)', + 'notification_cs' => 'Notifikace z kontaktního formuláře (Česky)', + ] + + ], + + 'reportwidget' => [ + + 'partials' => [ + + 'messages' => [ + 'label' => 'Kontaktní formulář - Přehled zpráv', + 'title' => 'Přehled zpráv', + 'messages_all' => 'Vše', + 'messages_new' => 'Nové', + 'messages_read' => 'Přečtené', + ], + + 'new_message' => [ + 'label' => 'Kontaktní formulář - Nové zprávy', + 'title' => 'Nové zprávy', + 'link_text' => 'Klikněte pro zobrazení přehledu zpráv', + ], + + ], + + ], + + 'settings' => [ + + 'form' => [ + + 'css_class' => 'CSS třída formuláře', + + 'use_placeholders' => 'Používat zástupný text (placeholder)', + 'use_placeholders_comment' => 'Místo popisků nad formulářovými poli bude použitý zástupný text', + + 'disable_browser_validation' => 'Zakázat validaci prohlížečem', + 'disable_browser_validation_comment' => 'Nepovolit prohlížeči použít vlastní validaci a zobrazovat výstrahy.', + + 'success_msg' => 'Zpráva po úspěšném odeslání', + 'success_msg_placeholder' => 'Formulář byl v pořádku odeslán.', + + 'error_msg' => 'Chybová zpráva', + 'error_msg_placeholder' => 'Při odesílání formuláře došlo k chybě!', + + 'allow_ajax' => 'Povolit AJAX', + 'allow_ajax_comment' => 'Povolí AJAX, ale umožní fungování formuláře i na prohlížečích s vypnutým JavaScriptem', + + 'allow_confirm_msg' => 'Požadovat potvrzení před odesláním', + 'allow_confirm_msg_comment' => 'Zobrazí potvrzovací okno před odesláním formuláře', + + 'send_confirm_msg' => 'Text potvrzení', + 'send_confirm_msg_placeholder' => 'Opravdu chcete odeslat formulář?', + + 'hide_after_success' => 'Skrýt formulář po úspěšném odeslání', + 'hide_after_success_comment' => 'Po odeslání zobrazí pouze zprávu z potvrzením bez formuláře', + + 'add_assets' => 'Přidat doplňky', + 'add_assets_comment' => 'Automaticky vloží potřebné CSS styly a JS skripty (Více informací je v souboru README.md)', + + 'add_css_assets' => 'Přidat CSS styly', + 'add_css_assets_comment' => 'Vloží všechny potřebné styly', + + 'add_js_assets' => 'Přidat JS skripty', + 'add_js_assets_comment' => 'Vloží všechny potřebné skripty', + + 'form_ga_event_success' => 'Událost po úspěšném odeslání', + + ], + + 'sections' => [ + 'ga_events' => 'Události' + ], + + 'ga' => [ + 'ga_success_event_allow' => 'Zaznamenat událost po úspěšném odeslání formuláře', + + ], + + 'buttons' => [ + 'send_btn_text' => 'Text odesílacího tlačítka', + 'send_btn_text_placeholder' => 'Odeslat', + + 'send_btn_css_class' => 'CSS třída odesílacího tlačítka', + 'send_btn_css_class_placeholder' => 'btn btn-primary', + + 'send_btn_wrapper_css' => 'CSS třída kontejneru', + 'send_btn_wrapper_css_placeholder' => 'form-group', + + ], + + 'redirect' => [ + + 'allow_redirect' => 'Přesměrovat po úspěšném odeslání', + 'allow_redirect_comment' => 'Přesměrovat na jinou stránku po úspěšném odeslání formuláře', + + 'redirect_url' => 'URL stránky pro přesměrování', + 'redirect_url_comment' => 'Vložte URL adresu stránky, kam bude přesměrováno (např. /kontakt/diky)', + 'redirect_url_placeholder' => '/kontakt/diky', + + 'redirect_url_external' => 'Externí URL', + 'redirect_url_external_comment' => 'Toto je adresa externí stránky (např. http://www.domain.com)', + + ], + + 'form_fields' => [ + 'prompt' => 'Přidat nové pole formuláře', + + 'name' => 'NÁZEV POLE', + 'name_comment' => 'Malými písmeny bez diakritiky (např. jmeno, email, vase_poznamka, ...)', + + 'type' => 'Typ pole', + + 'label' => 'Popisek (label)', + 'label_placeholder' => 'Pole formuláře', + + 'field_styling' => 'Vlastní CSS třídy', + 'field_styling_comment' => 'Můžete přidat vlastní styly', + + 'autofocus' => 'Automaticky zvýraznit (autofocus)', + 'autofocus_comment' => 'Po zobrazení nastavit na poli kurzor', + + 'wrapper_css' => 'CSS třída kontejneru', + 'wrapper_css_placeholder' => 'form-group', + + 'field_css' => 'CSS třida pole', + 'field_css_placeholder' => 'form-control', + + 'label_css' => 'CSS třída popisku (label)', + 'label_css_placeholder' => '', + + 'field_validation' => 'Validační pravidla pole', + 'field_validation_comment' => 'Povolí nastavení vlastních validačních pravidel', + + 'validation' => 'Pravidlo', + 'validation_prompt' => 'Přidat pravidlo', + + 'validation_type' => 'Typ', + + 'validation_error' => 'Chybová zpráva', + 'validation_error_placeholder' => 'Prosím vložte správná data.', + 'validation_error_comment' => 'Chybová hláška, která se zobrazí u pole', + + 'validation_custom_type' => 'Název validačního pravidla', + 'validation_custom_type_comment' => 'Vložte název pravidla třídy Validator (např. regex, boolean, ...).
Přehled validačních pravidel.', + 'validation_custom_type_placeholder' => 'regex', + + 'validation_custom_pattern' => 'Podmínka validačního pravidla', + 'validation_custom_pattern_comment' => 'Nechte prázdné nebo doplňte podmínku pravidla (toto je pravá část zápisu validačního pravidla za dvojtečkou - např. [abc] pro pravidlo regex).', + 'validation_custom_pattern_placeholder' => "/^[0-9]+$/", + + 'custom' => 'Vlastní pole', + 'custom_description' => 'Vlastní pole s validačními pravidly', + + 'add_values_prompt' => 'Přidat hodnoty', + 'field_value_id' => 'ID hodnoty', + 'field_value_content' => 'Obsah', + + 'hit_type' => 'Hit type', + 'event_category' => 'Kategorie události (event category)', + 'event_action' => 'Akce události (event action)', + 'event_label' => 'Štítek události (event label)', + + 'custom_code' => 'Vlastní kód', + 'custom_code_comment' => 'Vložený kód přepíše automaticky generovaný kód políčka formuláře. Používejte opatrně!', + 'custom_code_twig' => 'Povolit Twig', + 'custom_code_twig_comment' => 'Můžete povolit parset syntaxe jazyka Twig.', + + 'custom_content' => 'Vlastní obsah', + 'custom_content_comment' => 'Obsah bude přidaný k políčku formuláře.', + + ], + + 'form_field_types' => [ + 'text' => 'Text', + 'email' => 'Email', + 'textarea' => 'Textarea', + 'checkbox' => 'Checkbox', + 'dropdown' => 'Výběr (dropdown)', + 'file' => 'Soubor', + 'custom_code' => 'Vlastní kód', + 'custom_content' => 'Vlastní obsah', + ], + + 'form_field_validation' => [ + 'select' => '--- Vyberte pravidlo ---', + 'required' => 'Vyžadováno', + 'email' => 'Email', + 'numeric' => 'Číslo', + 'custom' => 'Vlastní pravidlo', + ], + + 'email' => [ + 'address_from' => 'Adresa OD', + 'address_from_placeholder' => 'john.doe@domain.com', + + 'address_from_name' => 'Jméno odesílatele', + 'address_from_name_placeholder' => 'John Doe', + + 'address_replyto' => 'Adresa Odpovědět na', + 'address_replyto_comment' => 'Odpověď na mail půjde na tuto adresu (REPLY-TO).', + + 'subject' => 'Předmět emailu', + 'subject_comment' => 'Nastavte pouze pokud chcete přepsat předmět definovaný v šabloně (Nastavení > E-mailové šablony).', + + 'template' => 'Šablona emailu', + 'template_comment' => 'Kód emailové šablony vytvořené v Nastavení > E-mailové šablony. Nechte prázdné pro výchozí šablonu: janvince.smallcontactform::mail.autoreply.', + + 'allow_email_queue' => 'Řadit do fronty', + 'allow_email_queue_comment' => 'Přidat emaily do fronty místo okamžitého odeslání. Musíte ale nejdříve správně nakonfigurovat frontu systému OctoberCMS!', + + 'allow_notifications' => 'Povolit odesílání upozornění', + 'allow_notifications_comment' => 'Odesílat upozornění, pokud někdo odešle formulář.', + + 'notification_address_to' => 'Upozornění posílat na adresu:', + 'notification_address_to_comment' => 'Jedna emailová adresa nebo seznam adres oddělených čárkami', + 'notification_address_to_placeholder' => 'notifications@domain.com', + + 'notification_address_from_form' => 'Nastavit adresu Od na email z formuláře (NEMUSÍ PODPOROVAT váš emailový systém!)', + 'notification_address_from_form_comment' => 'Nastaví u odesílaného upozornění adresu Od (From) na tu, která byla zadána ve formuláři (sloupec email musí mít nastavenou vazbu).', + + 'allow_autoreply' => 'Povolit automatickou odpověď', + 'allow_autoreply_comment' => 'Poslat automatickou odpověď odesílateli formuláře', + + 'autoreply_name_field' => 'Pole formuláře, které obsahuje JMÉNO odesílatele', + 'autoreply_name_field_empty_option' => '-- Vyberte --', + 'autoreply_name_field_comment' => 'Pole typu Text.', + + 'autoreply_email_field' => 'Pole formuláře, které obsahuje ADRESU odesílatele', + 'autoreply_email_field_empty_option' => '-- Vyberte --', + 'autoreply_email_field_comment' => 'Pole typu Email.', + + 'autoreply_message_field' => 'Pole formuláře, které obsahuje ZPRÁVU', + 'autoreply_message_field_empty_option' => '-- vyberte --', + 'autoreply_message_field_comment' => 'Pole typu Textarea nebo Text.', + + 'notification_template' => 'Šablona notifikačního emailu', + 'notification_template_comment' => 'Kód emailové šablony vytvořené v Nastavení > E-mailové šablony. Nechte prázdné pro výchozí šablonu: janvince.smallcontactform::mail.notification.', + + ], + + 'antispam' => [ + 'add_antispam' => 'Přidat pasivní ochranu proti spamu', + 'add_antispam_comment' => 'Přidá jednoduchou ale efektivní pasivní ochranu proti robotům (více informací v souboru README.md)', + + 'antispam_delay' => 'Zpoždění formuláře (s)', + 'antispam_delay_comment' => 'Test na příliš rychlé odeslání formuláře (většinou roboty)', + 'antispam_delay_placeholder' => '3', + + 'antispam_label' => 'Popisek (label) antispamového pole', + 'antispam_label_comment' => 'Popisek bude viditelný pouze na prohlížečích bez podpory JavaScriptu', + 'antispam_label_placeholder' => 'Prosím vymažte toto pole', + + 'antispam_error_msg' => 'Chybová zprávy', + 'antispam_error_msg_comment' => 'Zpráva, která se zobrazí, pokud se aktivuje pasivní antispam', + 'antispam_error_msg_placeholder' => 'Prosím vymažte obsah tohoto pole!', + + 'antispam_delay_error_msg' => 'Chybová zprávy při rychlém odeslání', + 'antispam_delay_error_msg_comment' => 'Zpráva, která se zobrazí při příliš rychlém odeslání formuláře', + 'antispam_delay_error_msg_placeholder' => 'Příliš rychlé odeslání formuláře! Prosím zkuste to za pár vteřin znovu!', + + 'add_google_recaptcha' => 'Přidat Google reCaptcha', + 'add_google_recaptcha_comment' => 'Přidá reCaptcha do kontaktního formuláře (více informací v souboru README.md).
API klíče můžete získat na stránce Google reCaptcha.', + + 'google_recaptcha_version' => 'Verze Google reCaptcha', + 'google_recaptcha_version_comment' => 'Zvolte verzi reCaptcha widgetu.
Více informací naleznete na webu Google reCaptcha.', + + 'google_recaptcha_versions' => [ + 'v2checkbox' => 'reCaptcha V2 zaškrtávací pole', + 'v2invisible' => 'reCaptcha V2 neviditelná', + ], + + 'google_recaptcha_site_key' => 'Site key', + 'google_recaptcha_site_key_comment' => 'Vložte svůj "site key"', + + 'google_recaptcha_secret_key' => 'Secret key', + 'google_recaptcha_secret_key_comment' => 'Vložte svůj "secret key"', + + 'google_recaptcha_wrapper_css' => 'CSS třída kontejneru reCaptcha boxu', + 'google_recaptcha_wrapper_css_comment' => 'CSS třída kontejneru, ve kterém je vložený box reCaptcha', + 'google_recaptcha_wrapper_css_placeholder' => 'form-group', + + 'google_recaptcha_error_msg' => 'Chybová zpráva', + 'google_recaptcha_error_msg_comment' => 'Zpráva, která se zobrazí, pokud dojde chybě při ověření reCAPTCHA.', + 'google_recaptcha_error_msg_placeholder' => 'Chyba při ověření pomocí Google reCAPTCHA!', + + 'google_recaptcha_scripts_allow' => 'Automaticky přidat Google reCAPTCHA sckript', + 'google_recaptcha_scripts_allow_comment' => 'Vloží odkaz na JavaScriptový soubor potřebný pro fungování reCAPTCHA.', + + 'google_recaptcha_locale_allow' => 'Povolit detekci jazyka', + 'google_recaptcha_locale_allow_comment' => 'Přidá k reCAPTCHA skriptu kód jazyka stránky, takže ověřovací box bude mluvit jazykem návštěvníka webu.', + + 'add_ip_protection' => 'Testovat IP adresu odesílatele', + 'add_ip_protection_comment' => 'Nepovolí příliš mnoho odeslání formuláře z jedné IP adresy', + + 'add_ip_protection_count' => 'Maximální počet odeslání během jednoho dne', + 'add_ip_protection_count_comment' => 'Počet povolených odeslání formuláře z jedné IP adresy během jednoho dne', + 'add_ip_protection_count_placeholder' => '3', + + 'add_ip_protection_error_get_ip' => 'Nepodařilo se určit vaši IP adresu!', + + 'add_ip_protection_error_too_many_submits' => 'Chybová zpráva při překročení počtu odeslání', + 'add_ip_protection_error_too_many_submits_comment' => 'Zpráva, kterou obdrží uživatel při překročení limitu počtu odeslání formuláře', + 'add_ip_protection_error_too_many_submits_placeholder' => 'Byl překročen limit odeslání formuláře během jednoho dne!', + + 'disabled_extensions' => 'Zakázaná rozšíření', + 'disabled_extensions_comment' => 'Nastavení ze záložky Soukromí zkusobila vypnutí těchto rozšíření', + ], + + 'mapping' => [ + + 'hint' => [ + 'title' => 'Proč vazby na sloupce?', + 'content' => ' +

Můžete vytvořit libovolný formulář s vlastními poli a jejich typy.

+

Systém zapíše do databáze všechna odeslaná data formuláře, ale pro Přehled zpráv jsou zvlášť ukládána pole Jméno, Email a Zpráva.

+

Proto je nutné identifikovat pro tyto sloupce odpovídající pole ve vašem formuláři.

+

Vytvořené vazby jsou použité i při odesílání automatických odpovědí, kde je nutné vazba alespoň na pole Email.

+ ', + ], + + 'warning' => [ + 'title' => 'Nevidíte vaše formulářová pole?', + 'content' => ' +

Pokud zde nevidíte svá formulářová pole, klikněte dole na tlačítko Uložit a pak obnovte stránku (F5 nebo Ctr+R / Cmd+R).

+ ', + ], + + ], + + 'privacy' => [ + 'disable_messages_saving' => 'Zakázat ukládání zpráv', + 'disable_messages_saving_comment' => 'Pokud je zaškrtnuto, odeslané zprávy se nebudou ukládat do databáze.
Tato volba zároveň zakáže použití IP ochrany!', + 'disable_messages_saving_comment_section' => '

Ujistěte se, že máte povoleny notifikační emaily, jinak nebudete mít žádná data z odeslaných formulářů!

', + ], + + 'tabs' => [ + 'form' => 'Formulář', + 'buttons' => 'Odesílací tlačítko', + 'form_fields' => 'Pole formuláře', + 'mapping' => 'Vazby sloupců', + 'email' => 'Email', + 'antispam' => 'Antispam', + 'privacy' => 'Soukromí' + ], + + ], + + 'components' => [ + + 'groups' => [ + + 'hacks' => 'Hacks', + 'override_form' => 'Přepsat nastavení formuláře', + 'override_notifications' => 'Přepsat nastavení notifikací', + 'override_autoreply' => 'Přepsat nastavení automatických odpovědí', + 'override' => 'Přepsat nastavení', + 'override_redirect' => 'Přepsat nastavení přesměrování', + 'override_ga' => 'Přepsat nastavení Google Analytics', + ], + + 'properties' => [ + + 'disable_notifications' => 'Zakázat odesílání notifikačních emailů', + 'disable_notifications_comment' => 'Zakáže odeslání notifikáčních emailů (bez ohledu na systémová nastavení formuláře)', + + 'form_description' => 'Popisek formuláře', + 'form_description_comment' => 'Volitelně můžete přidat popisek formuláře, který se uloží společně s odeslanými daty do seznamu zpráv. Můžete použít i {{ :slug }}.', + + 'disable_fields' => 'Zakázat pole', + 'disable_fields_comment' => 'Vložte názvy polí oddělené trubkou (např. name|message|phone)', + + 'send_btn_label' => 'Popisek odesílacího tlačítka', + 'send_btn_label_comment' => 'Přepíše výchozí text odesílacího tlačítka', + + 'form_success_msg' => 'Zpráva po úspěšném odeslání', + 'form_success_msg_comment' => 'Přepíše výchozí zprávu zobrazenou po úspěšném odeslání formuláře', + + 'form_error_msg' => 'Zpráva po chybě při odeslání', + 'form_error_msg_comment' => 'Přepíše výchozí zprávu zobrazenou po neúspěšném odeslání formuláře', + + 'notification_address_to' => 'Adresa KOMU', + 'notification_address_to_comment' => 'Přepíše adresu KOMU v notifikačním emailu', + + 'notification_address_from' => 'Adresa OD', + 'notification_address_from_comment' => 'Přepíše adresu OD v notifikačním emailu', + + 'notification_address_from_name' => 'Jméno pro adresu OD', + 'notification_address_from_name_comment' => 'Přepíše jméno zobrazené spolu s emailem OD', + + 'notification_template' => 'Šablona notifikace', + 'notification_template_comment' => 'Přepíše šablonu notifikačního emailu', + + 'notification_subject' => 'Předmět notifikace', + 'notification_template_comment' => 'Přepíše předmět emailu', + + 'disable_autoreply' => 'Zakázat notifikace', + 'disable_autoreply_comment' => 'Zakáže odesílání notifikací', + + 'autoreply_address_from' => 'Adresa OD', + 'autoreply_address_from_comment' => 'Přepíše adresu od v automatické odpovědi po odeslání formuláře', + + 'autoreply_address_from_name' => 'Jméno pro adresu OD', + 'autoreply_address_from_name_comment' => 'Přepíše jméno zobrazené spolu s emailem OD', + + 'autoreply_address_replyto' => 'Adresa ODPOVĚDĚT NA', + 'autoreply_address_replyto_comment' => 'Přepíše adresu REPLY TO v automatické odpovědi po odeslání formuláře.', + + 'autoreply_template' => 'Šablona automatické odpovědi', + 'autoreply_template_comment' => 'Přepíše šablonu emailu automatické odpovědi', + + 'autoreply_subject' => 'Předmět automatické odpovědi', + 'autoreply_template_comment' => 'Přepíše předmět emailu', + + ] + + ], + +]; diff --git a/plugins/janvince/smallcontactform/lang/de/lang.php b/plugins/janvince/smallcontactform/lang/de/lang.php new file mode 100644 index 000000000..1e023701c --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/de/lang.php @@ -0,0 +1,491 @@ + [ + 'name' => 'Kontaktformular', + 'description' => 'Kontaktformular', + 'category' => 'Kontaktformular', + ], + + 'permissions' => [ + 'access_messages' => 'Auf Nachrichtenliste zugreifen', + 'access_settings' => 'Backendeinstellungen bearbeiten', + 'delete_messages' => 'gespeicherte Nachrichten löschen', + 'export_messages' => 'gespeicherte Nachrichten exportieren', + ], + + 'navigation' => [ + 'main_label' => 'Kontaktformular', + 'messages' => 'Nachrichten', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Kontaktformular', + 'description' => 'Kontaktformular in die Seite einfügen', + 'no_fields' => 'Bitte fügen Sie zuerst einige Formularfelder in der Backend-Administration hinzu (in Einstellungen > Kontaktformular > Felder)...', + ], + + 'filter' => [ + 'date' => 'Datumsbereich', + ], + + 'scoreboard' => [ + 'records_count' => 'Nachrichten', + 'latest_record' => 'Letzte von', + 'new_count' => 'Neu', + 'new_description' => 'Nachrichten', + 'read_count' => 'Gelesen', + 'all_count' => 'Insgesamt', + 'all_description' => 'Nachrichten', + 'settings_btn' => 'Formular Einstellungen', + 'mark_read' => 'Als Gelesen markieren', + 'mark_read_confirm' => 'Möchten Sie wirklich die ausgewählten Nachrichten als gelesen markeiren?', + 'mark_read_success' => 'Erfolgreich als gelesen markiert.', + ], + + 'preview' => [ + 'record_not_found' => 'Nachricht nicht gefunden!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'id' => 'ID', + 'datetime' => 'Datum und Zeit', + 'form_data' => 'Daten', + 'name' => 'Name', + 'email' => 'Email', + 'message' => 'Nachricht', + 'new_message' => 'Status', + 'new' => 'Neu', + 'read' => 'Gelesen', + 'remote_ip' => 'IP des Absenders', + 'form_alias' => 'Alias', + 'form_description' => 'Beschreibung', + 'created_at' => 'Erstellt am', + 'updated_at' => 'Geupdated am', + ] + + ], + + + ], + + 'controllers' => [ + + 'messages' => [ + + 'list_title' => 'Nachrichten', + 'preview' => 'Vorschau', + 'preview_title' => 'Nachricht', + 'preview_date' => 'Datum:', + 'preview_content_title' => 'Inhalt:', + 'remote_ip' => 'Von IP gesendet:', + 'export' => 'Exportieren', + ], + + 'index' => [ + 'unauthorized' => 'Unerlaubter Zugriff', + ], + + ], + + 'mail' => [ + + 'templates' => [ + + 'autoreply' => 'Form autoreply message (English)', + 'autoreply_cs' => 'Form autoreply message (Czech)', + + 'notification' => 'Form notification message (English)', + 'notification_cs' => 'Form notification message (Czech)', + + ] + + ], + + 'reportwidget' => [ + + 'partials' => [ + + 'messages' => [ + 'label' => 'Kontaktformular - Nachrichtenstatistik', + 'title' => 'Nachrichtenstatistik', + 'messages_all' => 'Alle', + 'messages_new' => 'Neu', + 'messages_read' => 'Gelesen', + ], + + 'new_message' => [ + 'label' => 'Kontaktformular - Neue Nachrichten', + 'title' => 'Neue Nachrichten', + 'link_text' => 'Hier klicken, um die Liste aller Nachrichten anzuzeigen', + ], + + ], + + ], + + 'settings' => [ + + 'form' => [ + + 'css_class' => 'Formular CSS Klasse', + + 'use_placeholders' => 'Platzhalter benutzen', + 'use_placeholders_comment' => 'Platzhalter werden anstelle von Labels verwendet', + + 'disable_browser_validation' => 'Browservalidierung deaktivieren', + 'disable_browser_validation_comment' => 'Integrierte Validierung und Popups im Browser nicht zulassen.', + + 'success_msg' => 'Form success message', + 'success_msg_placeholder' => 'Wir haben Ihre Nachricht erhalten.', + + 'error_msg' => 'Form error message', + 'error_msg_placeholder' => 'Es gab einen Fehler beim Senden Ihrer Daten!', + + 'allow_ajax' => 'Enable AJAX', + 'allow_ajax_comment' => 'AJAX mit Fallback für Browser ohne JavaScript verwenden', + + 'allow_confirm_msg' => 'Vor dem Absenden des Formulars um Bestätigung bitten', + 'allow_confirm_msg_comment' => 'Bestätigungsdialog vor dem Senden hinzufügen', + + 'send_confirm_msg' => 'Bestätigungs-Text', + 'send_confirm_msg_placeholder' => 'Sind Sie sicher?', + + 'hide_after_success' => 'Formular nach erfolgreichem Senden ausblenden', + 'hide_after_success_comment' => 'Nur Erfolgsmeldung ohne Formular anzeigen', + + 'add_assets' => 'Assets hinzufügen', + 'add_assets_comment' => 'Automatisches Hinzufügen notwendiger CSS- und JS-Assets (mehr über Assets in der Datei README.md)', + + 'add_css_assets' => 'CSS Assets hinzufügen', + 'add_css_assets_comment' => 'Alle benötigten CSS Dateien werden hinzugefügt', + + 'add_js_assets' => 'JavaScript Assets hinzufügen', + 'add_js_assets_comment' => 'Alle benötigten JavaScript Dateien werden hinzugefügt', + + + ], + + 'buttons' => [ + 'send_btn_text' => 'Text senden Button', + 'send_btn_text_placeholder' => 'Absenden', + + 'send_btn_css_class' => 'CSS Klasse senden Button', + 'send_btn_css_class_placeholder' => 'btn btn-primary', + + 'send_btn_wrapper_css' => 'CSS Klasse des senden Button wrappers', + 'send_btn_wrapper_css_placeholder' => 'form-group', + + ], + + 'redirect' => [ + + 'allow_redirect' => 'Nach dem Einreichen umleiten', + 'allow_redirect_comment' => 'Nach erfolgreicher Übermittlung auf eine andere Seite umleiten', + + 'redirect_url' => 'URL der Seite, auf die umgeleitet werden soll', + 'redirect_url_comment' => 'Geben Sie die URL Ihrer Seite ein (bspw. /kontact/danke)', + 'redirect_url_placeholder' => '/kontakt/danke', + + 'redirect_url_external' => 'Externe URL', + 'redirect_url_external_comment' => 'Dies ist ein externer URL-Pfad (bspw. http://www.domain.com', + + ], + + 'form_fields' => [ + 'prompt' => 'Neues Formularfeld hinzufügen', + + 'name' => 'FELDNAME', + 'name_comment' => 'Kleinbuchstaben ohne Sonderzeichen (bspw. name, email, adresse, ...)', + + 'type' => 'Feldtyp', + + 'label' => 'Label', + 'label_placeholder' => 'Vollständiger Name', + + 'field_styling' => 'Eigene CSS Klasse', + 'field_styling_comment' => 'Ändern der Standard-Bootstrap-Stile', + + 'autofocus' => 'Autofokus-Feld', + 'autofocus_comment' => 'Autofokus für dieses Formularfeld', + + 'wrapper_css' => 'Wrapper CSS-Klasse', + 'wrapper_css_placeholder' => 'form-group', + + 'field_css' => 'Feld CSS-Klasse', + 'field_css_placeholder' => 'form-control', + + 'label_css' => 'Label CSS-Klasse', + 'label_css_placeholder' => '', + + 'field_validation' => 'Feldüberprüfung', + 'field_validation_comment' => 'Feldüberprüfungsregeln hinzufügen', + + 'validation' => 'Validierung', + 'validation_prompt' => 'Validierung hinzufügen', + + 'validation_type' => 'Validierungsregel', + + 'validation_error' => 'Validierungs-Fehlermeldung', + 'validation_error_placeholder' => 'Bitte gültige Daten eingeben.', + 'validation_error_comment' => 'Fehlermeldung, die zu verwenden ist, wenn die Validierung fehlschlägt', + + 'validation_custom_type' => 'Name der Validierungsregel', + 'validation_custom_type_comment' => 'Validator-Regelnamen eingeben (bspw. regex, boolean, ...).
See validation rules.', + 'validation_custom_type_placeholder' => 'regex', + + 'validation_custom_pattern' => 'Muster für Validierungsregeln', + 'validation_custom_pattern_comment' => 'Left empty or enter custom rule pattern (this is a right part of Validator rule after colon - eg. [abc] for regex).', + 'validation_custom_pattern_placeholder' => "/^[0-9]+$/", + + 'custom' => 'Benutzerdefiniertes Feld', + 'custom_description' => 'Benutzerdefiniertes Feld mit Validierungsoption', + + 'add_values_prompt' => 'Werte hinzufügen', + 'field_value_id' => 'Feld ID', + 'field_value_content' => 'Feld Inhalt', + + ], + + 'form_field_types' => [ + 'text' => 'Text', + 'email' => 'Email', + 'textarea' => 'Textbereich', + 'checkbox' => 'Checkbox', + 'dropdown' => 'Dropdown-Menü', + 'file' => 'File', + 'custom_code' => 'Custom code', + 'custom_content' => 'Custom content', + ], + + 'form_field_validation' => [ + 'select' => '--- Validierung auswählen ---', + 'required' => 'erforderlich', + 'email' => 'Email', + 'numeric' => 'Numerisch', + 'custom' => 'Benutzerdefinierte Regel', + ], + + 'email' => [ + 'address_from' => 'Absenderaddresse', + 'address_from_placeholder' => 'max.mustermann@domain.de', + + 'address_from_name' => 'Absendername', + 'address_from_name_placeholder' => 'Max Mustermann', + + 'subject' => 'Email subject', + 'subject_comment' => 'Nur einstellen, wenn Sie andere als die unter Einstellungen > Mail-Vorlagen definierten Einstellungen wünschen.', + + 'template' => 'Email template', + 'template_comment' => 'Code der E-Mail-Vorlage, die unter Einstellungen > E-Mail-Vorlagen erstellt wurde. Bei Standardvorlage leer lassen: janvince.smallcontactform::mail.autoreply.', + + 'allow_email_queue' => 'E-Mail in Warteschlange setzen', + 'allow_email_queue_comment' => 'Fügen Sie E-Mails in die Warteschlange ein, anstatt sie sofort zu senden. Sie müssen zuerst Ihre OctoberCMS-Warteschlange konfigurieren!', + + 'allow_notifications' => 'Benachrichtigungen zulassen', + 'allow_notifications_comment' => 'Benachrichtigung senden, nachdem das Formular gesendet wurde', + + 'notification_address_to' => 'Benachrichtigung an E-Mail senden', + 'notification_address_to_comment' => 'Eine E-Mail-Adresse oder eine durch Komma getrennte Liste von Adressen', + 'notification_address_to_placeholder' => 'kontakt@domain.de', + + 'notification_address_from_form' => 'Benachrichtigung von der Adresse des Absenders erzwingen (NICHT von allen E-Mail-Systemen UNTERSTÜTZT!)', + 'notification_address_from_form_comment' => 'Benachrichtigung von Adresse auf eine im Kontaktformular eingegebene E-Mail setzen (das Feld muss in der Spaltenzuordnung gesetzt werden).', + + 'allow_autoreply' => 'Autoreply zulassen', + 'allow_autoreply_comment' => 'Senden Sie eine Kopie des Formularinhalts an den Autor', + + 'autoreply_name_field' => 'NAME form field', + 'autoreply_name_field_empty_option' => '-- Select --', + 'autoreply_name_field_comment' => 'Must be type of Text.
Save and refresh this page if you can\'t see your fields.', + + 'autoreply_email_field' => 'EMAIL address form field', + 'autoreply_email_field_empty_option' => '-- Select --', + 'autoreply_email_field_comment' => 'Must be type of Email.
Save and refresh this page if you can\'t see your fields.', + + 'autoreply_message_field' => 'MESSAGE form field', + 'autoreply_message_field_empty_option' => '-- Select --', + 'autoreply_message_field_comment' => 'Must be type of Textarea or Text.
Save and refresh this page if you can\'t see your fields.', + + 'notification_template' => 'Notification email template', + 'notification_template_comment' => 'Code of email template created in Settings > Email templates. Left empty for default template: janvince.smallcontactform::mail.autoreply.', + + ], + + 'antispam' => [ + 'add_antispam' => 'Add passive antispam protection', + 'add_antispam_comment' => 'Add simple but effective passive antispam control (more info in README.md file)', + + 'antispam_delay' => 'Antispam delay (s)', + 'antispam_delay_comment' => 'Delay protection for too fast form sending (usually by robots)', + 'antispam_delay_placeholder' => '3', + + 'antispam_label' => 'Antispam field label', + 'antispam_label_comment' => 'Label will be visible for non JavaScript enabled browsers', + 'antispam_label_placeholder' => 'Please clear this field', + + 'antispam_error_msg' => 'Error message', + 'antispam_error_msg_comment' => 'Message to show to user when antispam protection is triggered', + 'antispam_error_msg_placeholder' => 'Please empty this field!', + + 'antispam_delay_error_msg' => 'Delay error message', + 'antispam_delay_error_msg_comment' => 'Message to show to user when form was sent too fast', + 'antispam_delay_error_msg_placeholder' => 'Form sent too fast! Please wait few seconds and try again!', + + 'add_google_recaptcha' => 'Add Google reCaptcha', + 'add_google_recaptcha_comment' => 'Add reCaptcha to Contact Form (more info in README.md file).
You can get API keys on Google reCaptcha site.', + + 'google_recaptcha_version' => 'Google reCaptcha version', + 'google_recaptcha_version_comment' => 'Choose a version of reCaptcha widget.
More info on Google reCaptcha site.', + + 'google_recaptcha_versions' => [ + 'v2checkbox' => 'reCaptcha V2 checkbox', + 'v2invisible' => 'reCaptcha V2 invisible', + ], + + 'google_recaptcha_site_key' => 'Site key', + 'google_recaptcha_site_key_comment' => 'Put your site key', + + 'google_recaptcha_secret_key' => 'Secret key', + 'google_recaptcha_secret_key_comment' => 'Put your secret key', + + 'google_recaptcha_wrapper_css' => 'reCaptcha box wrapper CSS class', + 'google_recaptcha_wrapper_css_comment' => 'CSS class of wrapper box around reCaptcha box', + 'google_recaptcha_wrapper_css_placeholder' => 'form-group', + + 'google_recaptcha_error_msg' => 'Error message', + 'google_recaptcha_error_msg_comment' => 'Message to show to user when reCAPTCHA is not validated.', + 'google_recaptcha_error_msg_placeholder' => 'Google reCAPTCHA validation error!', + + 'google_recaptcha_scripts_allow' => 'Automatically add necessary JS scripts', + 'google_recaptcha_scripts_allow_comment' => 'This will add link to JS scripts to your site.', + + 'google_recaptcha_locale_allow' => 'Allow locale detection', + 'google_recaptcha_locale_allow_comment' => 'This will add curent web page locale to reCAPTCHA script, so it will translated.', + + 'add_ip_protection' => 'Check sender\'s IP', + 'add_ip_protection_comment' => 'Do not allow too many form submits from one IP address', + + 'add_ip_protection_count' => 'Maximum form submits during a day', + 'add_ip_protection_count_comment' => 'Number of allowed submits from one IP address during a single day', + 'add_ip_protection_count_placeholder' => '3', + + 'add_ip_protection_error_get_ip' => 'We wasn\'t able to determine your IP address!', + + 'add_ip_protection_error_too_many_submits' => 'Too many submits error message', + 'add_ip_protection_error_too_many_submits_comment' => 'Error message to show to the user', + 'add_ip_protection_error_too_many_submits_placeholder' => 'Too many form submits from one address today!', + + 'disabled_extensions' => 'Disabled extensions', + 'disabled_extensions_comment' => 'Settings set on Privacy tab disabled these extensions', + + ], + + 'mapping' => [ + + 'hint' => [ + 'title' => 'Why fields mapping?', + 'content' => ' +

You can build a custom form with own field names and types.

+

System writes all form data in database, but for quick overview Name, Email and Message columns are visible separately in Messages list.

+

So you have to help system to identify these columns by mapping to your form fields.

+

These mappings are also used for autoreply emails where at least Email field mapping is important.

+ ', + ], + + 'warning' => [ + 'title' => 'Can\'t select your form fields?', + 'content' => ' +

If you don\'t see your form fields, click on button Save at the bottom of this page and then reload page (F5 or Ctr+R / Cmd+R).

+ ', + ], + + ], + + 'privacy' => [ + 'disable_messages_saving' => 'Disable messages saving', + 'disable_messages_saving_comment' => 'When checked, no data will saved in Messages list.
This will also disable IP protection!', + 'disable_messages_saving_comment_section' => '

Be sure to allow notification emails or you will have no data from sent forms!

', + ], + + 'tabs' => [ + 'form' => 'Form', + 'buttons' => 'Send button', + 'form_fields' => 'Fields', + 'mapping' => 'Columns mapping', + 'email' => 'Email', + 'antispam' => 'Antispam', + 'privacy' => 'Privacy' + ], + + ], + + 'components' => [ + + 'groups' => [ + + 'hacks' => 'Hacks', + 'override_form' => 'Override form settings', + 'override_notifications' => 'Override notification settings', + 'override_autoreply' => 'Override autoreply settings', + 'override' => 'Override form settings', + + + ], + 'properties' => [ + + 'form_description' => 'Form description', + 'form_description_comment' => 'You can add optional form description, that will be saved with other sent data in the messages list. You can also use {{ :slug }} here.', + + 'disable_fields' => 'Disable fields', + 'disable_fields_comment' => 'This will disable listed fields. Add field names separated by pipe (eg. name|message|phone)', + + 'send_btn_label' => 'Send button label', + 'send_btn_label_comment' => 'Override send button label', + + 'form_success_msg' => 'Success message', + 'form_success_msg_comment' => 'Override success message shown after successful sent', + + 'form_error_msg' => 'Error message', + 'form_error_msg_comment' => 'Override error message shown after unsuccessful sent', + + 'disable_notifications' => 'Disable notification', + 'disable_notifications_comment' => 'This will disable notification emails (overrides form settings)', + + 'notification_address_to' => 'Address TO', + 'notification_address_to_comment' => 'This will override email address where notification email will be sent (if enabled in form settings)', + + 'notification_address_from' => 'Address FROM', + 'notification_address_from_comment' => 'This will override email address from where notification email will be sent', + + 'notification_address_from_name' => 'Address FROM name', + 'notification_address_from_name_comment' => 'This will override email address name from where notification email will be sent', + + 'notification_template' => 'Notification template', + 'notification_template_comment' => 'This will override notification email template (eg. janvince.smallcontactform::mail.notification)', + + 'disable_autoreply' => 'Disable notification', + 'disable_autoreply_comment' => 'This will disable notification emails (overrides form settings)', + + 'autoreply_address_from' => 'Address FROM', + 'autoreply_address_from_comment' => 'This will override email address in autoreply email (if enabled in form settings)', + + 'autoreply_address_from_name' => 'Address (FROM) name', + 'autoreply_address_from_name_comment' => 'This will override email address name in autoreply email (if enabled in form settings)', + + 'autoreply_template' => 'Autoreply template', + 'autoreply_template_comment' => 'This will override autoreply email template (eg. janvince.smallcontactform::mail.autoreply)', + + ] + + ], + +]; diff --git a/plugins/janvince/smallcontactform/lang/en/lang.php b/plugins/janvince/smallcontactform/lang/en/lang.php new file mode 100644 index 000000000..7ee282274 --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/en/lang.php @@ -0,0 +1,529 @@ + [ + 'name' => 'Contact form', + 'description' => 'Simple contact form builder', + 'category' => 'Small plugins', + ], + + 'permissions' => [ + 'access_messages' => 'Access messages list', + 'access_settings' => 'Manage backend preferences', + 'delete_messages' => 'Delete stored messages', + 'export_messages' => 'Export messages', + ], + + 'navigation' => [ + 'main_label' => 'Contact form', + 'messages' => 'Messages', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Contact form', + 'description' => 'Insert contact form to the page', + 'no_fields' => 'Please add some form fields in backend administration first (in Settings > Small Contact form > Fields)...', + ], + + 'filter' => [ + 'date' => 'Date range', + ], + + 'scoreboard' => [ + 'records_count' => 'Messages', + 'latest_record' => 'Latest from', + 'new_count' => 'New', + 'new_description' => 'Messages', + 'read_count' => 'Read', + 'all_count' => 'Total', + 'all_description' => 'Messages', + 'settings_btn' => 'Form settings', + 'mark_read' => 'Mark as read', + 'mark_read_confirm' => 'Really set selected messages as read?', + 'mark_read_success' => 'Successfully marked as read.', + ], + + 'preview' => [ + 'record_not_found' => 'Message not found!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'id' => 'ID', + 'datetime' => 'Date and time', + 'form_data' => 'Form data', + 'name' => 'Name', + 'email' => 'Email', + 'message' => 'Message', + 'new_message' => 'Status', + 'new' => 'New', + 'read' => 'Read', + 'remote_ip' => 'Sender\'s IP', + 'form_alias' => 'Alias', + 'form_description' => 'Description', + 'created_at' => 'Created at', + 'updated_at' => 'Updated at', + 'url' => 'URL', + 'files' => 'Files', + ] + + ], + + + ], + + 'controllers' => [ + + 'messages' => [ + + 'list_title' => 'Messages', + 'preview' => 'Preview', + 'preview_title' => 'Contact form message', + 'preview_date' => 'From date:', + 'preview_content_title' => 'Content:', + 'remote_ip' => 'Sent from ip', + 'export' => 'Export', + ], + + 'index' => [ + 'unauthorized' => 'Unauthorized access', + ], + + ], + + 'mail' => [ + + 'templates' => [ + + 'autoreply' => 'Form autoreply message (English)', + 'autoreply_cs' => 'Form autoreply message (Czech)', + + 'notification' => 'Form notification message (English)', + 'notification_cs' => 'Form notification message (Czech)', + + ] + + ], + + 'reportwidget' => [ + + 'partials' => [ + + 'messages' => [ + 'label' => 'Contact form - Messages stats', + 'title' => 'Messages stats', + 'messages_all' => 'All', + 'messages_new' => 'New', + 'messages_read' => 'Read', + ], + + 'new_message' => [ + 'label' => 'Contact form - New messages', + 'title' => 'New messages', + 'link_text' => 'Click to show Messages list', + ], + + ], + + ], + + 'settings' => [ + + 'form' => [ + + 'css_class' => 'Form CSS class', + + 'use_placeholders' => 'Use placeholders', + 'use_placeholders_comment' => 'Placeholders will be shown instead of field labels', + + 'disable_browser_validation' => 'Disable browser validation', + 'disable_browser_validation_comment' => 'Do not allow browser built-in validation and popups.', + + 'success_msg' => 'Form success message', + 'success_msg_placeholder' => 'Your data was sent.', + + 'error_msg' => 'Form error message', + 'error_msg_placeholder' => 'There was an error sending your data!', + + 'allow_ajax' => 'Enable AJAX', + 'allow_ajax_comment' => 'Allow AJAX with fallback for non JavaScript browsers', + + 'allow_confirm_msg' => 'Ask confirmation before form send', + 'allow_confirm_msg_comment' => 'Add confirm dialog before sending', + + 'send_confirm_msg' => 'Confirmation text', + 'send_confirm_msg_placeholder' => 'Are you sure?', + + 'hide_after_success' => 'Hide form after successful send', + 'hide_after_success_comment' => 'Show only success message without form', + + 'add_assets' => 'Add assets', + 'add_assets_comment' => 'Automatically add necessary CSS and JS assets (more about assets in README.md file)', + + 'add_css_assets' => 'Add CSS assets', + 'add_css_assets_comment' => 'All necesssary styles will be included', + + 'add_js_assets' => 'Add JavaScript assets', + 'add_js_assets_comment' => 'All necesssary JavaScripts will be included', + + 'form_ga_event_success' => 'GA event after successful sent', + + ], + + 'sections' => [ + 'ga_events' => 'Events' + ], + + 'ga' => [ + 'ga_success_event_allow' => 'Send event after successful sent', + + ], + + 'buttons' => [ + 'send_btn_text' => 'Send button text', + 'send_btn_text_placeholder' => 'Send', + + 'send_btn_css_class' => 'Send button CSS class', + 'send_btn_css_class_placeholder' => 'btn btn-primary', + + 'send_btn_wrapper_css' => 'Send button wrapper CSS class', + 'send_btn_wrapper_css_placeholder' => 'form-group', + + ], + + 'redirect' => [ + + 'allow_redirect' => 'Redirect after submit', + 'allow_redirect_comment' => 'Redirect to another page after successfull submit', + + 'redirect_url' => 'Page URL to redirect to', + 'redirect_url_comment' => 'Enter your page URL (eg. /contact/thank-you)', + 'redirect_url_placeholder' => '/contact/thank-you', + + 'redirect_url_external' => 'External URL', + 'redirect_url_external_comment' => 'This is external URL path (eg. http://www.domain.com)', + + ], + + 'form_fields' => [ + 'prompt' => 'Add new form field', + + 'name' => 'FIELD NAME', + 'name_comment' => 'Lower case without special characters (eg. name, email, home_address, ...)', + + 'type' => 'Field type', + + 'label' => 'Label', + 'label_placeholder' => 'Full name', + + 'field_styling' => 'Custom CSS class', + 'field_styling_comment' => 'Change default Bootstrap styles', + + 'autofocus' => 'Autofocus field', + 'autofocus_comment' => 'Autofocus this form field', + + 'wrapper_css' => 'Wrapper CSS class', + 'wrapper_css_placeholder' => 'form-group', + + 'field_css' => 'Field CSS class', + 'field_css_placeholder' => 'form-control', + + 'label_css' => 'Label CSS class', + 'label_css_placeholder' => '', + + 'field_validation' => 'Field validation', + 'field_validation_comment' => 'Add field validation rules', + + 'validation' => 'Validation', + 'validation_prompt' => 'Add validation', + + 'validation_type' => 'Validation rule', + + 'validation_error' => 'Validation error message', + 'validation_error_placeholder' => 'Please enter valid data.', + 'validation_error_comment' => 'Error message to use when validation fails', + + 'validation_custom_type' => 'Validation rule name', + 'validation_custom_type_comment' => 'Enter Validator rule name (eg. regex, boolean, ...).
See validation rules.', + 'validation_custom_type_placeholder' => 'regex', + + 'validation_custom_pattern' => 'Validation rule pattern', + 'validation_custom_pattern_comment' => 'Left empty or enter custom rule pattern (this is a right part of Validator rule after colon - eg. [abc] for regex).', + 'validation_custom_pattern_placeholder' => "/^[0-9]+$/", + + 'custom' => 'Custom field', + 'custom_description' => 'Custom field with validation option', + + 'add_values_prompt' => 'Add values', + 'field_value_id' => 'Field value ID', + 'field_value_content' => 'Field value content', + + 'hit_type' => 'Hit type', + 'event_category' => 'Event category', + 'event_action' => 'Event action', + 'event_label' => 'Event label', + + 'custom_code' => 'Custom code', + 'custom_code_comment' => 'This code will override built in field code. Use carefully!', + 'custom_code_twig' => 'Allow Twig', + 'custom_code_twig_comment' => 'If checked, Twig markup will be parsed.', + + 'custom_content' => 'Custom content', + 'custom_content_comment' => 'This content will be added to field.', + ], + + 'form_field_types' => [ + 'text' => 'Text', + 'email' => 'Email', + 'textarea' => 'Textarea', + 'checkbox' => 'Checkbox', + 'dropdown' => 'Dropdown', + 'file' => 'File', + 'custom_code' => 'Custom code', + 'custom_content' => 'Custom content', + ], + + 'form_field_validation' => [ + 'select' => '--- Select validation ---', + 'required' => 'Required', + 'email' => 'Email', + 'numeric' => 'Numeric', + 'custom' => 'Custom rule', + ], + + 'email' => [ + 'address_from' => 'From address', + 'address_from_placeholder' => 'john.doe@domain.com', + + 'address_from_name' => 'From address name', + 'address_from_name_placeholder' => 'John Doe', + + 'address_replyto' => 'Reply To address', + 'address_replyto_comment' => 'Reply to mail will be send to this address.', + + 'subject' => 'Email subject', + 'subject_comment' => 'Set only if you want other than defined in Settings > Mail templates.', + + 'template' => 'Email template', + 'template_comment' => 'Code of email template created in Settings > Email templates. Left empty for default template: janvince.smallcontactform::mail.autoreply.', + + 'allow_email_queue' => 'Queueing mail', + 'allow_email_queue_comment' => 'Add email to queue instead of immediately send. You have to configure your OctoberCMS queue first!', + + 'allow_notifications' => 'Allow notifications', + 'allow_notifications_comment' => 'Send notification after form has been sent', + + 'notification_address_to' => 'Send notification to email', + 'notification_address_to_comment' => 'One email address or comma-separated list of addresses', + 'notification_address_to_placeholder' => 'notifications@domain.com', + + 'notification_address_from_form' => 'Force notification From address (NOT SUPPORTED by all email systems!)', + 'notification_address_from_form_comment' => 'Set notification From address to an email entered in contact form (the field must be set in column mapping).', + + 'allow_autoreply' => 'Allow autoreply', + 'allow_autoreply_comment' => 'Send a form content copy to author', + + 'autoreply_name_field' => 'NAME form field', + 'autoreply_name_field_empty_option' => '-- Select --', + 'autoreply_name_field_comment' => 'Must be type of Text.
Save and refresh this page if you can\'t see your fields.', + + 'autoreply_email_field' => 'EMAIL address form field', + 'autoreply_email_field_empty_option' => '-- Select --', + 'autoreply_email_field_comment' => 'Must be type of Email.
Save and refresh this page if you can\'t see your fields.', + + 'autoreply_message_field' => 'MESSAGE form field', + 'autoreply_message_field_empty_option' => '-- Select --', + 'autoreply_message_field_comment' => 'Must be type of Textarea or Text.
Save and refresh this page if you can\'t see your fields.', + + 'notification_template' => 'Notification email template', + 'notification_template_comment' => 'Code of email template created in Settings > Email templates. Left empty for default template: janvince.smallcontactform::mail.autoreply.', + + ], + + 'antispam' => [ + 'add_antispam' => 'Add passive antispam protection', + 'add_antispam_comment' => 'Add simple but effective passive antispam control (more info in README.md file)', + + 'antispam_delay' => 'Antispam delay (s)', + 'antispam_delay_comment' => 'Delay protection for too fast form sending (usually by robots)', + 'antispam_delay_placeholder' => '3', + + 'antispam_label' => 'Antispam field label', + 'antispam_label_comment' => 'Label will be visible for non JavaScript enabled browsers', + 'antispam_label_placeholder' => 'Please clear this field', + + 'antispam_error_msg' => 'Error message', + 'antispam_error_msg_comment' => 'Message to show to user when antispam protection is triggered', + 'antispam_error_msg_placeholder' => 'Please empty this field!', + + 'antispam_delay_error_msg' => 'Delay error message', + 'antispam_delay_error_msg_comment' => 'Message to show to user when form was sent too fast', + 'antispam_delay_error_msg_placeholder' => 'Form sent too fast! Please wait few seconds and try again!', + + 'add_google_recaptcha' => 'Add Google reCaptcha', + 'add_google_recaptcha_comment' => 'Add reCaptcha to Contact Form (more info in README.md file).
You can get API keys on Google reCaptcha site.', + + 'google_recaptcha_version' => 'Google reCaptcha version', + 'google_recaptcha_version_comment' => 'Choose a version of reCaptcha widget.
More info on Google reCaptcha site.', + + 'google_recaptcha_versions' => [ + 'v2checkbox' => 'reCaptcha V2 checkbox', + 'v2invisible' => 'reCaptcha V2 invisible', + ], + + 'google_recaptcha_site_key' => 'Site key', + 'google_recaptcha_site_key_comment' => 'Put your site key', + + 'google_recaptcha_secret_key' => 'Secret key', + 'google_recaptcha_secret_key_comment' => 'Put your secret key', + + 'google_recaptcha_wrapper_css' => 'reCaptcha box wrapper CSS class', + 'google_recaptcha_wrapper_css_comment' => 'CSS class of wrapper box around reCaptcha box', + 'google_recaptcha_wrapper_css_placeholder' => 'form-group', + + 'google_recaptcha_error_msg' => 'Error message', + 'google_recaptcha_error_msg_comment' => 'Message to show to user when reCAPTCHA is not validated.', + 'google_recaptcha_error_msg_placeholder' => 'Google reCAPTCHA validation error!', + + 'google_recaptcha_scripts_allow' => 'Automatically add necessary JS scripts', + 'google_recaptcha_scripts_allow_comment' => 'This will add link to JS scripts to your site.', + + 'google_recaptcha_locale_allow' => 'Allow locale detection', + 'google_recaptcha_locale_allow_comment' => 'This will add curent web page locale to reCAPTCHA script, so it will translated.', + + 'add_ip_protection' => 'Check sender\'s IP', + 'add_ip_protection_comment' => 'Do not allow too many form submits from one IP address', + + 'add_ip_protection_count' => 'Maximum form submits during a day', + 'add_ip_protection_count_comment' => 'Number of allowed submits from one IP address during a single day', + 'add_ip_protection_count_placeholder' => '3', + + 'add_ip_protection_error_get_ip' => 'We wasn\'t able to determine your IP address!', + + 'add_ip_protection_error_too_many_submits' => 'Too many submits error message', + 'add_ip_protection_error_too_many_submits_comment' => 'Error message to show to the user', + 'add_ip_protection_error_too_many_submits_placeholder' => 'Too many form submits from one address today!', + + 'disabled_extensions' => 'Disabled extensions', + 'disabled_extensions_comment' => 'Settings set on Privacy tab disabled these extensions', + + ], + + 'mapping' => [ + + 'hint' => [ + 'title' => 'Why fields mapping?', + 'content' => ' +

You can build a custom form with own field names and types.

+

System writes all form data in database, but for quick overview Name, Email and Message columns are visible separately in Messages list.

+

So you have to help system to identify these columns by mapping to your form fields.

+

These mappings are also used for autoreply emails where at least Email field mapping is important.

+ ', + ], + + 'warning' => [ + 'title' => 'Can\'t select your form fields?', + 'content' => ' +

If you don\'t see your form fields, click on button Save at the bottom of this page and then reload page (F5 or Ctr+R / Cmd+R).

+ ', + ], + + ], + + 'privacy' => [ + 'disable_messages_saving' => 'Disable messages saving', + 'disable_messages_saving_comment' => 'When checked, no data will saved in Messages list.
This will also disable IP protection!', + 'disable_messages_saving_comment_section' => '

Be sure to allow notification emails or you will have no data from sent forms!

', + ], + + 'tabs' => [ + 'form' => 'Form', + 'buttons' => 'Send button', + 'form_fields' => 'Fields', + 'mapping' => 'Columns mapping', + 'email' => 'Email', + 'antispam' => 'Antispam', + 'privacy' => 'Privacy', + 'ga' => 'Google Analytics', + ], + + ], + + 'components' => [ + + 'groups' => [ + + 'hacks' => 'Hacks', + 'override_form' => 'Override form settings', + 'override_notifications' => 'Override notification settings', + 'override_autoreply' => 'Override autoreply settings', + 'override' => 'Override form settings', + 'override_redirect' => 'Override redirect settings', + 'override_ga' => 'Override Google Analytics settings', + ], + + 'properties' => [ + + 'form_description' => 'Form description', + 'form_description_comment' => 'You can add optional form description, that will be saved with other sent data in the messages list. You can also use {{ :slug }} here.', + + 'disable_fields' => 'Disable fields', + 'disable_fields_comment' => 'This will disable listed fields. Add field names separated by pipe (eg. name|message|phone)', + + 'send_btn_label' => 'Send button label', + 'send_btn_label_comment' => 'Override send button label', + + 'form_success_msg' => 'Success message', + 'form_success_msg_comment' => 'Override success message shown after successful sent', + + 'form_error_msg' => 'Error message', + 'form_error_msg_comment' => 'Override error message shown after unsuccessful sent', + + 'disable_notifications' => 'Disable notification', + 'disable_notifications_comment' => 'This will disable notification emails (overrides form settings)', + + 'notification_address_to' => 'Address TO', + 'notification_address_to_comment' => 'This will override email address where notification email will be sent (if enabled in form settings)', + + 'notification_address_from' => 'Address FROM', + 'notification_address_from_comment' => 'This will override email address from where notification email will be sent', + + 'notification_address_from_name' => 'Address FROM name', + 'notification_address_from_name_comment' => 'This will override email address name from where notification email will be sent', + + 'notification_template' => 'Notification template', + 'notification_template_comment' => 'This will override notification email template (eg. janvince.smallcontactform::mail.notification)', + + 'notification_subject' => 'Notification subject', + 'notification_template_comment' => 'Override email subject', + + 'disable_autoreply' => 'Disable notification', + 'disable_autoreply_comment' => 'This will disable notification emails (overrides form settings)', + + 'autoreply_address_from' => 'Address FROM', + 'autoreply_address_from_comment' => 'This will override email address in autoreply email (if enabled in form settings)', + + 'autoreply_address_from_name' => 'Address (FROM) name', + 'autoreply_address_from_name_comment' => 'This will override email address name in autoreply email (if enabled in form settings)', + + 'autoreply_address_replyto' => 'Address REPLY TO', + 'autoreply_address_replyto_comment' => 'This will override REPLY TO email address in autoreply email (if enabled in form settings)', + + 'autoreply_template' => 'Autoreply template', + 'autoreply_template_comment' => 'This will override autoreply email template (eg. janvince.smallcontactform::mail.autoreply)', + + 'autoreply_subject' => 'Autoreply email subject', + 'autoreply_template_comment' => 'Override email subject', + + ] + + ], + +]; diff --git a/plugins/janvince/smallcontactform/lang/fr/lang.php b/plugins/janvince/smallcontactform/lang/fr/lang.php new file mode 100644 index 000000000..87ed6f534 --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/fr/lang.php @@ -0,0 +1,426 @@ + [ + 'name' => 'Formulaire de contact', + 'description' => 'Générateur simple de formulaire de contact', + 'category' => 'Petits plugins', + ], + + 'permissions' => [ + 'access_messages' => 'Accéder à la liste des messages', + 'access_settings' => 'Gérer les préférences d\'administration', + 'delete_messages' => 'Supprimer les messages stockés', + 'export_messages' => 'Exporter des messages', + ], + + 'navigation' => [ + 'main_label' => 'Formulaire de contact', + 'messages' => 'Messages', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Formulaire de contact', + 'description' => 'Insérer un formulaire de contact sur la page', + 'no_fields' => 'Veuillez ajouter d\’abord des champs de formulaire dans l\’administration dorsale (dans Paramètres > Formulaire de contact > Champs) ...', + ], + + 'filter' => [ + 'date' => 'Plage de dates', + ], + + 'scoreboard' => [ + 'records_count' => 'Messages', + 'latest_record' => 'Dernier message de', + 'new_count' => 'Nouveau', + 'new_description' => 'Messages', + 'read_count' => 'Lus', + 'all_count' => 'Total', + 'all_description' => 'Messages', + 'settings_btn' => 'Paramètres du formulaire', + 'mark_read' => 'Marquer comme lu', + 'mark_read_confirm' => 'Voulez-vous vraiment définir les messages sélectionnés comme lus?', + 'mark_read_success' => 'Les messages ont été marqués comme lu avec succès.', + ], + + 'preview' => [ + 'record_not_found' => 'Message non trouvé!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'id' => 'ID', + 'datetime' => 'Date et heure', + 'form_data' => 'Données du formulaire', + 'name' => 'Nom', + 'email' => 'E-mail', + 'message' => 'Message', + 'new_message' => 'Statut', + 'new' => 'Nouveau', + 'read' => 'Lu', + 'remote_ip' => 'IP de l\'expéditeur', + 'form_alias' => 'Alias', + 'form_description' => 'Description', + 'created_at' => 'Créé à', + 'updated_at' => 'Modifié à', + ] + + ], + + + ], + + 'controllers' => [ + + 'messages' => [ + + 'list_title' => 'Messages', + 'preview' => 'Aperçu', + 'preview_title' => 'Message du formulaire de contact', + 'preview_date' => 'Date : ', + 'preview_content_title' => 'Contenu :', + 'remote_ip' => 'Envoyé depuis l\'IP :', + 'export' => 'Exporter', + ], + + 'index' => [ + 'unauthorized' => 'Accès non autorisé', + ], + + ], + + 'mail' => [ + + 'templates' => [ + + 'autoreply' => 'Réponse automatique du formulaire (français)', + 'autoreply_cs' => 'Réponse automatique du formulaire (tchèque)', + + 'notification' => 'Message de notification du formulaire (français)', + 'notification_cs' => 'Message de notification du formulaire (tchèque)', + + ] + + ], + + 'reportwidget' => [ + + 'partials' => [ + + 'messages' => [ + 'label' => 'Formulaire de contact - Statistiques des messages', + 'title' => 'Statistiques des messages', + 'messages_all' => 'Tout', + 'messages_new' => 'Nouveaux', + 'messages_read' => 'Lus', + ], + + 'new_message' => [ + 'label' => 'Formulaire de contact - Nouveaux messages', + 'title' => 'Nouveaux messages', + 'link_text' => 'Cliquez pour afficher la liste des messages', + ], + + ], + + ], + + 'settings' => [ + + 'form' => [ + + 'css_class' => 'Classe CSS du formulaire', + + 'use_placeholders' => 'Utiliser des "placeholder"', + 'use_placeholders_comment' => 'Des "placeholder" seront affichés à la plage des étiquettes de champs.', + + 'disable_browser_validation' => 'Désactiver la validation du navigateur', + 'disable_browser_validation_comment' => 'Ne pas autoriser la validation intégrée du navigateur et ses fenêtres contextuelles.', + + 'success_msg' => 'Message de réussite du formulaire', + 'success_msg_placeholder' => 'Vos données ont été envoyées.', + + 'error_msg' => 'Message d\'erreur du formulaire', + 'error_msg_placeholder' => 'Une erreur s\'est produite lors de l\'envoi de vos données!', + + 'allow_ajax' => 'Activer AJAX', + 'allow_ajax_comment' => 'Autoriser AJAX avec rechange pour les navigateurs sans JavaScript.', + + 'allow_confirm_msg' => 'Demander une confirmation avant l\'envoi du formulaire', + 'allow_confirm_msg_comment' => 'Ajouter une boîte de dialogue de confirmation avant l\'envoi', + + 'send_confirm_msg' => 'Texte de confirmation', + 'send_confirm_msg_placeholder' => 'Êtes-vous sûr?', + + 'hide_after_success' => 'Masquer le formulaire après l\'envoi réussi', + 'hide_after_success_comment' => 'Afficher uniquement le message de réussite sans formulaire', + + 'add_assets' => 'Ajouter des assets', + 'add_assets_comment' => 'Ajouter automatiquement les assets CSS et JS nécessaires (plus d\'informations sur les assets dans le fichier README.md - en anglais)', + + 'add_css_assets' => 'Ajouter des assets CSS', + 'add_css_assets_comment' => 'Tous les styles nécessaires seront inclus', + + 'add_js_assets' => 'Ajouter des assets JavaScript', + 'add_js_assets_comment' => 'Tous les scripts JavaScript nécessaires seront inclus', + + + ], + + 'buttons' => [ + 'send_btn_text' => 'Texte du bouton envoyer', + 'send_btn_text_placeholder' => 'Envoyer', + + 'send_btn_css_class' => 'Classe(s) CSS du bouton envoyer', + 'send_btn_css_class_placeholder' => 'btn btn-primary', + + 'send_btn_wrapper_css' => 'Classe(s) CSS du wrapper du bouton envoyer', + 'send_btn_wrapper_css_placeholder' => 'form-group', + + ], + + 'redirect' => [ + + 'allow_redirect' => 'Rediriger après soumission', + 'allow_redirect_comment' => 'Rediriger vers une autre page après un envoie réussie', + + 'redirect_url' => 'URL de la page vers laquelle rediriger', + 'redirect_url_comment' => 'Entrez l\'URL de votre page (par exemple, /contact/thank-you)', + 'redirect_url_placeholder' => '/contact/thank-you', + + 'redirect_url_external' => 'URL externe', + 'redirect_url_external_comment' => 'Ceci est un chemin d\'URL externe (ex. http://www.domain.com)', + + ], + + 'form_fields' => [ + 'prompt' => 'Ajouter un nouveau champ de formulaire', + + 'name' => 'Nom du champ', + 'name_comment' => 'Minuscules sans caractères spéciaux (ex. nom, email, adresse_personnelle, ...)', + + 'type' => 'Type de champ', + + 'label' => 'Étiquette', + 'label_placeholder' => 'Nom complet', + + 'field_styling' => 'Classe CSS personnalisée', + 'field_styling_comment' => 'Changer les styles de Bootstrap par défaut', + + 'autofocus' => 'Champ autofocus', + 'autofocus_comment' => 'Autofocus ce champ du formulaire', + + 'wrapper_css' => 'Classe CSS du wrapper', + 'wrapper_css_placeholder' => 'form-group', + + 'field_css' => 'Classe CSS du champ', + 'field_css_placeholder' => 'form-control', + + 'label_css' => 'Classe CSS de l\'étiquette', + 'label_css_placeholder' => '', + + 'field_validation' => 'Validation du champ', + 'field_validation_comment' => 'Ajouter des règles de validation du champ', + + 'validation' => 'Validation', + 'validation_prompt' => 'Ajouter une validation', + + 'validation_type' => 'Règle de validation', + + 'validation_error' => 'Message d\'erreur de validation', + 'validation_error_placeholder' => 'S\'il vous plaît entrer des données valides.', + 'validation_error_comment' => 'Message d\'erreur à utiliser lorsque la validation échoue', + + 'custom' => 'Champ personnalisé', + 'custom_description' => 'Champ personnalisé avec option de validation', + + + ], + + 'form_field_types' => [ + 'text' => 'Texte', + 'email' => 'Email', + 'textarea' => 'Aire de texte', + 'checkbox' => 'Case à cocher', + 'dropdown' => 'Dropdown', + 'file' => 'File', + 'custom_code' => 'Custom code', + 'custom_content' => 'Custom content', + ], + + 'form_field_validation' => [ + 'select' => '--- Sélectionnez la validation ---', + 'required' => 'Requis', + 'email' => 'Email', + 'numeric' => 'Numérique', + ], + + 'email' => [ + 'address_from' => 'Adresse de l\'expéditeur', + 'address_from_placeholder' => 'john.doe@domain.com', + + 'address_from_name' => 'Nom de l\'expéditeur', + 'address_from_name_placeholder' => 'John Doe', + + 'subject' => 'Sujet de l\'e-mail', + 'subject_comment' => 'Définissez uniquement si vous souhaitez une définition autre que celle définie dans Paramètres > Modèles des e-mails.', + + 'template' => 'Modèle e-mail', + 'template_comment' => 'Code du modèle e-mail créé dans Paramètres > Modèles des e-mails. Laissez vide pour le modèle par défaut: janvince.smallcontactform::mail.autoreply.', + + 'allow_email_queue' => 'E-mail en fille d\'attente', + 'allow_email_queue_comment' => 'Ajouter un email à la file d\'attente au lieu de l\'envoyer immédiatement. Vous devez d\'abord configurer votre file d\'attente OctoberCMS!', + + 'allow_notifications' => 'Autoriser les notifications', + 'allow_notifications_comment' => 'Envoyer une notification après l\'envoi du formulaire', + + 'notification_address_to' => 'Envoyer une notification à l\'e-mail', + 'notification_address_to_comment' => 'Une adresse électronique ou une liste d\'adresses séparées par des virgules', + 'notification_address_to_placeholder' => 'notifications@domain.com', + + 'notification_address_from_form' => 'Forcer l\'adresse e-mail de la notification (NON PRIS EN CHARGE par tous les systèmes de messagerie!)', + 'notification_address_from_form_comment' => 'Définir l\'adresse e-mail entré dans le formulaire de contact comme adresse de l\'expéditeur (le champ doit être défini dans le mappage de colonnes).', + + 'allow_autoreply' => 'Autoriser une copie à l\'auteur', + 'allow_autoreply_comment' => 'Envoyer une copie du contenu du formulaire à l\'auteur', + + 'autoreply_name_field' => 'Champ du formulaire avec le NOM', + 'autoreply_name_field_empty_option' => '-- Sélectionnez --', + 'autoreply_name_field_comment' => 'Doit être du type Texte.
Enregistrez et actualisez cette page si vous ne pouvez pas voir vos champs.', + + 'autoreply_email_field' => 'Champ du formulaire avec l\'adresse E-MAIL', + 'autoreply_email_field_empty_option' => '-- Sélectionnez --', + 'autoreply_email_field_comment' => 'Doit être du type email.
Enregistrez et actualisez cette page si vous ne pouvez pas voir vos champs.', + + 'autoreply_message_field' => 'Champ du formulaire avec le contenu du MESSAGE', + 'autoreply_message_field_empty_option' => '-- Sélectionnez --', + 'autoreply_message_field_comment' => 'Doit être du type Aire de texte ou Texte.
Enregistrez et actualisez cette page si vous ne pouvez pas voir vos champs.', + + 'notification_template' => 'Modèle e-mail de la notification', + 'notification_template_comment' => 'Code du modèle de courrier électronique créé dans Paramètres > Modèless des e-mails. Laisser vide pour le modèle par défaut : janvince.smallcontactform::mail.autoreply.', + + ], + + 'antispam' => [ + 'add_antispam' => 'Ajouter une protection antispam passive', + 'add_antispam_comment' => 'Ajouter un contrôle antispam passif simple mais efficace (plus d’informations dans le fichier README.md - en anglais)', + + 'antispam_delay' => 'Délai Antispam (en secondes)', + 'antispam_delay_comment' => 'Protection différée pour l\'envoi de formulaires trop rapide (généralement par des robots)', + 'antispam_delay_placeholder' => '3', + + 'antispam_label' => 'Étiquette de champ antispam', + 'antispam_label_comment' => 'L\'étiquette sera visible pour les navigateurs non activés par JavaScript', + 'antispam_label_placeholder' => 'Veuillez effacer ce champ', + + 'antispam_error_msg' => 'Message d\'erreur', + 'antispam_error_msg_comment' => 'Message à afficher à l\'utilisateur lorsque la protection antispam est déclenchée', + 'antispam_error_msg_placeholder' => 'Veuillez vider ce champ!', + + 'antispam_delay_error_msg' => 'Message d\'erreur de délai', + 'antispam_delay_error_msg_comment' => 'Message à montrer à l\'utilisateur lorsque le formulaire a été envoyé trop rapidement', + 'antispam_delay_error_msg_placeholder' => 'Formulaire envoyé trop vite! S\'il vous plaît attendre quelques secondes et essayez à nouveau!', + + 'add_google_recaptcha' => 'Ajouter Google reCaptcha', + 'add_google_recaptcha_comment' => 'Ajoutez reCaptcha au formulaire de contact (plus d\’informations dans le fichier README.md - en anglais).
Vous pouvez obtenir les clés d’API sur le Google reCaptcha.', + + 'google_recaptcha_site_key' => 'Clé du site', + 'google_recaptcha_site_key_comment' => 'Mettez votre clé du site', + + 'google_recaptcha_secret_key' => 'Clé secrète', + 'google_recaptcha_secret_key_comment' => 'Mettez votre clé secrète', + + 'google_recaptcha_error_msg' => 'Message d\'erreur', + 'google_recaptcha_error_msg_comment' => 'Message à afficher à l\'utilisateur lorsque le reCAPTCHA n\'est pas validé.', + 'google_recaptcha_error_msg_placeholder' => 'Erreur de validation du reCAPTCHA de Google!', + + 'google_recaptcha_scripts_allow' => 'Ajouter automatiquement les scripts JS nécessaires', + 'google_recaptcha_scripts_allow_comment' => 'Cela ajoutera un lien vers les scripts JS sur votre site.', + + 'google_recaptcha_locale_allow' => 'Autoriser la détection des paramètres de langues', + 'google_recaptcha_locale_allow_comment' => 'Cela ajoutera les paramètres de langues actuels de la page Web au script reCAPTCHA, de sorte qu\'il sera traduit.', + + 'add_ip_protection' => 'Vérifier l\'adresse IP de l\'expéditeur', + 'add_ip_protection_comment' => 'Ne pas autoriser trop de formulaires soumis à partir d\'une même adresse IP', + + 'add_ip_protection_count' => 'Formulaire maximum soumis au cours d\'une journée', + 'add_ip_protection_count_comment' => 'Nombre de soumissions autorisées à partir d\'une même adresse IP au cours d\'une seule journée', + 'add_ip_protection_count_placeholder' => '3', + + 'add_ip_protection_error_get_ip' => 'Nous n\'avons pas pu déterminer votre adresse IP!', + + 'add_ip_protection_error_too_many_submits' => 'Message d\'erreur lorsque trop de messages sont envoyés', + 'add_ip_protection_error_too_many_submits_comment' => 'Message d\'erreur à montrer à l\'utilisateur', + 'add_ip_protection_error_too_many_submits_placeholder' => 'Trop de messages ont été envoyés par votre adresse aujourd\'hui!', + + 'disabled_extensions' => 'Extensions désactivées', + 'disabled_extensions_comment' => 'Les paramètres définis dans l\'onglet Confidentialité ont désactivé ces extensions.', + + ], + + 'mapping' => [ + + 'hint' => [ + 'title' => 'Pourquoi le mappage des champs?', + 'content' => ' +

Vous pouvez créer un formulaire personnalisé avec vos propres noms et types de champs.

+

Le système écrit toutes les données de formulaire dans la base de données, mais pour une présentation rapide, les colonnes Nom, E-mail et Message sont visibles séparément dans la listedes messages.

+

Vous devez donc aider le système à identifier ces colonnes en les associant à vos champs de formulaire.

+

Ces mappages sont également utilisés pour les e-mails à réponse automatique dans lesquels au moins le mappage du champ e-mail est important.

+ ', + ], + + 'warning' => [ + 'title' => 'Vous ne pouvez pas sélectionner vos champs de formulaire?', + 'content' => ' +

Si vous ne voyez pas vos champs de formulaire, cliquez sur le bouton Enregistrer en bas de cette page, puis rechargez la page (F5 ou Ctrl+R / Cmd+R).

+ ', + ], + + ], + + 'privacy' => [ + 'disable_messages_saving' => 'Désactiver l\'enregistrement des messages', + 'disable_messages_saving_comment' => 'Lorsque cette case est cochée, aucune donnée ne sera enregistrée dans la liste de messages.
La protection IP sera également désactivée!', + 'disable_messages_saving_comment_section' => '

Assurez-vous d\'autoriser les courriels de notification, sinon vous ne recevrez aucune donnée des formulaires envoyés!

', + ], + + 'tabs' => [ + 'form' => 'Formulaire', + 'buttons' => 'Bouton envoyer', + 'form_fields' => 'Champs', + 'mapping' => 'Mappage des colonnes', + 'email' => 'E-mail', + 'antispam' => 'Antispam', + 'privacy' => 'Confidentialité' + ], + + ], + + 'components' => [ + + 'groups' => [ + + 'hacks' => 'Hacks', + + ], + 'properties' => [ + + 'disable_notifications' => 'Désactiver les e-mails de notification', + 'disable_notifications_comment' => 'Ceci désactivera les courriels de notification (remplace les paramètres du formulaire)', + + 'form_description' => 'Description du formulaire', + 'form_description_comment' => 'Vous pouvez ajouter une description de formulaire facultative, qui sera enregistrée avec les autres données envoyées dans la liste de messages. Vous pouvez également utiliser {{:slug}} ici.', + + ] + + ], + +]; diff --git a/plugins/janvince/smallcontactform/lang/hu/lang.php b/plugins/janvince/smallcontactform/lang/hu/lang.php new file mode 100644 index 000000000..1275a6bae --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/hu/lang.php @@ -0,0 +1,146 @@ + [ + 'name' => 'Kapcsolat űrlap', + 'description' => 'Űrlap generálása kapcsolat felvételhez.', + 'category' => 'Small plugins', + ], + + 'permissions' => [ + 'access_messages' => 'Üzenetek megtekintése', + 'access_settings' => 'Beállítások módosítása', + 'delete_messages' => 'Üzenetek törlése', + 'export_messages' => 'Üzenetek exportálása', + ], + + 'navigation' => [ + 'main_label' => 'Kapcsolat űrlap', + 'messages' => 'Üzenetek', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Kapcsolat űrlap', + 'description' => 'Űrlap generálása kapcsolat felvételhez.', + 'no_fields' => 'Elsőként hozzon létre legalább egy mezőt itt: Beállítások > Small plugins > Kapcsolat űrlap > Fields', + ], + + 'filter' => [ + 'date' => 'Időintervallum', + ], + + 'scoreboard' => [ + 'records_count' => 'Üzenetek', + 'latest_record' => 'Legutóbbi', + 'new_count' => 'Új levél', + 'new_description' => 'üzenet', + 'read_count' => 'Olvasott', + 'all_count' => 'Összes', + 'all_description' => 'üzenet', + 'settings_btn' => 'Testreszabás', + 'mark_read' => 'Olvasottnak jelöl', + 'mark_read_confirm' => 'Valóban olvasottnak szeretné jelölni az üzeneteket?', + 'mark_read_success' => 'Az üzenetek sikeresen olvasottnak lettek jelölve.', + ], + + 'preview' => [ + 'record_not_found' => 'Üzenet nem található!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'id' => 'ID', + 'datetime' => 'Elküldve', + 'form_data' => 'Adatok', + 'name' => 'Név', + 'email' => 'Email', + 'message' => 'Üzenet', + 'new_message' => 'Státusz', + 'new' => 'Új levél', + 'read' => 'Olvasott', + 'remote_ip' => 'IP cím', + 'form_alias' => 'Űrlap', + 'form_description' => 'Leírás', + 'created_at' => 'Létrehozva', + 'updated_at' => 'Módosítva', + ], + + ], + + ], + + 'controllers' => [ + + 'messages' => [ + 'list_title' => 'Üzenetek', + 'preview' => 'Előnézet', + 'preview_title' => 'Üzenet', + 'preview_date' => 'Elküldve:', + 'preview_content_title' => 'Tartalom:', + 'remote_ip' => 'IP cím', + 'export' => 'Exportálás', + ], + + 'index' => [ + 'unauthorized' => 'Illetéktelen hozzáférés', + ], + + ], + + 'mail' => [ + + 'templates' => [ + + 'autoreply' => 'Automatikus üzenet (angol)', + 'autoreply_cs' => 'Automatikus üzenet (cseh)', + + 'notification' => 'Értesítő üzenet (angol)', + 'notification_cs' => 'Értesítő üzenet (cseh)', + ] + + ], + + 'reportwidget' => [ + + 'partials' => [ + 'messages' => [ + 'label' => 'Kapcsolat űrlap - Statisztika', + 'title' => 'Üzenet statisztika', + 'messages_all' => 'Összes', + 'messages_new' => 'Új levél', + 'messages_read' => 'Olvasott', + ], + + 'new_message' => [ + 'label' => 'Kapcsolat űrlap - Új üzenetek', + 'title' => 'Új üzenetek', + 'link_text' => 'Összes üzenet megtekintése', + ], + + ], + + ], + + 'components' => [ + + 'groups' => [ + 'hacks' => 'Hackelés', + ], + + 'properties' => [ + 'disable_notifications' => 'Értesítő e-mailek letiltása', + 'disable_notifications_comment' => 'Felül fogja írni az űrlap központi beállítását erre vonatkozóan.', + 'form_description' => 'Űrlap leírás', + 'form_description_comment' => 'Amennyiben megad adatot, azok mentésre kerülnek az űrlap beküldésekor. Például az aktuális oldal címének megjegyzéséhez használhatja a {{ :slug }} kódot.', + ], + + ], + +]; diff --git a/plugins/janvince/smallcontactform/lang/pl/janvince/smallcontactform/lang.php b/plugins/janvince/smallcontactform/lang/pl/janvince/smallcontactform/lang.php new file mode 100644 index 000000000..78b522210 --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/pl/janvince/smallcontactform/lang.php @@ -0,0 +1,436 @@ + [ + 'name' => 'Formularz kontaktowy', + 'description' => 'Kreator prostego formularza kontaktowego', + 'category' => 'Small plugins', + ], + + 'permissions' => [ + 'access_messages' => 'Przeglądaj wiadomości', + 'access_settings' => 'Zarządzaj ustawieniami', + 'delete_messages' => 'Usuwaj zapisane wiadomości', + 'export_messages' => 'Eksportuj wiadomości', + ], + + 'navigation' => [ + 'main_label' => 'Formularz kontaktowy', + 'messages' => 'Wiadomości', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Formularz kontaktowy', + 'description' => 'Dodaj formularz kontaktowy do strony', + 'no_fields' => 'Najpierw dodaj pola formularza w panelu administracyjnym (Ustawienia -> Small plugins -> Formularz kontktowy)...', + ], + + 'filter' => [ + 'date' => 'Zakres dat', + ], + + 'scoreboard' => [ + 'records_count' => 'Wiadomości', + 'latest_record' => 'Ostatnia wiadomość od', + 'new_count' => 'Nowe', + 'new_description' => 'Wiadomości', + 'read_count' => 'Przeczytane', + 'all_count' => 'Wszystkie', + 'all_description' => 'Wiadomości', + 'settings_btn' => 'Ustawienia formularza', + 'mark_read' => 'Oznacz jako przeczytane', + 'mark_read_confirm' => 'Czy na pewno oznaczyć wybrane wiadomości jako przeczytane?', + 'mark_read_success' => 'Oznaczono jako przeczytane.', + ], + + 'preview' => [ + 'record_not_found' => 'Nie znaleziono wiadomości!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'id' => 'ID', + 'datetime' => 'Data i godzina', + 'form_data' => 'Dane formularza', + 'name' => 'Imię i nazwisko', + 'email' => 'Email', + 'message' => 'Wiadomość', + 'new_message' => 'Status', + 'new' => 'Nowa', + 'read' => 'Przeczytana', + 'remote_ip' => 'Adres IP wysyłającego', + 'form_alias' => 'Alias', + 'form_description' => 'Opis', + 'created_at' => 'Utworzono', + 'updated_at' => 'Zaktualizowano', + ] + + ], + + + ], + + 'controllers' => [ + + 'messages' => [ + + 'list_title' => 'Wiadomości', + 'preview' => 'Podgląd', + 'preview_title' => 'Wiadomość z formularza kontaktowego', + 'preview_date' => 'Data otrzymania:', + 'preview_content_title' => 'Zawartość:', + 'remote_ip' => 'Wysłano z adresu IP', + 'export' => 'Eksportuj', + ], + + 'index' => [ + 'unauthorized' => 'Nie masz uprawnień aby wyświetlić tą stroną', + ], + + ], + + 'mail' => [ + + 'templates' => [ + + 'autoreply' => 'Wiadomość automatycznej odpowiedzi (Angielski)', + 'autoreply_cs' => 'Wiadomość automatycznej odpowiedzi (Czeski)', + + 'notification' => 'Wiadomość powiadamiająca (Angielski)', + 'notification_cs' => 'Wiadomość powiadamiająca (Czeski)', + + ] + + ], + + 'reportwidget' => [ + + 'partials' => [ + + 'messages' => [ + 'label' => 'Formularz kontaktowy - Statystyki wiadomości', + 'title' => 'Statystyki wiadomości', + 'messages_all' => 'Wszystkie', + 'messages_new' => 'Nowe', + 'messages_read' => 'Przeczytane', + ], + + 'new_message' => [ + 'label' => 'Formularz Kontaktowy - Nowe wiadomości', + 'title' => 'Nowe wiadomości', + 'link_text' => 'Kliknij, aby pokazać listę wiadomości', + ], + + ], + + ], + + 'settings' => [ + + 'form' => [ + 'css_class' => 'Klasa CSS formularza', + + 'use_placeholders' => 'Użyj tekstów zastępczych (Placeholder)', + 'use_placeholders_comment' => 'Teksty zastępcze będą wyświetlane zamiast etykiet pól. (Etykiety otrzymają styl display: none)', + + 'disable_browser_validation' => 'Wyłącz domyślną walidację przeglądarki', + 'disable_browser_validation_comment' => 'Nie zezwalaj na wbudowane w przeglądarkę sprawdzanie poprawności i wyskakujące okienka.', + + 'success_msg' => 'Wiadomość o poprawnym wysłaniu formularza', + 'success_msg_placeholder' => 'Twoja wiadomość została wysłana.', + + 'error_msg' => 'Wiadomość o niepoprawnym wysłaniu formularza', + 'error_msg_placeholder' => 'Wystąpił błąd podczas wysyłania Twojej wiadomości!', + + 'allow_ajax' => 'Włącz AJAX', + 'allow_ajax_comment' => 'Zezwól na asynchroniczny formularz AJAX razem ze wsparciem dla przeglądarek nieobsługujących JavaScript.', + + 'allow_confirm_msg' => 'Zapytaj o potwierdzenie przed wysłaniem formularza', + 'allow_confirm_msg_comment' => 'Dodaje okno dialogowe potwierdzenia przed wysłaniem', + + 'send_confirm_msg' => 'Tekst potwierdzenia', + 'send_confirm_msg_placeholder' => 'Czy jesteś pewny?', + + 'hide_after_success' => 'Ukryj formularz po pomyślnym wysłaniu', + 'hide_after_success_comment' => 'Pokaż tylko wiadomość o pomyślnym wysłaniu wiadomości bez formularza', + + 'add_assets' => 'Dodaj pliki', + 'add_assets_comment' => 'Automatycznie dodaje niezbędne pliki CSS i JS (więcej na ten temat w pliku README.md)', + + 'add_css_assets' => 'Dodaj pliki CSS', + 'add_css_assets_comment' => 'Dodaje wszystkie niezbędne pliki CSS', + + 'add_js_assets' => 'Dodaj pliki JS', + 'add_js_assets_comment' => 'Dodaje wszystkie niezbędne pliki JS', + ], + + 'buttons' => [ + 'send_btn_text' => 'Tekst przycisku wyślij', + 'send_btn_text_placeholder' => 'Wyślij', + + 'send_btn_css_class' => 'Klasa CSS przycisku wyślij', + 'send_btn_css_class_placeholder' => 'btn btn-primary', + + 'send_btn_wrapper_css' => 'Klasa CSS kontenera przycisku wyślij', + 'send_btn_wrapper_css_placeholder' => 'form-group', + ], + + 'redirect' => [ + + 'allow_redirect' => 'Przekieruj po wysłaniu', + 'allow_redirect_comment' => 'Przekierowuje na inną stronę po wysłaniu formularza', + + 'redirect_url' => 'Adres URL strony przekierowania', + 'redirect_url_comment' => 'Wprowadź adres URL strony (np. /contact/thank-you)', + 'redirect_url_placeholder' => '/contact/thank-you', + + 'redirect_url_external' => 'Zewnętrzny adres URL', + 'redirect_url_external_comment' => 'Ten adres URL wskazuje na zewnętrzną domenę (np. http://www.domain.com)', + + ], + + 'form_fields' => [ + 'prompt' => 'Dodaj nowe pole formularza', + + 'name' => 'NAZWA POLA', + 'name_comment' => 'Małe litery bez znaków specjalnych (np. name, email, home_address, ...)', + + 'type' => 'Rodzaj pola', + + 'label' => 'Etykieta', + 'label_placeholder' => 'Imię i nazwisko', + + 'field_styling' => 'Niestandardowa klasa CSS', + 'field_styling_comment' => 'Zmień domyślne style (Bootstrap)', + + 'autofocus' => 'Automatyczny fokus', + 'autofocus_comment' => 'Automatycznie ustaw fokus na to pole', + + 'wrapper_css' => 'Klasa CSS kontenera', + 'wrapper_css_placeholder' => 'form-group', + + 'field_css' => 'Klasa CSS pola', + 'field_css_placeholder' => 'form-control', + + 'label_css' => 'Klasa CSS etykiety', + 'label_css_placeholder' => 'control-label', + + 'field_validation' => 'Walidacja', + 'field_validation_comment' => 'Dodaj reguły walidacji', + + 'validation' => 'Walidacja', + 'validation_prompt' => 'Dodaj regułę walidacji', + + 'validation_type' => 'Reguła walidacji', + + 'validation_error' => 'Komunikat błędu walidacji', + 'validation_error_placeholder' => 'Wprowadź poprawne dane.', + 'validation_error_comment' => 'Komunikat wyświetlany, gdy pole nie przejdzie walidacji', + + 'validation_custom_type' => 'Validation rule name', + 'validation_custom_type_comment' => 'Wprowadź nazwę reguły walidatora (eg. regex, boolean, ...).
See reguły walidacji.', + 'validation_custom_type_placeholder' => 'regex', + + 'validation_custom_pattern' => 'Wzorzec reguły walidacji', + 'validation_custom_pattern_comment' => 'Pozostaw puste lub wprowadź niestandardowy wzorzec reguły (prawa część reguły znajdująca się po dwukropku - np. [abc] dla reguły regex)', + 'validation_custom_pattern_placeholder' => "/^[0-9]+$/", + + 'custom' => 'Pole niestandardowe', + 'custom_description' => 'Niestandardowe pole z opcją walidacji', + + 'add_values_prompt' => 'Dodaj opcje', + 'field_value_id' => 'Identyfikator opcji', + 'field_value_content' => 'Tekst opcji', + + ], + + 'form_field_types' => [ + 'text' => 'Tekst', + 'email' => 'Email', + 'textarea' => 'Pole tekstowy', + 'checkbox' => 'Pole wyboru', + 'dropdown' => 'Lista rozwijalna', + 'file' => 'File', + 'custom_code' => 'Custom code', + 'custom_content' => 'Custom content', + ], + + 'form_field_validation' => [ + 'select' => '--- Wybierz regułę walidacji ---', + 'required' => 'Wymagane', + 'email' => 'Email', + 'numeric' => 'Numeryczne', + 'custom' => 'Reguła niestandardowa', + ], + + 'email' => [ + 'address_from' => 'Z adresu', + 'address_from_placeholder' => 'example@domain.com', + + 'address_from_name' => 'Nazwa wyświetlana w polu "Od"', + 'address_from_name_placeholder' => 'Jan Nowak', + + 'subject' => 'Temat wiadomości', + 'subject_comment' => 'Ustaw tylko wtedy, gdy chcesz aby był inny niż zdefiniowano w Ustawienia > Mail > Szablony wiadomości email', + + 'template' => 'Szablon wiadomości', + 'template_comment' => 'Kod szablonu wiadomości email utworzony w Ustawienia > Mail > Szablony wiadomości email. Pozostaw puste dla domyślnego szablonu: janvince.smallcontactform::mail.autoreply.', + + 'allow_email_queue' => 'Kolejkowanie wiadomości', + 'allow_email_queue_comment' => 'Dodawaj wiadomości do kolejki zamiast wysyłać je natychmiastowo. Pamiętaj, najpierw musisz skonfigurować kolejkę OctoberCMS!', + + 'allow_notifications' => 'Wysyłaj powiadomienia', + 'allow_notifications_comment' => 'Wyślij powiadomienie zaraz po wysłaniu formularza', + + 'notification_address_to' => 'Wyślij powiadomienie na adres/adresy', + 'notification_address_to_comment' => 'Jeden adres email, lub lista oddzielona przecinkami', + 'notification_address_to_placeholder' => 'notifications@domain.com', + + 'notification_address_from_form' => 'Wymuś zawartość pola "Od" powiadomienia (NIE WSPIERANE przez wszystkie systemy email)', + 'notification_address_from_form_comment' => 'Ustaw adres, z którego wysyłane jest powiadomienie na adres email podany w formularzu kontaktowym (pole musi być ustawione w odwzorowaniu pól).', + + 'allow_autoreply' => 'Automatyczna odpowiedź', + 'allow_autoreply_comment' => 'Wyślij kopię wiadomości do autora', + + 'autoreply_name_field' => 'Pole NAZWA', + 'autoreply_name_field_empty_option' => '-- Wybierz --', + 'autoreply_name_field_comment' => 'Musi być typu Tekst.
Zapisz i odśwież tą stronę jeśli nie widzisz pól.', + + 'autoreply_email_field' => 'Pole EMAIL', + 'autoreply_email_field_empty_option' => '-- Wybierz --', + 'autoreply_email_field_comment' => 'Musi być typu Email.
Zapisz i odśwież tą stronę jeśli nie widzisz pól.', + + 'autoreply_message_field' => 'Pole WIADOMOŚĆ', + 'autoreply_message_field_empty_option' => '-- Wybierz --', + 'autoreply_message_field_comment' => 'Musi być typu Pole tekstowe lub Tekst.
Zapisz i odśwież tą stronę jeśli nie widzisz pól.', + + 'notification_template' => 'Szablon wiadomości powiadomienia', + 'notification_template_comment' => 'Kod szablonu wiadomości email utworzony w Ustawienia > Mail > Szablony wiadomości email. Pozostaw puste dla domyślnego szablonu: janvince.smallcontactform::mail.notification.', + + ], + + 'antispam' => [ + 'add_antispam' => 'Dodaj pasywną ochronę antyspamową', + 'add_antispam_comment' => 'Dodaj prostą, ale skuteczną pasywną kontrolę antyspamową (więcej informacji w pliku README.md)', + + 'antispam_delay' => 'Opóźnienie ochrony antyspamowej (s)', + 'antispam_delay_comment' => 'Zabezpieczenia w postaci opóźnienia podczas wysyłania dużej ilości wiadomości (zwykle przez roboty)', + 'antispam_delay_placeholder' => '3', + + 'antispam_label' => 'Etykieta pola ochrony antyspamowej', + 'antispam_label_comment' => 'Etykieta będzie widoczna tylko dla przeglądarek, które nie obsługują JavaScript', + 'antispam_label_placeholder' => 'Wyczyść to pole w celu wysłania wiadomości', + + 'antispam_error_msg' => 'Komunikat o błędzie - ochrona antyspamowa', + 'antispam_error_msg_comment' => 'Komunikat, który zostanie wyświetlony, gdy uruchomi się ochrona antyspamowa', + 'antispam_error_msg_placeholder' => 'Musisz wyczyścić to pole, aby wysłać wiadomość!', + + 'antispam_delay_error_msg' => 'Komunikat o błędzie - opóźnienie', + 'antispam_delay_error_msg_comment' => 'Komunikat, który zostanie wyświetlony, gdy użytkownik wyśle wiadomość zbyt szybko', + 'antispam_delay_error_msg_placeholder' => 'Wiadomość wysłana zbyt szybko! Poczekaj chwilę, a następnie spróbuj ponownie.', + + 'add_google_recaptcha' => 'Dodaj Google reCaptcha', + 'add_google_recaptcha_comment' => 'Dodaj reCaptcha do formularza kontaktowego (więcej informacji w pliku README.md).
Możesz uzyskać klucze API na stronie Google reCaptcha.', + + 'google_recaptcha_site_key' => 'Klucz strony', + 'google_recaptcha_site_key_comment' => 'Wpisz swój kod strony', + + 'google_recaptcha_secret_key' => 'Sekretny klucz', + 'google_recaptcha_secret_key_comment' => 'Wpisz swój sekretny klucz', + + 'google_recaptcha_wrapper_css' => 'Klasa CSS kontenera reCaptcha', + 'google_recaptcha_wrapper_css_comment' => 'Klasa CSS kontenera wokół pola reCaptcha', + 'google_recaptcha_wrapper_css_placeholder' => 'form-group', + + 'google_recaptcha_error_msg' => 'Komunikat błędu', + 'google_recaptcha_error_msg_comment' => 'Komunikat, który pokaże się, gdy reCAPTCHA zwróci błąd.', + 'google_recaptcha_error_msg_placeholder' => 'Google reCAPTCHA validation error!', + + 'google_recaptcha_scripts_allow' => 'Automatycznie dodaj niezbędne skrypt JS', + 'google_recaptcha_scripts_allow_comment' => 'Dodaj skrypty JS do twojej strony', + + 'google_recaptcha_locale_allow' => 'Zezwól na wykrywanie ustawień regionalnych', + 'google_recaptcha_locale_allow_comment' => 'Spowoduje to dodanie bieżących ustawień regionalnych do skryptu reCAPTCHA, tak że będzie ona przetłumaczona.', + + 'add_ip_protection' => 'Sprawdzaj adres IP wysyłającego', + 'add_ip_protection_comment' => 'Nie zezwalaj na zbyt dużo wiadomości z jednego adresu IP', + + 'add_ip_protection_count' => 'Maksymalna liczba wiadomości na dzień', + 'add_ip_protection_count_comment' => 'Maksymalna liczba wiadomości możliwa do wysłania z jednego adresu IP na dzień', + 'add_ip_protection_count_placeholder' => '3', + + 'add_ip_protection_error_get_ip' => 'Nie udało się ustalić Twojego adresu IP', + + 'add_ip_protection_error_too_many_submits' => 'Komunikat błędu - za dużo wiadomości', + 'add_ip_protection_error_too_many_submits_comment' => 'Komunikat, który zostanie pokazany użytkownikowi', + 'add_ip_protection_error_too_many_submits_placeholder' => 'Otrzymaliśmy dzisiaj zbyt wiele wiadomości z jednego adresu IP. Spróbuj ponownie jutro.', + + 'disabled_extensions' => 'Wyłączone rozszerzenia', + 'disabled_extensions_comment' => 'Ustawienia na zakładce Prywatność wyłączyły te rozszerzenia', + + ], + + 'mapping' => [ + + 'hint' => [ + 'title' => 'Dlaczego odwzorowywanie pól?', + 'content' => ' +

Możesz zbudować niestandardowy formularz z własnymi nazwami i typami pól.

+

System zapisuje wszystkie dane formularze w bazie danych. W celu szybkiego podglądu kolumny NAZWA, EMAIL i WIADOMOŚĆ są widoczne osobno na liście wiadomości.

+

Musisz więc pomóc systemowi w identyfikacji tych kolumn poprzez odwzorowanie pól formularza.

+

Odwzorowania są również używane przez system automatycznej odpowiedzi na wiadomości, w których ważne jest przynajmniej pole EMAIL.

+ ', + ], + + 'warning' => [ + 'title' => 'Nie możesz wybrać pól?', + 'content' => '

Jeśli nie widzisz pól formularza wciśnij przycisk zapisz na dole strony a następnie odśwież stronę (F5 lub Ctrl + R / Cmd + R)

', + ], + + ], + + 'privacy' => [ + 'disable_messages_saving' => 'Wyłącz zapisywanie wiadomości', + 'disable_messages_saving_comment' => 'Żadne dane nie zostaną zapisane w liście wiadomości. To ustawienie wyłączy również ochronę na podstawie adresu IP!', + 'disable_messages_saving_comment_section' => '

Pamiętaj, aby włączyć powiadomienia email! W przeciwnym wypadku nie otrzymasz żadnych danych z formularza.

', + ], + + 'tabs' => [ + 'form' => 'Formularz', + 'buttons' => 'Przycisk wyślij', + 'form_fields' => 'Pola', + 'mapping' => 'Odwzorowanie pól', + 'email' => 'Email', + 'antispam' => 'Ochrona antyspamowa', + 'privacy' => 'Prywatność' + ], + + ], + + 'components' => [ + + 'groups' => [ + + 'hacks' => 'Hacki', + + ], + 'properties' => [ + + 'disable_notifications' => 'Wyłącz powiadomienia e-mail', + 'disable_notifications_comment' => 'Spowoduje wyłączenie powiadomień e-mail (nadpisuje ustawienia globalne)', + + 'form_description' => 'Opis formularza', + 'form_description_comment' => 'Możesz dodać opcjonalny opis formularza, który zostanie zapisany wraz z danymi wysłanymi przez formularz. Może także użyć {{ :slug }}.', + + ] + + ], + +]; diff --git a/plugins/janvince/smallcontactform/lang/ru/lang.php b/plugins/janvince/smallcontactform/lang/ru/lang.php new file mode 100644 index 000000000..8959431e1 --- /dev/null +++ b/plugins/janvince/smallcontactform/lang/ru/lang.php @@ -0,0 +1,322 @@ + [ + 'name' => 'Контактная форма', + 'description' => 'Простой конструктор контактной формы', + ], + + 'permissions' => [ + 'access_messages' => 'Доступ к списку сообщений', + 'access_settings' => 'Управление настройками бэкенд', + 'delete_messages' => 'Удалить сохраненные сообщения', + ], + + 'navigation' => [ + 'main_label' => 'Контакт форма', + 'messages' => 'Сообщения', + ], + + 'controller' => [ + + 'contact_form' => [ + 'name' => 'Контактная форма', + 'description' => 'Вставьте контактную форму на страницу', + 'no_fields' => 'Для работы плагина следует добавить поля формы в бэкенд (Настройки > Контактная форма > Поля)...', + ], + + 'filter' => [ + 'date' => 'Диапазон дат', + ], + + 'scoreboard' => [ + 'records_count' => 'Сообщения', + 'latest_record' => 'Последнее от', + 'new_count' => 'Новые', + 'new_description' => 'Сообщения', + 'read_count' => 'Прочитанные', + 'all_count' => 'Всего', + 'all_description' => 'Сообщения', + 'settings_btn' => 'Настройки формы', + 'mark_read' => 'Отметить как прочитанное', + 'mark_read_confirm' => 'Вы действительно хотите отметить выбранные сообщения как прочитанные?', + 'mark_read_success' => 'Успешно отмечено как прочитанное', + ], + + 'preview' => [ + 'record_not_found' => 'Сообщение не найдено!', + ], + + ], + + 'models' => [ + + 'message' => [ + + 'columns' => [ + 'datetime' => 'Дата и время', + 'form_data' => 'Данные формы', + 'name' => 'Имя', + 'message' => 'Сообщение', + 'new_message' => 'Статус', + 'new' => 'Новое', + 'read' => 'Прочитанное', + 'remote_ip' => 'IP отправителя', + 'form_alias' => 'Псевдоним', + 'form_description' => 'Описание', + ] + + ], + + + ], + + 'controllers' => [ + + 'messages' => [ + + 'list_title' => 'Сообщения', + 'preview' => 'Предварительный просмотр', + 'preview_title' => 'Сообщение контактной формы', + 'preview_date' => 'От даты:', + 'preview_content_title' => 'Содержание:', + 'remote_ip' => 'Отправлено с IP', + + ], + + 'index' => [ + 'unauthorized' => 'Несанкционированный доступ', + ], + + ], + + 'reportwidget' => [ + + 'partials' => [ + + 'messages' => [ + 'label' => 'Контактная форма - Статистика сообщений', + 'title' => 'Статистика сообщений', + 'messages_all' => 'Все', + 'messages_new' => 'Новые', + 'messages_read' => 'Прочитанные', + ], + + 'new_message' => [ + 'label' => 'Контактная форма - Новое сообщение', + 'title' => 'Новое сообщение', + 'link_text' => 'Нажмите, чтобы показать список сообщений', + ], + + ], + + ], + + 'settings' => [ + + 'form' => [ + + 'css_class' => 'CSS классы формы', + + 'use_placeholders' => 'Использовать заполнители формы', + 'use_placeholders_comment' => 'Будет скрыт