Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tup-308): working form plugin (aka tup-230) #498

Merged
merged 33 commits into from
Jul 15, 2022

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Jun 9, 2022

Overview

Update and configure form plugin to work.

Related

Changes

  • install django-recaptcha
  • replace djangocms-forms with djangocms-forms-maintained
  • isolate and document form plugin settings
  • extend c-button styles (just a little)
  • style form elements (generic and plugin-specific)
  • load jQuery with AJAX (to support form)
  • sample code to customize captcha
  • add required url entry
  • add Frontera colors* for primary button

* I use Frontera colors only until we have standard form design. M.S. knows he has this task, and has screenshots to work know what all needs to be designed.

Testing

Remote Test Pages:

Create, Edit, Use:

  1. (Optional) Create form plugin instance. While editing form:
  2. Submit form—see success message.2
  3. Submit form again—see success message.2
  4. Edit form plugin instance.
    • Add SPAM PROTECTION3
  5. Submit form—see success message.2
  6. In "Site administration", open "Form submissions".
  7. Confirm your submissions are there.

Administration:

  1. View submissions in admin "Form submissions".
  2. Export CSV and JSON from admin "Form submissions".

UI

Forms on Servers To Which I Deployed
local core frontera apcd
local core frontera apcd

Footnotes

  1. E-mail feature is delayed until I have bandwidth to research it and configure or fix it.

  2. The success message, for editors only, is at the top center of screen white on black (a .cms_message). This does not happen when a user submits, or while editor is seeing it as "View published". 2 3

  3. There should only be options "None" and "Recaptcha"; choose "Recaptcha".

@wesleyboar wesleyboar marked this pull request as draft June 9, 2022 17:53
The django-forms(-maintained) plugin expects jquery with ajax features.

Our CMS was using a slim build of jQuery.

The size difference is 17KB, which I consider negligible.
- less changes form original
- sometimes the original html was better for styling
Pointer file mimics what I do for blog CSS, which is also in source.
@wesleyboar wesleyboar changed the title feat(tup-230): working form plugin feat(tup-308): working form plugin (aka tup-230) Jul 6, 2022
- bigger gap between single checkbox and input
- add gap between multiple checkbox and input
- align multiple checkbox and input
- simpler, less specific checkbox label selector
- remove undesired label margin*

* This style was ineffectual—good—in 3.6, but "fixed"—bad—when ported.
- limit which help text gets margin
- remove ineffectual, unnecessary margin removal
- bigger gap between single checkbox and input
- align single checkbox and input
- add gap between multiple checkbox and input
- align multiple checkbox and input
- remove label margin on last of multiple checkboxes/radios
- simpler, less specific checkbox label selector
- remove undesired label margin*

* This style was ineffectual—good—in 3.6, but "fixed"—bad—when ported.
@wesleyboar wesleyboar force-pushed the task/tup-230-make-form-plugin-work branch from ba992c8 to 803c354 Compare July 7, 2022 01:38
…Core-CMS into task/tup-230-make-form-plugin-work
@wesleyboar wesleyboar marked this pull request as ready for review July 7, 2022 02:51
pyproject.toml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
wesleyboar and others added 3 commits July 6, 2022 22:14
@wesleyboar wesleyboar force-pushed the task/tup-230-make-form-plugin-work branch from 34f51d6 to 07e1fab Compare July 8, 2022 20:07
- remove unedited cloned template
- update commit in a comment
I forgot to delete this file earlier.
The removal happens form a merged PR on the plugin:
avryhof/djangocms-forms#12
Copy link
Member Author

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New Since #500

wesleyboar added a commit that referenced this pull request Jul 11, 2022
package.json Outdated Show resolved Hide resolved
wesleyboar added a commit that referenced this pull request Jul 12, 2022
This is needed for buttons to appear right on CMS.

Source: #498
Copy link
Member

@rstijerina rstijerina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rstijerina rstijerina requested a review from taoteg July 14, 2022 19:11
Copy link
Collaborator

@taoteg taoteg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM codewise. I'll go test the deployed forms as well.

@wesleyboar wesleyboar merged commit f65d0c4 into main Jul 15, 2022
@wesleyboar wesleyboar deleted the task/tup-230-make-form-plugin-work branch July 15, 2022 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants