Git Product home page Git Product logo

suluformbundle's Introduction


Sulu logo


GitHub license GitHub tag (latest SemVer) Test workflow status GitHub commit activity GitHub contributors Packagist downloads


Sulu is a highly extensible open-source PHP content management system based on the Symfony framework. Sulu is developed to deliver robust multi-lingual and multi-portal websites while providing an intuitive and extensible administration interface to manage the full content lifecycle.

Have a look at the official Sulu website for a comprehensive list of Sulu's features, core values and use cases.


Sulu Slideshow


This repository contains the core framework of the Sulu content management system. The framework implements the functionality that is built into the Sulu content management system and therefore is a dependency of all Sulu projects.

If you want to start a new Sulu project, you might be interested in the sulu/skeleton template repository. If you are planning to extend your existing Sulu project, visit the Sulu organization on GitHub for a complete list of official Sulu bundles.

๐Ÿš€ย  Installation and Documentation

The sulu/skeleton repository provides a pre-configured project template to quick-start your development. Visit the official Sulu documentation to find out how to use the project template for starting your own Sulu project.

โค๏ธย  Community and Contributions

The Sulu content management system is a community-driven open source project backed by various partner companies. We are committed to a fully transparent development process and highly appreciate any contributions. Whether you are helping us fixing bugs, proposing new feature, improving our documentation or spreading the word - we would love to have you as part of the Sulu community.

๐Ÿ“ซย  Have a question? Want to chat? Ran into a problem?

We are happy to welcome you in our official Slack channel or answer your questions via GitHub Discussions! Obviously you can always reach out to us directly via the Sulu twitter account or post your question on StackOverflow with the official sulu tag.

๐Ÿคย  Found a bug? Missing a specific feature?

Feel free to file a new issue with a respective title and description on the the sulu/sulu repository. If you already found a solution to your problem, we would love to review your pull request! Have a look at our contribution guidelines to find out about our coding standards.

โœ…ย  Requirements

Sulu requires a PHP version higher or equal to 8.2 and is compatible with every Symfony version starting from 5.4. Have a look at the require section in the composer.json of the sulu/sulu core framework to find an up-to-date list of the requirements of Sulu content management system.

๐Ÿ“˜ย  License

The Sulu content management system is released under the under terms of the MIT License.

suluformbundle's People

Contributors

alexander-schranz avatar chirimoya avatar cirykpopeye avatar codebarista avatar danrot avatar datenwerk-at avatar dev-newvisibility avatar dominikmatt avatar draganmilijasevic avatar etidimjav avatar floriankoerner avatar henri9813 avatar kleinkoerkamp avatar luca-rath avatar mamazu avatar manuxi avatar markusmoosbrugger avatar martinlagler avatar niklasnatter avatar opctim avatar plozmun avatar prokyonn avatar quehnie avatar raphaelhofer avatar rflorent avatar rs2487 avatar thomasduenser avatar tschannettm avatar tvwijgerden avatar wachterjohannes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar

suluformbundle's Issues

Rename placeholder to example

Since the placeholder shouldn't be used as placeholder, rename the field Placeholder to Example. It should be used as example field under the form-field like:

Label
Input
Example

Don't miss to add a documentation for the usage if the field should have a placeholder (use the title field as placeholder-item - in case of the required attribute)

bildschirmfoto 2017-03-15 um 14 15 23

Mandatory field on checkboxes

If i create a form field with checkboxes and set it as mandatory-field, nothing happens. The fields aren't declared as required.

Please remove the mandatory field marker from the checkboxes or set the attribute to every checkbox in checkboxes.

Make dynamic entity blameable

If you use the form bundle with the community bundle it is nice to know the user ID of the user which filled the form.

DateType widget 'single_text'

                DateType::class,
                [
                    'widget' => 'single_text',
                    'format' => 'dd/MM/yyyy',
                    'html5' => false,
                    'attr' => [
                        'placeholder' => 'form.possible_work_beginning',
                        'class' => 'js-datepicker'
                    ],
                    'required' => false,
                    'error_bubbling' => true,
                ]

Include a Mailsubsriber to handle dynamic forms

Backend for CC and BCC mail receivers

  • Move form fields to top
  • Add new block with 2 Types (CC, BCC) and email and name field
  • Create FormTranslationEmails entity
  • FormManager handle save
  • Configuration to activate this feature
  • Configuration to set a mail template
    mail:
       cc: # canBeEnabled
       notify_template: "..."
       customer_template: "..."

Website

  • DynamicFormType deactivate here the default mails
  • MailSubscriber service ( listen to DynamicFormSaved event )
    • send Notify Emails with CC and BCC
    • send Customer Emails

Archive Form Data

when you use a page multiple times for a form you should be able to archive old data.

Split form builder form structure

Currently only the formName is sent via the request all other data are read from the structure directly. https://github.com/alexander-schranz/sulu-form-bundle/blob/develop/Form/Builder.php#L81-L117

$id = FormId
$type = e.g. page, event, blog,
$typeId = e.g. pageUuid, blog id, event id
$typeName = e.g. pageTitel, blog titel
$locale = request.locale
$name = formName

To create the form only the formId, name and locale should be needed.
To save the form formId, locale, type, typeId should be needed.
For the media collection tree strategy also the typeName is needed to create a collection with the same name as the page.

Deactivate requestanalyzer for website action

The controller need to deactivate the requestAnalyzer to work correctly:

e.g.:

sulu_form.token:
    path: /form/token
    defaults: { _controller: SuluFormBundle:FormWebsite:token, _requestAnalyzer: false }

Also the ESI need to be called with _requestAnalyzer: false as attribute.

TODO:

  • Update documentation render_esi
  • Update website routing.yml

When not doing this the preview will not work correctly on pages with localization as folder.

Submitbutton Type

To have multiple submit buttons in the form add a new submit button type.

Group types in the dropdown

The dropdown with all available types should be grouped.

e.g.:

  • Text Types
    • Firstname
    • Lastname
    • ...
  • Complex Types
    • Checkbox
    • Select
  • Special Types
    • Attachment
    • Mailchimp
    • Recaptcha
  • Additional Types
    • Headline
    • FreeText
    • Spacer

Add text for notify email

The notify email should have also the possibility of adding a text e.g. when the form creator is not the receiver of the email.

Default theme

Add a form theme based on the form_div_layout.html.twig that it works without create a custom form theme.

Autofill api for logged in users

If you use the form bundle with the community bundle or other. It should be able to activate a autofill API. This should be a json api which autofill the form by an ajax request. JS need to be included by the user itself.

Only activatable by flag and need to configure which fields should be return because high risk of privacy!

Migration script for older versions

The https://github.com/alexander-schranz/sulu-form-bundle 1.0 release should be migrate able to 0.1 of this repo.

TODO

Table Names:

  • l91_fo_dynamic -> fo_dynamics
  • l91_fo_form -> fo_forms
  • l91_fo_form_translations -> l91_fo_form_translations
  • l91_fo_form_fields -> fo_form_fields
  • l91_fo_form_field_translations -> fo_form_field_translations
RENAME TABLE `l91_fo_dynamic` TO `fo_dynamics`;
RENAME TABLE `l91_fo_form` TO `fo_forms`;
RENAME TABLE `l91_fo_form_field_translations` TO `fo_form_field_translations`;
RENAME TABLE `l91_fo_form_fields` TO `fo_form_fields`;
RENAME TABLE `l91_fo_form_translations` TO `fo_form_translations`;

Other changes:

  • CSRF Token include

Integrate Form-Select into blocks

It will be nice to integrate the form-select content-type into blocks.
Currently one single form in blocks will work but data will not be visible in the Formula-Tab.

Refractoring Bundle structure and form process

Here I describe the whole refractoring which is needed before the first release to avoid future bc breaks:

Structure

  • Admin
    • FormAdmin.php
    • FormNavigationProvider.php
    • DynamicListNavigationProvider.php ( new )
    • StaticListNavigationProvider.php ( rename )
  • Content
    • Types
      • FormSelect.php
  • Controller
    • FormController.php
    • FormWebsiteController.php
    • StaticController.php ( renamed )
    • DynamicController.php ( new )
  • DependencyInjection
    • CompilerPass
      • StaticListProviderCompilerPass.php ( rename )
      • DynamicListBuilderCompilerPass.php ( new )
      • DynamicFormFieldTypeCompilerPass.php ( new )
    • Configuration.php
    • SuluFormExtension.php
  • Dynamic
    • FormBuilder.php ( new )
    • FormBuilderInterface.php ( new )
    • FormFieldTypePool.php ( new )
    • FormFieldTypeInterface.php ( new )
    • Types
      • ...
  • Entity
    • Dynamic.php
    • Form.php
    • FormEmail.php ( new )
    • FormEmailTranslation.php ( new )
    • FormField.php
    • FormFieldTranslation.php
    • FormRepository.php ( moved )
    • FormTranslation.php
  • Event
    • Listener
      • RequestListener.php ( moved )
    • Subscriber
      • MailSubscriber.php ( new )
      • MailchimpListSubscriber.php ( moved )
      • FormSubmitSubscriber ( new )
    • FormValidateEvent.php ( new )
    • FormSubmitEvent.php ( new )
    • FormSavedEvent.php ( renamed )
  • Form
    • Type
      • AbstractType.php ( remove )
      • DynamicFormType ( refractor )
      • SuluMediaType ( new )
    • FormHandler.php ( refractor )
    • FormLoader.php ( new )
  • ListBuilder
    • DynamicListBuilder.php ( new )
    • DynamicListBuilderInterface.php ( new )
    • DynamicListFactory.php ( new )
    • DynamicListFactoryInterface.php ( new )
    • StaticListBuilder.php ( renamed (moved provider) )
    • StaticListFactory.php ( renamed (moved provider) )
  • Mail
    • SwiftMailerHelper.php ( renamed )
    • NullMailerHelper.php ( renamed )
    • MailerHelperInterface.php ( renamed )
  • Manager
    • FormManager.php
  • Media
    • CollectionStrategyInterface.php
    • CollectionTreeStrategy.php ( new default )
    • CollectionSingleStrategy.php
  • Resources
    • ...

FormBuilder

Main part is the Form builder what is needed to create a dynamic form.

  • Form ID
  • Type
  • TypeId
  • TypeName
  • Locale (optional)
  • Name (optional default "form") (needed when have multiple forms)

Dynamic Entity

  • uuid -> typeId
  • new type (default is "page")
  • new typeName (default is structure title)

Sketch

img_20161126_151337

TODOs

Exist issues and PRs:

  • #4 Dynamic Form Field Pool
  • #17 Include Mail Subscriber
  • #24 Split form from Structure

Mandatory field on select

It's a issue in case of "bug" from symfony2 form theme.

If we have marked a select field (salutation) as mandatory field, symfony2 removes the required attribute from select (because no default option with empty value exist).
In this case the select field wouldn't be marked as required - only the label will be marked as required.

It isn't a important issue.

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.