Skip to content

Commit

Permalink
Merge pull request #8 from collective/feat_hcaptcha_integration
Browse files Browse the repository at this point in the history
Refactor hcaptcha integration and form components
  • Loading branch information
nzambello authored Aug 20, 2021
2 parents dc6c34c + 0c98433 commit 76ce1b3
Show file tree
Hide file tree
Showing 22 changed files with 409 additions and 275 deletions.
4 changes: 2 additions & 2 deletions .editorConfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[{*.css,*.scss}]
[{*.css,*.scss,*.less}]
indent_size = 4

[{*.js,*.json}]
indent_size = 2
indent_size = 2
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ For select, radio and checkbox fields, you can select a list of values.
This form addon is configured to work with [HCaptcha](https://www.hcaptcha.com) and [ReCaptcha](https://www.google.com/recaptcha/) to prevent spam.
In order to make one of these integrations work, you need to add an enviroment variable with the key `RAZZLE_HCAPTCHA_KEY` or `RAZZLE_RECAPTCHA_KEY` and the value of the key in your `.env` file.

### HCaptcha

With HCaptcha integration, you also get an additional option in the sidebar to enable or disable the invisible captcha (see implications [here](https://docs.hcaptcha.com/faq#do-i-need-to-display-anything-on-the-page-when-using-hcaptcha-in-invisible-mode)).

## Export

With backend support, you can store data submitted from the form.
Expand Down
8 changes: 8 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
8 changes: 8 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr "Use as 'reply to'"
msgid "form_useAsReplyTo_description"
msgstr "If selected, this will be the address the receiver can use to reply."

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr "Invisible captcha"

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr "See https://docs.hcaptcha.com/faq#do-i-need-to-display-anything-on-the-page-when-using-hcaptcha-in-invisible-mode"

#: components/Sidebar
msgid "title"
msgstr "Title"
8 changes: 8 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
8 changes: 8 additions & 0 deletions locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
8 changes: 8 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
8 changes: 8 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr "Usa come 'reply to'"
msgid "form_useAsReplyTo_description"
msgstr "Se selezionato, questo sarà l'indirizzo a cui il destinatario potrà rispondere."

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr "Captcha invisibile"

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr "Leggi https://docs.hcaptcha.com/faq#do-i-need-to-display-anything-on-the-page-when-using-hcaptcha-in-invisible-mode"

#: components/Sidebar
msgid "title"
msgstr "Titolo"
8 changes: 8 additions & 0 deletions locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
8 changes: 8 additions & 0 deletions locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
8 changes: 8 additions & 0 deletions locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
33 changes: 20 additions & 13 deletions locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: Plone\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27T19:30:59.079Z\n"
"PO-Revision-Date: 2021-05-11 19:03-0300\n"
"PO-Revision-Date: 2021-08-19 20:14+0200\n"
"Last-Translator: Érico Andrei <ericof@plone.org>, 2021\n"
"Language: pt_BR\n"
"Language-Team: Portuguese (https://www.transifex.com/plone/teams/14552/pt/)\n"
Expand All @@ -15,9 +15,9 @@ msgstr ""
"Language-Name: Português do Brasil\n"
"Preferred-Encodings: utf-8\n"
"Domain: volto\n"
"X-Generator: Poedit 2.4.3\n"
"X-Generator: Poedit 3.0\n"

#: components/Edit
#: components/Edit
msgid "Add field"
msgstr "Adicionar campo"

Expand All @@ -35,11 +35,11 @@ msgstr "Formulário"

#: components/Sidebar
msgid "description"
msgstr ""
msgstr "descrição"

#: components/Form
msgid "formSubmitted"
msgstr " Formulário enviado com sucesso"
msgstr "Formulário enviado com sucesso"

#: components/Sidebar
msgid "form_attachment_info_text"
Expand All @@ -65,8 +65,7 @@ msgstr "Este endereço será utilizado como o remetente do e-mail com os dados d
msgid "form_default_subject"
msgstr "Assunto do e-mail"

#: components/Edit
#: components/FormView
#: components/Edit components/FormView
msgid "form_default_submit_label"
msgstr "Enviar"

Expand Down Expand Up @@ -104,7 +103,7 @@ msgstr "Nome"

#: components/Sidebar
msgid "form_field_name_description"
msgstr "O nome deve conter espaços e só pode conter caracteres alfanuméricos além dos caracteres "-" e "_". O nome é igual ao nome do parâmetro."
msgstr "O nome deve conter espaços e só pode conter caracteres alfanuméricos além dos caracteres '-' e '_'. O nome é igual ao nome do parâmetro."

#: components/Sidebar
msgid "form_field_required"
Expand Down Expand Up @@ -132,19 +131,19 @@ msgstr "E-mail"

#: components/Sidebar
msgid "form_field_type_multiple_choice"
msgstr ""
msgstr "Múltipla escolha"

#: components/Sidebar
msgid "form_field_type_select"
msgstr "Opções"

#: components/Sidebar
msgid "form_field_type_single_choice"
msgstr ""
msgstr "Escolha única"

#: components/Sidebar
msgid "form_field_type_static_text"
msgstr ""
msgstr "Texto estático"

#: components/Sidebar
msgid "form_field_type_text"
Expand Down Expand Up @@ -192,8 +191,16 @@ msgstr "Utilizar como 'responder para'"

#: components/Sidebar
msgid "form_useAsReplyTo_description"
msgstr "Usar este campo como valor do cabeçalho de "responder para""
msgstr "Usar este campo como valor do cabeçalho de 'responder para'"

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr "Captcha invisível"

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr "Leia mais em https://docs.hcaptcha.com/faq#do-i-need-to-display-anything-on-the-page-when-using-hcaptcha-in-invisible-mode"

#: components/Sidebar
msgid "title"
msgstr ""
msgstr "título"
8 changes: 8 additions & 0 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
msgid "title"
msgstr ""
10 changes: 10 additions & 0 deletions locales/volto.pot
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ msgstr ""
msgid "form_useAsReplyTo_description"
msgstr ""

#: components/Sidebar
# defaultMessage: Invisible captcha
msgid "invisible_hcaptcha"
msgstr ""

#: components/Sidebar
# defaultMessage: See https://docs.hcaptcha.com/faq#do-i-need-to-display-anything-on-the-page-when-using-hcaptcha-in-invisible-mode
msgid "invisible_hcaptcha_desc"
msgstr ""

#: components/Sidebar
# defaultMessage: Title
msgid "title"
Expand Down
Loading

0 comments on commit 76ce1b3

Please sign in to comment.