Giter Site home page Giter Site logo

crudforms's People

Contributors

andrehoffmann30 avatar crydotsnake avatar daniellienert avatar pingu501 avatar sebastiansommer avatar skurfuerst avatar thedex avatar

Stargazers

 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

crudforms's Issues

BUG: packageKey dont show up in generateCrudController in console output

Description

Currenty when kickstart the needed files it doesent show the $packageKey in the generateCrudController method.

Screenshot

SCR-20231110-pltq

This is caused by a / which is in the getNamespaceBaseDirectory() method:

return Files::getNormalizedPath($package->getPackagePath() . '/Classes/');

When removing the / the output looks as i would expect it:

SCR-20231110-pokz

I suspect the reason for this is that there is already a / here. And therefore it could not resolve the path correctly.

$this->generatedFiles[] = 'Created .../' . $relativeTargetPathAndFilename;
} else {
$this->generatedFiles[] = 'Omitted .../' . $relativeTargetPathAndFilename;

Routing for generated controller/action

Hey,

just started to play with this package. It seemed to work in the first place. I tried to create a new "element" and it failed with "Route not setup properly".

Which additional routes are required?

Thanks :-)

FEATURE: make form field required in CrudForms\FormField annotation

Description

Currently there is no possibility to set a form field to Required from within the package. It is possible to add the field in the model with the NotEmpty validator from Flow:

/**
 * @Flow\Validate(type="NotEmpty")
 */

However, this does not look really nice afterwards for the editor:

SCR-20231027-oeoy

My Idea

What I was thinking about would be if I could set my field in the model to required directly in the @CrudForms annotation:

/**
 * @CrudForms\FormField(label="Note Title", required=true)
 * @var string
 */
protected $noteTitle;

Then we could add an if condition to the respective editors (/Sandstorm.CrudForms/Resources/Private/Partials/CrudForms/Helpers/Editor). And if the required option is set to true, a hint message is displayed in the backend.

I'm still thinking about how to implement this in the most useful way, or if I might have to implement it differently. If you have feedback, I'm happy about it.

Fixture class breaks functional tests

Running functional tests breaks in the test compile step with:


[Semantical Error] The annotation "@Flow\CompileStatic" in method Sandstorm\CrudForms\Tests\Functional\Fixtures\Controller\AddressController::getEntityClassNameToRepositoryClassNameMapping() was never imported.
Did you maybe forget to add a "use" statement for this annotation?

Fixture Controller breaks functional tests

Running functional tests breaks in the test compile step with:


[Semantical Error] The annotation "@Flow\CompileStatic" in method Sandstorm\CrudForms\Tests\Functional\Fixtures\Controller\AddressController::getEntityClassNameToRepositoryClassNameMapping() was never imported.
Did you maybe forget to add a "use" statement for this annotation?

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.