cmor_contact 0.0.40.pre → 0.0.41.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/cmor/contact/application/whatsapp_widget.js.coffee +30 -0
- data/app/assets/javascripts/cmor_contact.js +1 -0
- data/app/assets/stylesheets/cmor/contact/application/whatsapp_widget.css +32 -0
- data/app/assets/stylesheets/cmor_contact.css +3 -0
- data/app/controllers/cmor/contact/whatsapp_requests_controller.rb +60 -0
- data/app/models/cmor/contact/whatsapp_request.rb +17 -0
- data/app/view_helpers/cmor/contact/application_view_helper.rb +22 -0
- data/app/views/cmor/contact/application_view_helper/_render_whatsapp_widget.html.haml +4 -0
- data/app/views/cmor/contact/whatsapp_requests/_form.html.haml +1 -0
- data/app/views/cmor/contact/whatsapp_requests/_form_errors.haml +6 -0
- data/app/views/cmor/contact/whatsapp_requests/_form_xhr.html.haml +1 -0
- data/app/views/cmor/contact/whatsapp_requests/new.html.haml +6 -0
- data/app/views/cmor/contact/whatsapp_requests/new_xhr.html.haml +3 -0
- data/config/initializers/assets.rb +1 -0
- data/config/locales/de.yml +17 -1
- data/config/locales/en.yml +17 -1
- data/config/routes.rb +1 -0
- data/lib/cmor/contact/configuration.rb +3 -0
- data/lib/cmor_contact.rb +4 -0
- data/lib/generators/cmor/contact/install/templates/initializer.rb +8 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/initializers/cmor_contact.rb +19 -0
- data/spec/dummy/config/initializers/route_translator.rb +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{20190715162723_create_active_storage_tables.active_storage.rb → 20200119053533_create_active_storage_tables.active_storage.rb} +0 -0
- data/spec/dummy/db/migrate/{20190715162742_create_cmor_contact_contact_requests.cmor_contact.rb → 20200119053558_create_cmor_contact_contact_requests.cmor_contact.rb} +0 -0
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +49 -49
- data/spec/dummy/log/test.log +377 -219
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/--/--uVoRnVC9PFGLoYVIXCrZiiLFnb4IVyoHsm1bbBwNk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-W/-WFODxq3Dt0hS9AAgxfrFGfqd3Rxqw_NTk69O6pMFK0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-c/-cuKPPwHZkwFd6IgxQE8O3NIcz1BxcEtj8_Li4tO65A.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-g/-gm8z3bXpUv_LBvCN1fXtzdV2cu8WAWn0CErI26IO0Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/09/09SIGL6FEukh98CAUiwTeV37kC1-xGzVrteLrVJ9dTE.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0V/0VFVJ-JhrAzykBRXIU470to_I4dPSdwlkqqk0Wdu9aw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2P/2PHPPPMFi42XmUrvNieCmjNcgWroCXeTanmnQ-vT62g.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2y/2yhdy6CWUdl_CPixYtFbVgDmxEc_22qLA1hj3hZdmBk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3E/3Ehe8GmBgFLMvQFXoupsbBAX6-g8dIyQeJO3Cz4TVK8.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3k/3kPoz-P31pV1iErqsbOEr9Fz1HkEzk7dTh_tNdIp2u4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5K/5Kh5RevuIQpUVSDW-EilhDsPlutdytHspzHRGTC9IDU.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5Y/5YKSVySTBqHI-Yvfr7qNbH8l-B8vdnxixKnec28E864.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6K/6Kfk5m9bAGq0gRDTJ0Kclh-5DdQ_NcYEps0wD6tSChw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6g/6g6ojv_uQnOA-4q8WWr_-zHJ2b1sN77Hy2BZ0g_Gapc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6z/6zXJBhWFTBZTw2ojyb2M4_4H8k3rcVz6Y0RkXU6ZTQE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7L/7LHBZU7cg13v3vtEQ-a-CM9VC4CfKgO_MQhcS-LLzAU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7n/7neD8yjPtb8jSZkg_GONqf1tf_lwAZsBPz4-FQv1pf4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/82/82q_YlNCq3i7XGhlHZtHR4qCRUbe3aXv-PUoEpU7qvk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/88/883eN4SmZ9kXYVNsQJPm_Hg0k4nu7pTz6AdhkpgOyNw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8T/8TKD6f8Mz6KMBvP6vN2eVBI8vtY_GzJDR7PjLbviugg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8x/8xhzs_si4de5dYTOVQwEbF-KDXqSudW7rE51l0OEdrI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9E/9E3bUOAGaTW7NAuSEH7JEKE8P0C42MrUKe45-Oi2Upk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9S/9S33HYb1CcbZkHpsW987i9FWqW9Fce7Q6RbER5SlUrk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/A5/A5jcf9vDFCt1ti-AFxlRPG4HdKb0J_AP2Ne9yNK258Q.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AM/AMmCzd0FPCP7ucqJXDVzTxISKuicH3nbG9zmnk0B8XI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AR/AR5HjgPjmHjtApKYFnYqzP4gNCJ99UXyEUJYQ5ItdpU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ax/AxF3q3BNDOVsC5_nZXZI0c7XMyBYt3Tch1jjd_ip2kw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ax/AxP5nvn4nM3_bBtoaeHKZtVZQSs1lo0lXmwVzDAyR44.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ay/AynAR4nn1Xtl8cp_h9iZpTGKBUxB3qWFz6gfgv-Wy0Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bi/BiN2Ha5hUOMTb50aSS144igMPB701e-AeXzEiuq4ibY.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bm/BmmBkcCC1qQxVWDcZgrkuhFXZQUTTjglsBdztYI64WM.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CG/CGeyk563RkMWOB9ieZBTRUffxXdXexuGXFqPVnulvKs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ea/Ea_s-_DIqe4ftGhcWp1hai45qUnhsl67fVBNl8e8ddo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Er/ErnEEHubWTt304b_UtyLr9kIF3kmXE4Jx_l703VT8h0.cache +32 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FN/FNadC17Fjn31cNub608HO79L8TxoeE9gk1o_nTEZ4Oc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FN/FNyjcBZA6hdlZbpnzV0BR2OOFc65g4_q2mRH2BeXnbI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gd/GdD88MBCiQ4YuRlz2E4P0YohDnaGwNkcslSU60oNlyE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gm/GmkGW_aKzTsiHd7JndhKDLVrMtXFUkgKEnbfE_VWRq4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gy/Gyz635Hw3BnIvd6_GDhPUqZXE0PKdc9sxpa0jwom8EQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H6/H6XZxyZ5u5USfUZ2yEy8E-enaVw0iFq63Z5XVLQogTY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HQ/HQf2LYaABrxlqVRcdpCiOG-gPeTigMEeRXM22eXGO3w.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/I2/I2ptopNvzZHA4c7ho9e9kcmHJjsuoXW8inVcjE5zryw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/If/IfjuVHwDs3o1_4wuUYL8Q6C4G57uRvoah_vChE0pUco.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ii/Iiv8TMilHFsgX6mmcbV54_zBJcCKK4z8ILLHbZS4ExU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Iz/IzpCEXoxa9sKQNgQVuR0Hjoon8C6y8Gxo9S5H9FWP5M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J8/J8DA-jG092fy5gFpwgNvkFgZX4f0-V7KjHeOP6gWVOg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/J9/J90rXakSmo9PYUOh_UM1VWrULnQ2ZLmgDCIcUyizWIo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JR/JRLJwu5F-aux0D48W21AAkB9T95UUri7Q_fmem0aBAw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jp/Jp-P-w8fzJr9V6xkY_0t0WAWU4hdZD1bQG-T43in35I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jt/Jt0O9Gt5u370Hb1oUrXBDMDqECnh867hwCIhdzaK0QI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K3/K35I74n47p-zoG8j2L_NgEDXzSk8Ec7z64AA_W5VkN8.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KU/KUzWwLFQ2yX-3EOddrAI1essdUyadjjxK29eM1eT9DY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kn/KnPEEHK1kwGbXaVP5FU19C09a45CP-jkSvqDFQRBPOg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lh/LhVXsSQDva1-4mRl_9kDIhSC0yXph2uqSXqs7Xi8k3s.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NR/NRcyVN4r-e9NhpoB18n1Ci_MN_efTZCuKVOUxzNg2EY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ng/NgR9ik6wxTBCsz7gAibxGCY_bApnwj_NZHCKqAEZQ1k.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Nm/NmUCrpe_dAxwiicWINQMbaAhMZ3Nlgf-5qBPfoCD9B0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/P4/P4D53BiQKAcnAbYFtwTBmgZbnO29UjbqRsfSYk7Okak.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PP/PPURdQ1tkJbYxBJcBdXeQsyy4rGA14yn8dXlcdYpS_Y.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PU/PU-bW8TNmjeHLoPuEnSWfCCqVMeLa6i3-hr4odEY9ZE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PY/PY8MlEPGHFn5VBci09tK7yPjxtUiLLZe7_MMXff2oW8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pg/Pg41v8c4sWuBb_W8ZMSCZ2zX23kDejycBOi8YVKkNqQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Q3/Q3TxuimbxsnBfAe0acZOCxKn6OeBB9d4PoBLW1SZcJU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QL/QLf9qJLa2dMNI996t4LfppZF45m5tUs2AYz-BT31yA8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qe/Qe9dIPyBf-TLGpyNZ41UbzGFhNkLEBMNw5imoL8nxEU.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RK/RKIIoAsO5ihXeqgTFXIU0pbiwDyyEoLPT0OJSEk0FeA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RY/RYs8tjEinElltP-kqfTar7cJPVXdHI51hCZP5nzxl8M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ra/RaNEvqB7dA6k2T2W9xQxPUnN__OjWm9yWxmKuixotQM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rc/RcuMeBIWl-vYMj0HJjgrxk4zrCSfOBvTUlndewuFMfc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/S6/S68aVGMiAgB8IhZUhas9MXYzV9u0LFcnex-8fhxxWQo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/S7/S7OW0dPUlfzoxTEAo1LLk3ccGn6OONvJ-KiyUfCnPO8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/S8/S86QJzxPNaB2CQXQ1SKDbWfZdTQPRFBCrhsVcRRuvdM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sl/SlTxCkHUNAUEhd2NqEJ-mE1U3ssU30uRF251P-E6PH8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Td/Tdt1zY2kRAFN4fK4r-nzxcpdCcFSBOjUUr3QFhm1Ipw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tr/Tr0ZgBAO791VgGmPVAXA8Fvtz-_zqfLFv1X_rfUPH3Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V0/V0oynPF8iyKAZX6CsVhLNy0cEn6kMz20zvgCwmhwUAo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V9/V99EfSaCz3piQ9qb9vICLZ-gmlxEeqXIkLqm-bFZxcM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W6/W6SY2DWCK5ODMLmxXeWRQ5sitMu-be3z-8rtaZS5AAI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W9/W97_LwpYet6wurp7-r5keOQeC6daqrhSf9jJW0IiX38.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wu/WuX1taiDT8vjVRLsLw5ocIO96TPF4D9xRrbKnhGGJLc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wy/WyC1a013QnCOHVWvOE__FMUNl8Xaq7b0D842uw5Dd6E.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/XT/XTz9VVJzoiCm8mePNq7z2HDLmk-4RFTHqplJak8jNnI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X_/X_DqQA08T0jcOK8kvKnbuJ60g3wr_MG0JQOwQUYQ1M4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xk/Xk88pyUkf20D7CqjKcmeUKb50zyuywSuvc38_HvLXqs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xq/XqkLuENMTUW2nzcPyJZyEuy_5F8K-ICotABR7RArwvA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YM/YMSkijO4OqF-va090LsCh_f3AaiBWZcHyXM4hqlhuhU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yg/YgVkiPnfqJilOEw63PgVgC-iEn4iAnKAQU6h84gneRE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yh/Yh3PlJjadcoGcCCbCTqgJU_dVe4Doy90AafGyMhu3EQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yl/YlukUsyujAODdc0yapT61cXvvVIQ_M9YWUgpTpQTa_Y.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yn/YnDhC5Hn3XGTCyvL1qKLMdenlf0kSq_sO49MBJFBkqc.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yy/Yyz39RjCPMt7Xfe2PpecPYMRbT6wP7Dvu2SmL51FycE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zm/ZmQObfpXFL0sGTbFRdwtB9ZijGV_xnf0-Z4-0ZbtdBI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_R/_RCIa0Mn-0A6XVkUnYEtAI3yX80EDC6IVRjbZ6DJlg8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a6/a6c2fElJyz52FG1bzR1lcV7uaAsWFsR7vgCx-9C3Auk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a9/a9AbcO7bHCvM_zzrZ7GY22eAdaWYE3P7D7NHlc_bqdQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aW/aW1eUX8Bdt6woKSobNpaGTb83qrg88NOoUXLJBS8f2M.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/az/azPz0MjaMrptwfd2WrANe0mC8dv4x54NUTZ_RHwB2Fs.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b9/b938fG3-fVDu3IGFIQ5lV5QGfA6UIXSje9AeC1RS5BA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bq/bqX4j_zZbeV8LgllrusWMRjlCAKnQopwGmBpRlR0RVo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ci/ciKCYgJ8xqkVKW7svWS-EBI8RGb17E3tr9vTADbOmIc.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dC/dCASZpttrXE5-LfRPiHHj6H-V_HGzUvuumoOO-BZtBM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dp/dpYfWRNwhMBvM4r0LC7pRLwCmYyDyXmo-W16YLyUkEY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e4/e4KhaMiKnHNn7WbKYvSl4qLfn5XOzf7tghXekwAtk_M.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eR/eR-8QRvb0sTzJvQ2cCQIK51TPovuLdHn-RY0uIyTaNc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eX/eXrODHOUM-OXkFK5Q1CvWeg-ktPYWwG9U2Unzw62WZo.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/f2/f25XXrnER1SO3RQZx9TwzvHDYO9ubMJzYw2G0vZYooQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fH/fHcE4Kuql8zBhtB1xYJArJKc4RVJcHRkWe17NdQVfX8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fh/fhxP1IPKmUpqSTU3iPliPz87Emd8Jy0T6pUapEY6MS8.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g3/g3meu_FE0d8HVLqnQdR6wmPl9L1IEjF6lLMbWshsISQ.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g8/g8ZIQz8KHkeKEH1tPrQyf57b_a6fkl6hhODGWcpLDYQ.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gs/gs8O-hnSVTNtAMoD9-yrTB7WC2L1NXNBheKKW_4t_xw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h8/h8GfGN76bmpf4DLx0HLB2fDddrH97LpxgVi5S5lXEAg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hE/hE7i1PrvOReI7GbgJuGdlOZcF2exffn_eu3HcETjUtw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hE/hEfqVpUEZekaAwq2WfcTahAURqOqs8qMJRVAMBLJBbk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hh/hhBL0QAskLI4K7s0076rBPZPKRoTCQv730SRl0UkzPc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hr/hrdt0lveCzXrHPwshGxI7NeLRCOXjcNfrOx2EajTj6k.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iA/iAm5sdGtDc01QGmA7B200Gg0FWYFDncWeQhRExUjdno.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iK/iKD_EVENnAK9F4ZbyFFVRdJs479d65nJ_KqAzUR5Jv4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iY/iYhimmRrdDOmXCdoOoOMlvf5hLfXlGLdIiEAuxsah00.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ik/ikqi0IrytERlPVbeJrNZnd1jaKMHIIc5Blerf_4lbh4.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iy/iyXcqKtN3SUu5x5TqP48h89gLagEIEKZ3oNV7vpRvTE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jQ/jQwRPkEpFXP9FUM0TXwMKxld_lOpGGWAyiEXD6ejBws.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jk/jk-Q6T8oRztqqYmSOxc_AuGgQ8U2ZCP0lxFvmRgxrc0.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jl/jl8RmdNOOcNe4aRwgcDPS7XXVowU1fD2AccWQfaAhqs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k-/k-bsTA315sR8iUULydbJ9swQ_sbliU0Z3nmwvFduMoQ.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/l1/l1lmj4PCoaRrPDXkf-ikrO7kRyONy8ClBgVCs5VsXDk.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lS/lStvx9Beg2l4s8L-QdTSKuc5_qQPQAZPnIcRI7JkpPE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lu/luWp4WzF2hyzqRLszkLOcO2OsS4BNJrwN5qkemrz5d8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mg/mgKQfCNtf8r-ZBapE8bOEFMzHCe5vL3gXf2pwytxr24.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mi/mizDw234RdIIGD3Q0Cu0hurJ_NopWlAOQU101HhTnAM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mt/mti_Jdr3zlygSo4F5-1sh1eE_lSBfg23UMyg7ntjZhs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nO/nOk1StRCpfpfcUL3LxqZXbZiPO5KoAQsu4DCr1DpHtE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nb/nbE9F1Lff6172JJlnsbphWWnUqAETTU97Z_0hbcISTk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nz/nzP2QqJ701fN4VE7Zum68yIjn8-JyOjInxMYtD4GOgQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nz/nzTG5PNC0h84EYWsIez6-b_sImMyN7gGVJoFetHa96A.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o8/o8FeUwaKA0MGoRb3xNsqeEpj-i4h89Sf8hAe3KclRjQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oa/oanPJi8vkcusQmiGR7lV83k4mqPHwrn-h5jEkFWYGXk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/om/om3gxZD0pydiYXgg-qfWU-gAruk0mzO_L4wUSX8hmwQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pH/pHxVy7FZk5bSzayvqSReVCBDl8tyZsinqbM-1J4LzI4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qE/qEqhM9a-t_QD3BWLpYePOl_GhIrp4pMGwjc86Zh9X0Y.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qL/qLI6YmHgTOWSvK-axTrytNHMjxfvLqkfsG0feo-16uA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q_/q_79RCHcEa48J2wTjEtUIL1PsdQJITwgO4Mbq9vqI_M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qp/qpnn4gewy2_0O7aLG1YcbCjdvoFzZxERgl-uAb2NBiU.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rM/rMH5SI34eYLP3UKN6nbXlA1g6OoeVxnGtNgR_RoMrvo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rR/rRG2fiwM_TtG63S7RueONIoSya5pJ3cxk4fJiiVCEGE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rb/rbDCS-io3L3p4WS4ZiqeLynhhonweTQEq3i9R4eLs3s.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rk/rkTsARiOkJ36OhhBFKW_pFrumwIPjzwIks84HS7yIa8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ro/roRo4i80-eCp5OBfQixarj57g1MAEFAnJXfB8yIecBU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rv/rvPXCY9kJZYjGQOyZ6zPTQuqWqqQRgIDvwlmVSfV18Q.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sD/sDrOEK64tHodTAx_0bfU-f2QfMdrSAPx3E8fz4NSXtQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sF/sFaDgnrVymV-i1pq8oFTO7AMiXfGh8odbuZc77R1ZIo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sb/sbf6Cd6UTax4Q6dO_IJVvNIpAb-axyk2b0q8yVpnKDg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sn/sn54OOWYdB1enCZ479lEXl2UQEtuiBIXcd17agCLuG8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sp/spHzQy8hpyOazaWV8ps2e8eEN_1JQvuZlOKKAXvP3Pg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tF/tFBBIqJk8kEXHwZodwwsDG1ZnLtHUgQExLBppHiMr70.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tJ/tJIViDUQEref41nyBH-5nKSSFyojNH6Vjzx8E_ZVosk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/th/thIhgiuMHO_3A_ryXNheW2_Y0Mw8st3BI6lUVFakJz0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/to/to3OZW5pymhvRwZejeUnb8VX7KzKj6XPWNSKAw_BD8A.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/u3/u3aI9g21xngyxdELa4k2UaFOOwEezXm-FXKhlmWevFs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/u8/u8eyB2x_fVKUn-D8y1bx18f_2dk0bWeImNjqPZc6HqU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uP/uPISKnrReBm7Dy5lJ1AiQhMW0o7_2Op5cL2ZGWJh30E.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uT/uT_SiFfmeEBzbzkn0IYiJAqgUxwBLiDv7sH0yujLhx0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uZ/uZShm4oTj3aMhVv0aQ-bHZO2ILpbR_YEin0O8xu69Us.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uo/uojpnZNmCSLgYSpDHacT7CXvfBiKCjsizN9Mrd7bgiA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vH/vHIeDgPhDOSthVvhWKosHY0EA_KfxcwR62T531rRvi4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wR/wR0e_7hNLcnbWXSyeV5IwVkhy1TMqX_4t1pXsEweTDA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wY/wYscM1kVYoR9SjNgvA8tz8Yw6dGjEFb8NegK1QfM-rc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wb/wbb8AxEBVW39Lc-ueINb9976BZEGN7O3mihYMP0xc_0.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wi/win_v0ZNu-l7AoRx8w3ls1xcy0mUExLBVMCSr5oaJFc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wm/wmM3XYZ7jgPQhwclqYwEvWDLmz85O03chKhUsA7oJsA.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wv/wvNggJg6YJi4vWK3DdUuyr87nWowIClLyrYPMUhlIos.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xC/xCobBePQjr16SbYrc5w5Tfe9I4FoONzo9b8VWWX1zQc.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xd/xd3JtG-D44e-jZ7D-VwzpgcjsRPbvL4M5iZds6iinac.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xu/xuqTCdNMrB8B8JVihwlZduwqVaT5dhHz4L4Mw-tsyL8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yE/yEhUtQr5RJwWx8_AMli6SaJhinPjfStt2_U1hlE_wQM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yF/yFwH5xg233J3ZOBZVI5OQEIGt6poH4d50zY1BaEASCs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yW/yWFZzGL5OfncjMgS6E7KYJTkzSqwjYQR9H9DJO2G3nQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yb/ybb4Qfh3jh0WHAq6izBW-whsw6H4gGj7GYNgL3TdrBk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yy/yyPSvwTSsaCOl4J-CXh0eadLP63wfnOJxFXz-hgCldg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/z1/z1meknNd9i0t5EYolx6FTrLlt8iRGzZatDvDjtrD3m0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zb/zbnLOSWWPYE5ydWMPKTuprAHgnao8N5vrc83ZOIe9bk.cache +1 -0
- data/spec/dummy/tmp/development_secret.txt +1 -1
- data/spec/features/de/kontakt/anfrage_spec.rb +35 -0
- data/spec/features/de/kontakt/whatsapp_spec.rb +41 -0
- metadata +280 -11
- data/app/assets/javascripts/cmor/contact/application/keep.js +0 -0
- data/app/assets/stylesheets/cmor/contact/application/keep.css +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deb3da4aa33cd2fa772b7059989850226e0cdfca2cddd9b0ccdf0814e754edcf
|
4
|
+
data.tar.gz: 93b59767b93081fffdcec34dbbaef3f24dd8a0b088adfdd1675c757a6110933b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8357525514e7816387b7f92c6a1b8705ac74fdaac8b9acb97baaa9f33123418d4fcb8796bacdab21fd215f01c9252a23e9fc1d5cc893135e0944a0918cce88c9
|
7
|
+
data.tar.gz: 3b35020f4c75648fcfa7c98f527748e05d0ef2d8f1cbb36af84b5e0fd8267a749ac10945e39646fde8bac95aa3a3bbe4ca132c717f8f225d32dc69d9fdbd7e41
|
@@ -0,0 +1,30 @@
|
|
1
|
+
$ ->
|
2
|
+
initializePopover = (element) ->
|
3
|
+
url = $(element).data('url')
|
4
|
+
|
5
|
+
jqxhr = $.get(url, (data) =>
|
6
|
+
createPopover(element, data)
|
7
|
+
return
|
8
|
+
).done(->
|
9
|
+
return
|
10
|
+
).fail(->
|
11
|
+
return
|
12
|
+
).always(->
|
13
|
+
return
|
14
|
+
)
|
15
|
+
|
16
|
+
createPopover = (element, data) ->
|
17
|
+
popover = $(element).popover
|
18
|
+
sanitize: false
|
19
|
+
content: data
|
20
|
+
html: true
|
21
|
+
trigger: 'click'
|
22
|
+
return
|
23
|
+
|
24
|
+
initializePopover('#cmor-contact-whatsapp-popover-button')
|
25
|
+
|
26
|
+
$(document).on 'keypress', 'textarea', (e) ->
|
27
|
+
if e.which == 13 and !e.shiftKey
|
28
|
+
$(this).closest('form').submit()
|
29
|
+
e.preventDefault()
|
30
|
+
return
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require cmor/contact/application
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.page-action {
|
2
|
+
position: fixed;
|
3
|
+
bottom: 1rem;
|
4
|
+
right: 1rem;
|
5
|
+
}
|
6
|
+
|
7
|
+
.btn-circle {
|
8
|
+
width: 30px;
|
9
|
+
height: 30px;
|
10
|
+
padding: 6px 0px !important;
|
11
|
+
border-radius: 15px;
|
12
|
+
text-align: center;
|
13
|
+
font-size: 12px;
|
14
|
+
line-height: 1.42857;
|
15
|
+
}
|
16
|
+
|
17
|
+
.btn-circle.btn-lg {
|
18
|
+
width: 50px;
|
19
|
+
height: 50px;
|
20
|
+
border-radius: 25px;
|
21
|
+
font-size: 28px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.btn-whatsapp {
|
25
|
+
background-color: #00E676 !important;
|
26
|
+
border-color: #00E676 !important;
|
27
|
+
color: white !important;
|
28
|
+
}
|
29
|
+
|
30
|
+
.popover #new_whatsapp_request textarea {
|
31
|
+
font-size: 80%;
|
32
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Contact
|
3
|
+
class WhatsappRequestsController < Cmor::Contact::Configuration.base_controller.constantize
|
4
|
+
before_action :initialize_resource, only: [:index, :new]
|
5
|
+
before_action :initialize_resource_for_create, only: [:create]
|
6
|
+
|
7
|
+
respond_to :html
|
8
|
+
responders :flash
|
9
|
+
|
10
|
+
def self.resource_class
|
11
|
+
Cmor::Contact::WhatsappRequest
|
12
|
+
end
|
13
|
+
|
14
|
+
def index
|
15
|
+
new
|
16
|
+
if request.xhr?
|
17
|
+
render :new_xhr, layout: false
|
18
|
+
else
|
19
|
+
render :new
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def new; end
|
24
|
+
|
25
|
+
def create
|
26
|
+
if @resource.valid?
|
27
|
+
respond_with @resource, location: after_create_url
|
28
|
+
else
|
29
|
+
respond_with @resource
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def initialize_resource_for_create
|
36
|
+
@resource = initialize_scope.new(permitted_params)
|
37
|
+
end
|
38
|
+
|
39
|
+
def initialize_resource
|
40
|
+
@resource = initialize_scope.new
|
41
|
+
end
|
42
|
+
|
43
|
+
def initialize_scope
|
44
|
+
resource_class
|
45
|
+
end
|
46
|
+
|
47
|
+
def resource_class
|
48
|
+
self.class.resource_class
|
49
|
+
end
|
50
|
+
|
51
|
+
def permitted_params
|
52
|
+
params.require(:whatsapp_request).permit(:message)
|
53
|
+
end
|
54
|
+
|
55
|
+
def after_create_url
|
56
|
+
@resource.whatsapp_link
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Cmor::Contact
|
2
|
+
class WhatsappRequest
|
3
|
+
include ActiveModel::Model
|
4
|
+
|
5
|
+
attr_accessor :message
|
6
|
+
|
7
|
+
validates :message, presence: true
|
8
|
+
|
9
|
+
def whatsapp_link
|
10
|
+
"https://wa.me/#{number_for_url}?text=#{URI.encode(message)}"
|
11
|
+
end
|
12
|
+
|
13
|
+
def number_for_url
|
14
|
+
Cmor::Contact::Configuration.whatsapp_number&.gsub("+", "")&.gsub(" ", "")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Cmor
|
2
|
+
module Contact
|
3
|
+
# Example:
|
4
|
+
#
|
5
|
+
# # app/controllers/application_controller.rb
|
6
|
+
# class ApplicationController < ActionController::Base
|
7
|
+
# view_helper Cmor::Contact::ApplicationViewHelper, as: :contact_helper
|
8
|
+
# end
|
9
|
+
#
|
10
|
+
class ApplicationViewHelper < Rao::ViewHelper::Base
|
11
|
+
# Example:
|
12
|
+
#
|
13
|
+
# # app/views/layouts/application.html.haml
|
14
|
+
# = contact_helper(self).render_whatsapp_widget
|
15
|
+
#
|
16
|
+
def render_whatsapp_widget(options = {})
|
17
|
+
resource = Cmor::Contact::WhatsappRequest.new
|
18
|
+
render resource: resource
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
.page-action
|
2
|
+
#page-action-whatsapp
|
3
|
+
%button.btn.btn-lg.btn-primary.btn-circle.btn-whatsapp{ id: "cmor-contact-whatsapp-popover-button", data: { container: "body", toggle: "cmor-contact-whatsapp-popover", boundary: 'viewport', url: cmor_contact.whatsapp_requests_path } }
|
4
|
+
%i.fab.fa-whatsapp
|
@@ -0,0 +1 @@
|
|
1
|
+
= form.input :message, as: :text
|
@@ -0,0 +1 @@
|
|
1
|
+
= form.input :message, as: :text, label: false, input_html: { cols: 20, rows: 10 }
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( cmor_contact.css cmor_contact.js )
|
data/config/locales/de.yml
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
de:
|
2
2
|
classes:
|
3
3
|
cmor/contact/engine: Kontakt
|
4
|
+
activemodel:
|
5
|
+
models:
|
6
|
+
cmor/contact/whatsapp_request:
|
7
|
+
one: WhatsApp Anfrage
|
8
|
+
other: WhatsApp Anfragen
|
9
|
+
attributes:
|
10
|
+
cmor/contact/whatsapp_request:
|
11
|
+
message: Nachricht
|
4
12
|
activerecord:
|
5
13
|
models:
|
6
14
|
cmor/contact/contact_request:
|
@@ -28,6 +36,9 @@ de:
|
|
28
36
|
notify:
|
29
37
|
subject: "[%{application_name}] Neue Kontaktanfrage"
|
30
38
|
title: "Neue Kontaktanfrage"
|
39
|
+
whatsapp_requests:
|
40
|
+
new:
|
41
|
+
title: Anfrage über WhatsApp
|
31
42
|
flash:
|
32
43
|
cmor:
|
33
44
|
contact:
|
@@ -38,9 +49,12 @@ de:
|
|
38
49
|
submit:
|
39
50
|
contact_request:
|
40
51
|
create: Absenden
|
52
|
+
whatsapp_request:
|
53
|
+
create: Absenden
|
41
54
|
routes:
|
42
55
|
cmor_contact_engine: kontakt
|
43
56
|
contact_requests: anfrage
|
57
|
+
whatsapp_requests: whatsapp
|
44
58
|
simple_form:
|
45
59
|
labels:
|
46
60
|
contact_request:
|
@@ -51,4 +65,6 @@ de:
|
|
51
65
|
email: "max.mustermann@example.com"
|
52
66
|
message: "Meine Nachricht"
|
53
67
|
phone: "+49 69 12345678"
|
54
|
-
subject: "Meine Anfrage"
|
68
|
+
subject: "Meine Anfrage"
|
69
|
+
whatsapp_request:
|
70
|
+
message: "Hallo, wie können wir Ihnen helfen? Senden Sie uns eine Nachricht über WhatsApp."
|
data/config/locales/en.yml
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
en:
|
2
2
|
classes:
|
3
3
|
cmor/contact/engine: Contact
|
4
|
+
activemodel:
|
5
|
+
models:
|
6
|
+
cmor/contact/whatsapp_request:
|
7
|
+
one: WhatsApp Request
|
8
|
+
other: WhatsApp Requests
|
9
|
+
attributes:
|
10
|
+
cmor/contact/whatsapp_request:
|
11
|
+
message: Message
|
4
12
|
activerecord:
|
5
13
|
models:
|
6
14
|
cmor/contact/contact_request:
|
@@ -28,6 +36,9 @@ en:
|
|
28
36
|
notify:
|
29
37
|
subject: "[%{application_name}] New contact request"
|
30
38
|
title: "New contact request"
|
39
|
+
whatsapp_requests:
|
40
|
+
new:
|
41
|
+
title: Contact Request via WhatsApp
|
31
42
|
flash:
|
32
43
|
cmor:
|
33
44
|
contact:
|
@@ -38,9 +49,12 @@ en:
|
|
38
49
|
submit:
|
39
50
|
contact_request:
|
40
51
|
create: Submit
|
52
|
+
whatsapp_request:
|
53
|
+
create: Submit
|
41
54
|
routes:
|
42
55
|
cmor_contact_engine: contact
|
43
56
|
contact_requests: request
|
57
|
+
whatsapp_requests: whatsapp
|
44
58
|
simple_form:
|
45
59
|
labels:
|
46
60
|
contact_request:
|
@@ -50,4 +64,6 @@ en:
|
|
50
64
|
name: "John Doe"
|
51
65
|
email: "john.doe@example.com"
|
52
66
|
message: "Hi Dave..."
|
53
|
-
phone: "+1-541-754-3010"
|
67
|
+
phone: "+1-541-754-3010"
|
68
|
+
whatsapp_request:
|
69
|
+
message: "Hallo, how may we help you? Send us a message via WhatsApp."
|
data/config/routes.rb
CHANGED
data/lib/cmor_contact.rb
CHANGED
@@ -95,4 +95,12 @@ Cmor::Contact.configure do |config|
|
|
95
95
|
# Default: config.contact_request_include_modules = ->() { [Cmor::Contact::ContactRequest::PhoneConcern] }
|
96
96
|
#
|
97
97
|
config.contact_request_include_modules = ->() { [Cmor::Contact::ContactRequest::PhoneConcern] }
|
98
|
+
|
99
|
+
# Set the whatsapp number for the whatsapp contact widget.
|
100
|
+
#
|
101
|
+
# Example: config.default_whatsapp_number = "+49 123 4567890"
|
102
|
+
#
|
103
|
+
# Default: config.whatsapp_number = nil
|
104
|
+
#
|
105
|
+
config.whatsapp_number = nil
|
98
106
|
end
|
@@ -84,4 +84,23 @@ Cmor::Contact.configure do |config|
|
|
84
84
|
# default: config.sender = ->(mail_form) { %("#{mail_form.name}" <#{mail_form.email}>) }
|
85
85
|
#
|
86
86
|
config.sender = ->(mail_form) { %("#{mail_form.name}" <#{mail_form.email}>) }
|
87
|
+
|
88
|
+
# Modules listed here will be included in Cmor::Contact::ContactRequest.
|
89
|
+
#
|
90
|
+
# Available modules are:
|
91
|
+
#
|
92
|
+
# - Cmor::Contact::ContactRequest::PhoneConcern
|
93
|
+
# - Cmor::Contact::ContactRequest::SubjectConcern
|
94
|
+
#
|
95
|
+
# Default: config.contact_request_include_modules = ->() { [Cmor::Contact::ContactRequest::PhoneConcern] }
|
96
|
+
#
|
97
|
+
config.contact_request_include_modules = ->() { [Cmor::Contact::ContactRequest::PhoneConcern] }
|
98
|
+
|
99
|
+
# Set the whatsapp number for the whatsapp contact widget.
|
100
|
+
#
|
101
|
+
# Example: config.default_whatsapp_number = "+49 123 4567890"
|
102
|
+
#
|
103
|
+
# Default: config.whatsapp_number = nil
|
104
|
+
#
|
105
|
+
config.whatsapp_number = nil
|
87
106
|
end
|
Binary file
|
File without changes
|
File without changes
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2020_01_19_053558) do
|
14
14
|
|
15
15
|
create_table "active_storage_attachments", force: :cascade do |t|
|
16
16
|
t.string "name", null: false
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,49 +1,49 @@
|
|
1
|
-
[1m[35m (0.
|
1
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
2
2
|
↳ bin/rails:4
|
3
|
-
[1m[35m (
|
3
|
+
[1m[35m (3.6ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
4
4
|
↳ bin/rails:4
|
5
|
-
[1m[35m (
|
5
|
+
[1m[35m (4.0ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
6
6
|
↳ bin/rails:4
|
7
|
-
[1m[35m (0.
|
7
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8
8
|
↳ bin/rails:4
|
9
|
-
Migrating to CreateActiveStorageTables (
|
9
|
+
Migrating to CreateActiveStorageTables (20200119053533)
|
10
10
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
11
11
|
↳ bin/rails:4
|
12
|
-
[1m[35m (0.
|
13
|
-
↳ db/migrate/
|
14
|
-
[1m[35m (0.
|
15
|
-
↳ db/migrate/
|
16
|
-
[1m[35m (0.
|
12
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "active_storage_blobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar NOT NULL, "filename" varchar NOT NULL, "content_type" varchar, "metadata" text, "byte_size" bigint NOT NULL, "checksum" varchar NOT NULL, "created_at" datetime NOT NULL)[0m
|
13
|
+
↳ db/migrate/20200119053533_create_active_storage_tables.active_storage.rb:4
|
14
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key")[0m
|
15
|
+
↳ db/migrate/20200119053533_create_active_storage_tables.active_storage.rb:4
|
16
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "active_storage_attachments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "record_type" varchar NOT NULL, "record_id" integer NOT NULL, "blob_id" integer NOT NULL, "created_at" datetime NOT NULL, CONSTRAINT "fk_rails_c3b3935057"
|
17
17
|
FOREIGN KEY ("blob_id")
|
18
18
|
REFERENCES "active_storage_blobs" ("id")
|
19
19
|
)[0m
|
20
|
-
↳ db/migrate/
|
20
|
+
↳ db/migrate/20200119053533_create_active_storage_tables.active_storage.rb:16
|
21
21
|
[1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id")[0m
|
22
|
-
↳ db/migrate/
|
23
|
-
[1m[35m (0.
|
24
|
-
↳ db/migrate/
|
25
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.
|
22
|
+
↳ db/migrate/20200119053533_create_active_storage_tables.active_storage.rb:16
|
23
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id")[0m
|
24
|
+
↳ db/migrate/20200119053533_create_active_storage_tables.active_storage.rb:16
|
25
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20200119053533"]]
|
26
26
|
↳ bin/rails:4
|
27
|
-
[1m[35m (
|
27
|
+
[1m[35m (3.2ms)[0m [1m[36mcommit transaction[0m
|
28
28
|
↳ bin/rails:4
|
29
|
-
Migrating to CreateCmorContactContactRequests (
|
30
|
-
[1m[35m (0.
|
29
|
+
Migrating to CreateCmorContactContactRequests (20200119053558)
|
30
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
31
31
|
↳ bin/rails:4
|
32
|
-
[1m[35m (
|
33
|
-
↳ db/migrate/
|
34
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.
|
32
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "cmor_contact_contact_requests" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "phone" varchar, "ip_address" varchar, "message" text, "accept_terms_of_service" boolean, "notified_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
33
|
+
↳ db/migrate/20200119053558_create_cmor_contact_contact_requests.cmor_contact.rb:4
|
34
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20200119053558"]]
|
35
35
|
↳ bin/rails:4
|
36
|
-
[1m[35m (
|
36
|
+
[1m[35m (3.3ms)[0m [1m[36mcommit transaction[0m
|
37
37
|
↳ bin/rails:4
|
38
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.
|
38
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
39
39
|
↳ bin/rails:4
|
40
40
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
41
41
|
↳ bin/rails:4
|
42
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.
|
42
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2020-01-19 05:35:58.530428"], ["updated_at", "2020-01-19 05:35:58.530428"]]
|
43
43
|
↳ bin/rails:4
|
44
|
-
[1m[35m (
|
44
|
+
[1m[35m (3.1ms)[0m [1m[36mcommit transaction[0m
|
45
45
|
↳ bin/rails:4
|
46
|
-
[1m[35m (0.
|
46
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
47
47
|
↳ bin/rails:4
|
48
48
|
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
49
49
|
↳ bin/rails:4
|
@@ -51,58 +51,58 @@ Migrating to CreateCmorContactContactRequests (20190715162742)
|
|
51
51
|
↳ bin/rails:4
|
52
52
|
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
53
53
|
↳ bin/rails:4
|
54
|
-
[1m[35m (0.
|
54
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
55
55
|
↳ bin/rails:4
|
56
|
-
[1m[35m (0.
|
56
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
57
57
|
↳ bin/rails:4
|
58
|
-
[1m[35m (0.
|
58
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
59
59
|
↳ bin/rails:4
|
60
60
|
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "active_storage_attachments"[0m
|
61
61
|
↳ db/schema.rb:15
|
62
62
|
[1m[35m (0.2ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
63
63
|
↳ db/schema.rb:15
|
64
|
-
[1m[35m (
|
64
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE TABLE "active_storage_attachments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "record_type" varchar NOT NULL, "record_id" integer NOT NULL, "blob_id" integer NOT NULL, "created_at" datetime NOT NULL)[0m
|
65
65
|
↳ db/schema.rb:15
|
66
|
-
[1m[35m (
|
66
|
+
[1m[35m (3.4ms)[0m [1m[35mCREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id")[0m
|
67
67
|
↳ db/schema.rb:15
|
68
|
-
[1m[35m (
|
68
|
+
[1m[35m (17.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id")[0m
|
69
69
|
↳ db/schema.rb:15
|
70
|
-
[1m[35m (0.
|
70
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "active_storage_blobs"[0m
|
71
71
|
↳ db/schema.rb:25
|
72
|
-
[1m[35m (
|
72
|
+
[1m[35m (9.4ms)[0m [1m[35mCREATE TABLE "active_storage_blobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar NOT NULL, "filename" varchar NOT NULL, "content_type" varchar, "metadata" text, "byte_size" bigint NOT NULL, "checksum" varchar NOT NULL, "created_at" datetime NOT NULL)[0m
|
73
73
|
↳ db/schema.rb:25
|
74
|
-
[1m[35m (
|
74
|
+
[1m[35m (17.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key")[0m
|
75
75
|
↳ db/schema.rb:25
|
76
|
-
[1m[35m (0.
|
76
|
+
[1m[35m (0.1ms)[0m [1m[35mDROP TABLE IF EXISTS "cmor_contact_contact_requests"[0m
|
77
77
|
↳ db/schema.rb:36
|
78
|
-
[1m[35m (
|
78
|
+
[1m[35m (19.5ms)[0m [1m[35mCREATE TABLE "cmor_contact_contact_requests" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "phone" varchar, "ip_address" varchar, "message" text, "accept_terms_of_service" boolean, "notified_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
79
79
|
↳ db/schema.rb:36
|
80
|
-
[1m[35m (
|
80
|
+
[1m[35m (12.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
81
81
|
↳ db/schema.rb:13
|
82
|
-
[1m[35m (0.
|
82
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
83
83
|
↳ db/schema.rb:13
|
84
|
-
[1m[35m (
|
84
|
+
[1m[35m (10.7ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20200119053558)[0m
|
85
85
|
↳ db/schema.rb:13
|
86
|
-
[1m[35m (
|
87
|
-
(
|
86
|
+
[1m[35m (13.1ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
87
|
+
(20200119053533);
|
88
88
|
|
89
89
|
[0m
|
90
90
|
↳ db/schema.rb:13
|
91
|
-
[1m[35m (3.
|
91
|
+
[1m[35m (3.9ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
92
92
|
↳ db/schema.rb:13
|
93
93
|
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
94
94
|
↳ db/schema.rb:13
|
95
|
-
[1m[35m (0.
|
95
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
96
96
|
↳ db/schema.rb:13
|
97
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.
|
97
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2020-01-19 05:35:58.686513"], ["updated_at", "2020-01-19 05:35:58.686513"]]
|
98
98
|
↳ db/schema.rb:13
|
99
|
-
[1m[35m (
|
99
|
+
[1m[35m (9.0ms)[0m [1m[36mcommit transaction[0m
|
100
100
|
↳ db/schema.rb:13
|
101
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.
|
101
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
102
102
|
↳ bin/rails:4
|
103
103
|
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
104
104
|
↳ bin/rails:4
|
105
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.
|
105
|
+
[1m[36mActiveRecord::InternalMetadata Update (0.2ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ?[0m [["value", "test"], ["updated_at", "2020-01-19 05:35:58.701308"], ["key", "environment"]]
|
106
106
|
↳ bin/rails:4
|
107
|
-
[1m[35m (
|
107
|
+
[1m[35m (2.5ms)[0m [1m[36mcommit transaction[0m
|
108
108
|
↳ bin/rails:4
|