Skip to content

Commit

Permalink
Merge pull request #57 from texpert/remove-redundant-returns-after-de…
Browse files Browse the repository at this point in the history
…caffeinate

Remove redundant returns after decaffeinate
  • Loading branch information
texpert authored Apr 24, 2024
2 parents 29b0afb + c04673c commit ea13462
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Camaleon CMS Plugin
This is a plugin for Camaleon CMS to manage Contact Forms
This is a plugin for Camaleon CMS to manage Contact Forms
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand All @@ -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)
Expand All @@ -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
})
Expand All @@ -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)
})
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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])
Expand Down
4 changes: 2 additions & 2 deletions config/camaleon_plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Camaleon CMS Contact Form",
"descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/4'>here.</a>",
"descr": "Please check documentation <a href='https://camaleon.website/store/plugins/4'>here.</a>",
"key": "cama_contact_form",
"helpers": [
"Plugins::CamaContactForm::MainHelper"
Expand All @@ -26,4 +26,4 @@
"on_import": ["contact_form_on_import"]
//here you can add all your hooks (read documentation)
}
}
}
2 changes: 1 addition & 1 deletion test/dummy/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit ea13462

Please sign in to comment.