cama_contact_form 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/plugins/cama_contact_form/admin_editor.js.coffee +1 -1
- data/app/controllers/plugins/cama_contact_form/admin_forms_controller.rb +6 -6
- data/app/helpers/plugins/cama_contact_form/main_helper.rb +2 -2
- data/app/views/plugins/cama_contact_form/admin_forms/edit.html.erb +1 -1
- data/config/locales/pt_br.yml +105 -0
- data/lib/cama_contact_form/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c0dd656a0a37d31701c8fccf1d769bbd2bbd3df
|
4
|
+
data.tar.gz: 52d429d7bdd11bb877d6dd8d27d5a8f3599d82e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba09c349102dbae4d2e0af30effcef610f994aea3107f5737cf854641651addcec96c8003aae9c56c43f2b4292efe26eb6b821259167ecb0b539086ca211670c
|
7
|
+
data.tar.gz: d432f538340f17a187fd43276d2b3ba5d0dae0ac0f21aa2a3d1d1fb86b6d2e5252f26dba83eec9d77ca74ba4b2aaf56fee4ca19f60a358778397e0bcadb0d2b7
|
@@ -5,7 +5,7 @@ $ ->
|
|
5
5
|
panel.find('#fields_available a').click ->
|
6
6
|
showLoading()
|
7
7
|
my_fields.attr('data-cid', parseInt(my_fields.attr('data-cid')) + 1)
|
8
|
-
$.get(panel.find('#fields_available').attr('data-remote_url'), {kind: $(this).attr('data-field-type'), cid: my_fields.attr('data-cid')}, (res)->
|
8
|
+
$.get(panel.find('#fields_available').attr('data-remote_url'), {kind: $(this).attr('data-field-type'), cid: 'c'+my_fields.attr('data-cid')}, (res)->
|
9
9
|
res = $(res)
|
10
10
|
my_fields.append(res)
|
11
11
|
res.find('.options_sortable').sortable({handle: ".options-sortable"})
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Plugins::CamaContactForm::AdminFormsController < CamaleonCms::Apps::PluginsAdminController
|
2
2
|
include Plugins::CamaContactForm::MainHelper
|
3
3
|
before_action :set_form, only: ['show','edit','update','destroy']
|
4
|
-
add_breadcrumb I18n.t("plugins.cama_contact_form.title"), :admin_plugins_cama_contact_form_admin_forms_path
|
4
|
+
add_breadcrumb I18n.t("plugins.cama_contact_form.title", default: 'Contact Form'), :admin_plugins_cama_contact_form_admin_forms_path
|
5
5
|
|
6
6
|
def index
|
7
7
|
@forms = current_site.contact_forms.where("parent_id is null").all
|
@@ -9,7 +9,7 @@ class Plugins::CamaContactForm::AdminFormsController < CamaleonCms::Apps::Plugin
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def edit
|
12
|
-
add_breadcrumb I18n.t("plugins.cama_contact_form.edit_view")
|
12
|
+
add_breadcrumb I18n.t("plugins.cama_contact_form.edit_view", default: 'Edit contact form')
|
13
13
|
append_asset_libraries({"plugin_contact_form"=> { js: [plugin_asset_path("js/contact_form.js")], css: [plugin_asset_path("css/contact-form.css")] }})
|
14
14
|
render "edit"
|
15
15
|
end
|
@@ -23,7 +23,7 @@ class Plugins::CamaContactForm::AdminFormsController < CamaleonCms::Apps::Plugin
|
|
23
23
|
fields << v
|
24
24
|
}
|
25
25
|
@form.update({settings: settings.to_json, value: {fields: fields}.to_json})
|
26
|
-
flash[:notice] = t('.updated_success')
|
26
|
+
flash[:notice] = t('.updated_success', default: 'Updated successfully')
|
27
27
|
redirect_to action: :edit, id: @form.id
|
28
28
|
else
|
29
29
|
edit
|
@@ -33,7 +33,7 @@ class Plugins::CamaContactForm::AdminFormsController < CamaleonCms::Apps::Plugin
|
|
33
33
|
def create
|
34
34
|
@form = current_site.contact_forms.new(params.require(:plugins_cama_contact_form_cama_contact_form).permit(:name, :slug))
|
35
35
|
if @form.save
|
36
|
-
flash[:notice] = "#{t('.created')}"
|
36
|
+
flash[:notice] = "#{t('.created', default: 'Created successfully')}"
|
37
37
|
redirect_to action: :edit, id: @form.id
|
38
38
|
else
|
39
39
|
flash[:error] = @form.errors.full_messages.join(', ')
|
@@ -42,12 +42,12 @@ class Plugins::CamaContactForm::AdminFormsController < CamaleonCms::Apps::Plugin
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def destroy
|
45
|
-
flash[:notice] = "#{t('.deleted')}" if @form.destroy
|
45
|
+
flash[:notice] = "#{t('.deleted', default: 'Destroyed successfully')}" if @form.destroy
|
46
46
|
redirect_to action: :index
|
47
47
|
end
|
48
48
|
|
49
49
|
def responses
|
50
|
-
add_breadcrumb I18n.t("plugins.cama_contact_form.list_responses")
|
50
|
+
add_breadcrumb I18n.t("plugins.cama_contact_form.list_responses", default: 'Contact form records')
|
51
51
|
@form = current_site.contact_forms.where({id: params[:admin_form_id]}).first
|
52
52
|
values = JSON.parse(@form.value).to_sym
|
53
53
|
@op_fields = values[:fields]
|
@@ -112,9 +112,9 @@ module Plugins::CamaContactForm::MainHelper
|
|
112
112
|
temp2 = cama_form_select_multiple_bootstrap(ob, ob[:label], "select",values)
|
113
113
|
else
|
114
114
|
end
|
115
|
-
r[:template] = r[:template].sub('[
|
115
|
+
r[:template] = r[:template].sub('[ci]', temp2)
|
116
116
|
r[:template] = r[:template].sub('[descr ci]', field_options[:description] || "").sub('<p></p>', '')
|
117
|
-
html += r[:template]
|
117
|
+
html += r[:template].gsub('[label ci]', for_name)
|
118
118
|
end
|
119
119
|
html
|
120
120
|
end
|
@@ -74,7 +74,7 @@
|
|
74
74
|
|
75
75
|
<div class="form-group">
|
76
76
|
<label for="railscf_mail_body"><%= t('.body', default: 'Email message to prepend') %>:</label><br>
|
77
|
-
<textarea rows="4" cols="5" id="railscf_mail_body" class="form-control translatable" name="railscf_mail[body]"><%= @form.the_settings[:railscf_mail][:body] rescue
|
77
|
+
<textarea rows="4" cols="5" id="railscf_mail_body" class="form-control translatable" name="railscf_mail[body]"><%= @form.the_settings[:railscf_mail][:body] rescue '' %></textarea>
|
78
78
|
</div>
|
79
79
|
<div class="form-group hidden">
|
80
80
|
<label><%= t('.name_button') %>:</label>
|
@@ -0,0 +1,105 @@
|
|
1
|
+
pt-BR:
|
2
|
+
recaptcha:
|
3
|
+
errors:
|
4
|
+
incorrect-captcha-sol: 'Oh! Há um erro com o reCAPTCHA!'
|
5
|
+
plugin:
|
6
|
+
contact_form:
|
7
|
+
actions: 'Ações'
|
8
|
+
add_form: 'Adicionar Formulário'
|
9
|
+
add_field: 'Adicionar Campo'
|
10
|
+
add_new_field: 'Adicionar um Novo Campo'
|
11
|
+
add_option: 'Adicionar Opção'
|
12
|
+
body: 'Corpo'
|
13
|
+
body_value: 'Esse e-mail foi enviado pelo formulário de contato.'
|
14
|
+
button:
|
15
|
+
back: 'Voltar'
|
16
|
+
submit: 'Enviar'
|
17
|
+
captcha: 'Captcha'
|
18
|
+
created_at: 'Criado em'
|
19
|
+
custom_class: 'Classe Customizada'
|
20
|
+
copy_shortcode_post: 'Copie o shortcode para postar:'
|
21
|
+
count: 'Contagem'
|
22
|
+
contact_form: 'Formulário de Contato'
|
23
|
+
default: 'Padrão'
|
24
|
+
description: 'Descrição'
|
25
|
+
delete: 'Deletar'
|
26
|
+
duplicate_field: 'Campos Duplicado'
|
27
|
+
edit: 'Editar'
|
28
|
+
edit_field: 'Editar Campo'
|
29
|
+
error_captcha: 'Oh! Há um erro com o CAPTCHA!'
|
30
|
+
form_settings_email: 'Configuração do Formulário de Email'
|
31
|
+
form_settings_messages: 'Configuração do Formulário de Mensagem'
|
32
|
+
include_lank: 'Incluir branco'
|
33
|
+
include_other: 'Incluir outro'
|
34
|
+
message:
|
35
|
+
save: 'O formulário de contato foi criado.'
|
36
|
+
delete: 'O formulário de contato foi excluído'
|
37
|
+
msg_data_found_list: 'Não há dados encontrado na lista'
|
38
|
+
msg_delete: 'Você tem certeza?'
|
39
|
+
lbl_message_has_been_success: 'Sua mensagem foi enviada com sucesso.'
|
40
|
+
msg_message_has_been_sent_success_tank_you: 'Sua mensagem foi enviada com sucesso. Muito obrigado.'
|
41
|
+
lbl_failed_sending_message: 'Falha no envio da mensagem.'
|
42
|
+
msg_failed_sending_message_please_contact_admin: 'Falha no envio da mensagem. Por favor tente novamente mais tarde ou contate o administrador por outros meios.'
|
43
|
+
lbl_there_was_validation_error: 'Houve um erro de validação.'
|
44
|
+
msg_there_was_validation_error_please_confirm_submit_form: 'Houve um erro de validação. Por favor confirme os campos e envie o formulário novamente.'
|
45
|
+
lbl_shipment_considered_spam: 'Shipment é considerado spam.'
|
46
|
+
msg_falied_sending_message_please_contact_admin: 'Falha no envio da mensagem. Por favor tente novamente mais tarde ou contate o administrador por outros meios.'
|
47
|
+
lbl_you_must_accept_all_terms: 'Você deve aceitar todos os termos.'
|
48
|
+
msg_please_accept_terms_conditions_contiue: 'Por favor aceite os termos e condições para continuar.'
|
49
|
+
lbl_you_must_complete_all_fields: 'Você deve completar todos os campos.'
|
50
|
+
msg_please_fill_the_required_field: 'Por favor complete os campos requeridos.'
|
51
|
+
lbl_there_field_user_input_longer_maximum_allowed_length: 'Há um campo que ultrapassa o limite de extensão.'
|
52
|
+
mgs_this_input_too_long: 'O valor inputado é muito longo.'
|
53
|
+
lbl_there_field_user_input_shorter_minimum_allowed_length: 'Há um campo menor do que o mínimo de extensão.'
|
54
|
+
mgs_this_input_too_short: 'O valor inputado é muito curto.'
|
55
|
+
lbl_the_code_entered_did_not_match_the_captcha: 'O código digitado não bate com o CAPTCHA.'
|
56
|
+
msg_the_entered_code_incorrect: 'O código digitado é incorreto.'
|
57
|
+
lbl_the_entered_number_format_invalid: 'O valor digitado de número é inválido'
|
58
|
+
msg_the_numeric_format_seems_invalid: 'O formato numérico parece inválido.'
|
59
|
+
lbl_the_number_entered_less_allowable_limit: 'O número digitado é menor do que o limite permitido.'
|
60
|
+
msg_number_too_samll: 'Número muito pequeno.'
|
61
|
+
lbl_the_number_entered_greater_than_allowable_limit: 'O número digitado é maior do que o limite permitido.'
|
62
|
+
msg_number_too_large: 'Número muito grande.'
|
63
|
+
lbl_the_email_is_invalid: 'O e-mail digitado é inválido.'
|
64
|
+
msg_the_email_address_appears_invalid: 'O endereço de email parece inválido.'
|
65
|
+
lbl_url_invalid: 'A URL inputada é inválida.'
|
66
|
+
msg_url_appearse_invalid: 'A URL parece inválida.'
|
67
|
+
lbl_phone_invalid: 'O número de telefone digitado é inválido'
|
68
|
+
msg_phone_appearse_invalid: 'O número de telefone parece inválido'
|
69
|
+
lbl_have_not_correct_answer: 'Não digitou a resposta correta para o enigma.'
|
70
|
+
msg_answer_not_correct: 'A resposta não está correta.'
|
71
|
+
lbl_date_format_invalid: 'O formato de data é inválido.'
|
72
|
+
msg_date_appears_invalid: 'O formato de data parece inválido.'
|
73
|
+
lbl_date_is_earlier_allowable_limit: 'O valor digitado para a data é menor do que o limite permitido.'
|
74
|
+
msg_date_early: 'A data é muito recente.'
|
75
|
+
lbl_date_later_than_allowable_limit: 'O valor de data digitado ultrapassa o limite permitido.'
|
76
|
+
msg_date_too_late: 'A data é muito avançada'
|
77
|
+
lbl_file_upload_failed_some_reason: 'O upload do arquivo falhou por algum motivo.'
|
78
|
+
msg_failed_upload_file: 'Falha no upload do arquivo.'
|
79
|
+
lbl_upload_file_not_valid_format: 'O arquivo que foi feito o upload não está em um formato válido.'
|
80
|
+
msg_invalid_file_format: 'Formato de arquivo inválido.'
|
81
|
+
lbl_uploaded_file_too_large: 'O arquivo que foi feito o upload é muito grande.'
|
82
|
+
msg_file_too_large: 'O arquivo é muito grande.'
|
83
|
+
lbl_file_upload_failed_rails_error: 'O upload do arquivo falhou por falha no servidor Rails'
|
84
|
+
msg_failed_upload_file_was_error: 'Falha no upload do arquivo. Ocorreu um erro.'
|
85
|
+
msg_add_longer_description_field: 'Adicione uma descrição maior para esse campo'
|
86
|
+
label: 'Rótulo'
|
87
|
+
label_required: 'Rótulo obrigatório'
|
88
|
+
placeholder_required: 'Placeholder Obrigatório'
|
89
|
+
list: 'Lista'
|
90
|
+
list_responses: 'Listar respostas'
|
91
|
+
name: 'Nome'
|
92
|
+
name_button: 'Botão do Nome'
|
93
|
+
options: 'Opções'
|
94
|
+
remove_field: 'Remover Campo'
|
95
|
+
remove_option: 'Remover Opção'
|
96
|
+
required: 'Obrigatório'
|
97
|
+
slug: 'Slug'
|
98
|
+
shortcode: 'Shortcode'
|
99
|
+
subject: 'Assunto'
|
100
|
+
title_plugin: 'Formulário de Contato'
|
101
|
+
title_panel:
|
102
|
+
form_details: 'Detalhes do Formulário'
|
103
|
+
to: 'Para'
|
104
|
+
untitled: 'Sem nome'
|
105
|
+
upload_file: 'Upload de Arquivo'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cama_contact_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen Peredo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- config/camaleon_plugin.json
|
63
63
|
- config/initializers/custom_models.rb
|
64
64
|
- config/locales/es.yml
|
65
|
+
- config/locales/pt_br.yml
|
65
66
|
- config/routes.rb
|
66
67
|
- db/migrate/20160517143441_create_db_structure.rb
|
67
68
|
- lib/cama_contact_form.rb
|