From ddc9a8211e193e7b05508393d0f3219bbfaa12cb Mon Sep 17 00:00:00 2001 From: Aurel Branzeanu Date: Sat, 20 Jan 2024 01:05:50 +0200 Subject: [PATCH 1/3] Add show action to admin_forms_controller --- .../plugins/cama_contact_form/admin_forms_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/plugins/cama_contact_form/admin_forms_controller.rb b/app/controllers/plugins/cama_contact_form/admin_forms_controller.rb index 8aad616..7191805 100644 --- a/app/controllers/plugins/cama_contact_form/admin_forms_controller.rb +++ b/app/controllers/plugins/cama_contact_form/admin_forms_controller.rb @@ -9,6 +9,10 @@ def index @forms = @forms.paginate(:page => params[:page], :per_page => current_site.admin_per_page) end + def show + + end + def edit add_breadcrumb I18n.t("plugins.cama_contact_form.edit_view", default: 'Edit contact form') render "edit" @@ -73,6 +77,7 @@ def item_field # here add your custom functions private + def set_form begin @form = current_site.contact_forms.find_by_id(params[:id]) From 270cddcfaec974e034f679e324a0a1986cb851de Mon Sep 17 00:00:00 2001 From: Aurel Branzeanu Date: Sat, 20 Jan 2024 01:06:28 +0200 Subject: [PATCH 2/3] Remove redundant returns after `decaffeinate` from admin_editor.js --- .../javascripts/plugins/cama_contact_form/admin_editor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/plugins/cama_contact_form/admin_editor.js b/app/assets/javascripts/plugins/cama_contact_form/admin_editor.js index 69f1ae0..c3c219b 100644 --- a/app/assets/javascripts/plugins/cama_contact_form/admin_editor.js +++ b/app/assets/javascripts/plugins/cama_contact_form/admin_editor.js @@ -16,7 +16,7 @@ $(function() { res.find('.options_sortable').sortable({ handle: '.options-sortable' }) res.find('.add_option').click().click() res.find('.translatable').Translatable(ADMIN_TRANSLATIONS) - return hideLoading() + hideLoading() }) return false }) @@ -27,7 +27,7 @@ $(function() { const clone = list.children().first().clone().removeClass('hidden') clone.find('input').prop('disabled', false).each(function() { - return $(this).attr('name', $(this).attr('name').replace('[0]', '[' + list.attr('data-options-count') + ']')) + $(this).attr('name', $(this).attr('name').replace('[0]', '[' + list.attr('data-options-count') + ']')) }) list.append(clone) @@ -42,7 +42,7 @@ $(function() { panel.on('click', '.panel-delete', function() { $(this).closest('li.panel').fadeOut('slow', function() { - return $(this).remove() + $(this).remove() }) return false }) @@ -53,5 +53,5 @@ $(function() { }) myFields.find('.options_sortable').sortable({ handle: '.options-sortable' }) - return panel.find('.translatable').Translatable(ADMIN_TRANSLATIONS) + panel.find('.translatable').Translatable(ADMIN_TRANSLATIONS) }) From c04673c013000f330a7739b0f447b448e84b3c51 Mon Sep 17 00:00:00 2001 From: Aurel Branzeanu Date: Wed, 24 Apr 2024 20:30:06 +0300 Subject: [PATCH 3/3] Replace http://camaleon.tuzitio.com occurrences with https://camaleon.website --- README.md | 2 +- config/camaleon_plugin.json | 4 ++-- test/dummy/config/locales/en.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 09d9b86..dc7ffb9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Camaleon CMS Plugin -This is a plugin for Camaleon CMS to manage Contact Forms \ No newline at end of file +This is a plugin for Camaleon CMS to manage Contact Forms diff --git a/config/camaleon_plugin.json b/config/camaleon_plugin.json index bb4a6e7..a0059dd 100644 --- a/config/camaleon_plugin.json +++ b/config/camaleon_plugin.json @@ -1,6 +1,6 @@ { "title": "Camaleon CMS Contact Form", - "descr": "Please check documentation here.", + "descr": "Please check documentation here.", "key": "cama_contact_form", "helpers": [ "Plugins::CamaContactForm::MainHelper" @@ -26,4 +26,4 @@ "on_import": ["contact_form_on_import"] //here you can add all your hooks (read documentation) } -} \ No newline at end of file +} diff --git a/test/dummy/config/locales/en.yml b/test/dummy/config/locales/en.yml index 0653957..92c0412 100644 --- a/test/dummy/config/locales/en.yml +++ b/test/dummy/config/locales/en.yml @@ -17,7 +17,7 @@ # This would use the information in config/locales/es.yml. # # To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. +# available at https://guides.rubyonrails.org/i18n.html. en: hello: "Hello world"