Coder Social home page Coder Social logo

tallence / core-forms Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 13.0 1 MB

A simple and lean formeditor for the CoreMedia CMS.

License: Apache License 2.0

Java 47.64% FreeMarker 0.06% HTML 1.13% SCSS 0.47% JavaScript 0.21% TypeScript 50.49%
coremedia formengine forms

core-forms's People

Contributors

dependabot[bot] avatar fabitusjanhendrikpopp avatar fleffler-tallence avatar fwienber avatar jsiewert avatar mgoellnitz avatar peter-mauritius avatar phempten avatar sbuettne avatar svkroschwald avatar tallencejanhendrikpopp avatar winniae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core-forms's Issues

Studio API Change CM9

Hi, ich habe den Form Editor auf CM9 1804.1 integriert und bekomme einen Fehler, wenn ich das Studio Plugin baue.
Anscheinend gibt es enableFocusableContainer nicht mehr, habe es durch das Property focusableContainer ersetzt. Kenne mich leider zu wenig aus um zu wissen was es ausmacht 8 )

NPE in FormController

if you submit a form with some bogus content ids you will get the following npe:

2020-07-24 03:50:11 - [ERROR] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/blueprint].[dispatcherServlet] [] - Servlet.service() for servlet [dispatcherServlet] in context with path [/blueprint] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause (http-nio-42180-exec-11) java.lang.NullPointerException: null
at com.tallence.formeditor.cae.FormFreemarkerFacade.parseFormElements(FormFreemarkerFacade.java:48)
at com.tallence.formeditor.cae.handler.FormController.getFormElements(FormController.java:161)
at com.tallence.formeditor.cae.handler.FormController.socialFormAction(FormController.java:100)
...

the FormEditor object is null in that case

Adding a new element: consent form checkBox

This might be useful in many cases especially for the requirements related to gdpr.
The element should render a CheckBox and an explanation text + an optional link.
The field can be mandatory

2301.1 compatible: Invalid property type names

Hi, I am integrating core-forms-cmcc-11-2301.1.tar.gz into a workspace with cm11 2301.1 and a postgresql 42.5.1 database for the repository. After adding the extension and starting the content-server, I get the following error:

content-management-server | [ERROR] (Init Process) hox.corem.server.Server [] - Cannot startup due to malformed document type definition: Invalid names in document type definition: spamProtectionEnabled, reason is: Invalid property type name: spamProtectionEnabled, aborting

The Content Server Manual, 4.1. states:

Caution

The name can have a maximum length of 18 characters (DateProperty field names only 15 characters) and must not contain umlauts or other special characters ("§", "&", ...). Two fields in a content type different only in upper or lower case are not allowed. Furthermore, a name's last character must not be an underscore, since these field names are reserved for CoreMedia.

"spamProtectionEnabled" is 21 chars long, "pageableFormEnabled" 19 chars, which is too long in both cases. This may work with some databases, but apparently not with postgresql.

As a workaround, I am changing them locally to "spamProtection" and "pageable", since the "Enabled" is implicated in the boolean value... (Replace all in project, preserve case: spamProtectionEnabled -> spamProtection,, pageableFormEnabled -> pageable, don't forget to rebuild studio-client after change - no longer integrated with maven)

Studio build in version 2201.2.0 not work

Error: Cannot handle multiple versions of the same package in one workspace! Please check dependencies.

core-forms\apps\studio-client\apps\main\form-editor-studio-plugin\package.json
core-forms\apps\studio-client\shared\js\form-editor\package.json

needs Coremedia-Version 2201.2.0 and jangaroo-Version 1.1.1

Should form data send via (html) email be escaped?

Should serializeValue() escape Strings that are submitted to the system before sending it out via email?

Just honestly wondering if this is a real issue and if yes where to deal with it. I tested submitting a textfield with html formatted text (<hr>, <a href="test.com">bla</a>) and the (html) email that came back to me, where I just dump the string from serializeFormElements(...) had those elements formatted. Thus I thought huh, someone might put malicious stuff in there and trick my admins/editors receiving the same mail.

I was thinking that serializeValue() for every FormElement should take care to escape the value, since this method is specifically there to serialize for Email usage.

I would probably store the data un-escaped in my DB and deal with escaping when rendering the info on my administration view.

edit: hm lol have to explicitly escape my examples here.. (does that mean it's generally harmless? or does github filter html that's a non-issue..)

Handle options texts with dots

Based on the workaround in 3082794

Option of a fields with options (e.g. RadioButton) are serialized in the struct-property in this way:

  • The options displayName is used as the name of the structProperty
  • The default-behaviour-CheckBox and the optional technicalValue of an option are serialized as Boolean- and String-Properties, below the struct-Property

This has historical reasons and is obviously not good: The options displayValue might contain a lot of characters and (which is the worst) might contains dots. This will lead to a bug: the whole option cannot be edited anymore.

A quick solution could be: Escaping the dot
A better solution would be: serializing the displayName in a stringProperty. The old structure must still be readable, otherwise each project has to perform a content-migration...

Studio-client Versions don't match coremedia versioning (no minor version)

Hello @timolemke .

First of all, thanks for your great work and for providing this cool extension in 2301.1 already.

I've tried to merge your current master branch into our project-specific clone and got some merge conflicts regarding the version numbers.

CoreMedia upstream uses version number without minor versions (e.g. 2301.1) for maven dependencies, but with minor versions (e.g. 2301.1.0) for studio modules.

Example:
from https://github.com/tallence/core-forms/blob/master/apps/studio-client/shared/js/form-editor/package.json:

"@coremedia/studio-client.base-models": "2301.1"

vs. https://github.com/coremedia-contributions/coremedia-blueprints-workspace/blob/cmcc-11-2301/apps/studio-client/apps/main/blueprint-forms/package.json:

"@coremedia/studio-client.base-models": "2301.1.0"

What's the idea behind it? Why are you using shorter version numbers than coremedia. Does this work in your environment?

Width of a formularelement in Studio increases when the CollapsiblePanel is expanded

When expanding the collapsiblePanel of a FormElement the width of the collapsiblePanel might increase. The browser reacts with inserting a horizontal scrollBar into the area with applied formElements. which is not wanted here.

This seems to happen, when there are some more applied formElements which increases the height of the area of applied formElements so that a vertical scrollBar is visible.

See this screenshot:
selection_002

Command to enable extension uses wrong parameter

The Maven command to enable the extension uses the wrong parameter. Instead of -Denable=formeditor-extension it needs to use the folder name used for the git submodule initialization, i.e. -Denable=core-forms

Migration to 18.07

The extension has to be migrated to the latest CM version, currently: 18.07

Unit Test for the FormController

There is no Unit Test for the com.tallence.formeditor.cae.handler.FormController.
It can use the already setUp Test infrastructure used for the FormElementFactory Test

Handling of GDRP data

I wonder if we should add some kind of mechanism to prevent form data from ever being logged (for compliance reasons, if a users needs/wants that).

Multi-Page Dependencies

Dependant Fields are currently restricted to the scope of a single page: a field can be shown depending on another fields value, only if the other field is placed on the same page.

It would be better to remove this restriction as there are many use cases for it.

It would also be nice to be able to make the visibility of pages depend on fields. It would enable editors to hide or show a complete page only if a specific choice was made by the user in the form.

Remove manifest.xml

As described here, the manifest.xml is only needed for components which expose as an API to other components. This is not required for this extension -> the manifest.xml can be removed.

See: #9 the comment of @fwienber

Proper handling of option changes for dependant fields

Based on the workaround in 9997d73
If an options technical- or displayValue changes, the potential dependant field config of another formElement must be updated accordingly!

The problem:

  • A dependant field might reference another field with options (e.g. RadioButtons). If so, it will be visible, if the referenced fields value matches exactly the value which was configured in the dependant field.
  • If the options technical- or display-Value of the referenced field is changed by the editor, but the dependant field is not updated, the dependantField will never be shown in the frontend, because the required value cannot be selected by the user.

Typo in german Studio form

In the german form in the tab "Formular Konfiguration" the property group "Formlar-Ziel" is misspelled.

Sort different Types of Input-Fields after 'Field' context.

It would be helpful if there was an contextual sorting of input fields.
Text and number are already there but alphabetically sorted they are in different places in list.
It would be more simple to use if every kind of field was sorted together.

My proposal:

  • Field - Text
  • Field - Number
  • Field - EMail
  • Field - Phone
    … etc.

So maybe you could sort it after context "field" to have it more easy to find the right component in list. (Especially if the list is getting longer with next versions, hopefully. ;-) )

Thank you very much.

2401.2 Unit Test Problems

Mit der Umstellung auf Java Configuration anstelle der XML Konfiguration sind die Unittests kaputtgegangen. In diesen wird noch das component-forms.xml referenziert:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.