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

Quaive app for merge part 3: ploneintranet module #309

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mauritsvanrees
Copy link
Contributor

This builds on PR #308, though technically it could be merged separately.

This adds z3cform widgets for nicely showing in Quaive, adds create and edit forms for the euphorie content, and adds a page used for publishing a survey in Quaive.

Compared with the original quaive-app branch, we have everything needed now. Differences:

  • Removed unused templates/sector_edit.pt, already in the other PR.
  • Removed @@quaive-versions, which was actually no longer used on the Quaive side.
  • Removed Plone 5.2 compatibility code.
  • Added changelog entries.

They are registered for `osha.oira.ploneintranet.interfaces.IQuaiveForm`.
Then we get our special z3cform widgets.
Add accompanying `templates/quaive-form.pt`.
They are called `quaive-create-<portal_type>`, so `quaive-create-euphorie.sector`, etc.
Nothing is actually done, this only displays text.  On the Quaive side, this text is shown with buttons to accompany it.

Originally on the `quaive-app` branch we had `@@quaive-versions` as well, but this was no longer called from Quaive.
This included a button pointing to `@@quaive-unpublish` as well, but this did not exist.
Anyway, both are not needed by Quaive.
@mauritsvanrees mauritsvanrees requested a review from ale-rt January 31, 2025 15:19
Base automatically changed from quaive-app-for-merge-part2 to main January 31, 2025 16:35
Copy link
Member

@ale-rt ale-rt left a comment

Choose a reason for hiding this comment

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

I think this can be merged.
I left some comments for you to check if you want.

<li>
<button class="button-heading-level-2 icon-header"
type="button"
>Header level 2</button>
Copy link
Member

Choose a reason for hiding this comment

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

We are missing some i18n:translate here and in the other buttons, but ok.

<span class="button-field type-url">
<input class="pat-autofocus"
name="tiptap-src"
oninput="if (this.value) { this.nextElementSibling.href = this.value; } else { this.nextElementSibling.removeAttribute('href'); }"
Copy link
Member

Choose a reason for hiding this comment

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

uh?

Comment on lines +1 to +9
_applied = False

if not _applied:
from z3c.form.form import Form

# Zap the totally useless 'There were some errors' message.
Form.formErrorsMessage = None
del Form
_applied = True
Copy link
Member

Choose a reason for hiding this comment

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

I was a bit puzzled about this and found out that it comes from copying the NuPlone folder.

https://github.com/euphorie/NuPlone/blob/05dd2949f0bcdc004ab2a3d4d0cc00bcd0f6675b/plonetheme/nuplone/z3cform/__init__.py#L6

I think wee can remove it:

Suggested change
_applied = False
if not _applied:
from z3c.form.form import Form
# Zap the totally useless 'There were some errors' message.
Form.formErrorsMessage = None
del Form
_applied = True

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.

2 participants