Giter Club home page Giter Club logo

Comments (5)

core23 avatar core23 commented on June 18, 2024

The idea was to define all form related inputs (and buttons) inside the php classes. So you just need to call form_widget(form) inside the template to render the whole form. The form rendering will also respect the current form theme (e.g. bootstrap) so you don't need any special handling for the form button when changing the theme.

I know that there is a symfony best practice for forms but they are talking about reusable forms. The login form should not be used inside an other application context.

from nucleosuserbundle.

fkrauthan avatar fkrauthan commented on June 18, 2024

I guess that makes sense. Even though I would assume most people will have there fully custom login theme where anything beyond the minimal required fields can be annoying.

from nucleosuserbundle.

core23 avatar core23 commented on June 18, 2024

There are some other hacks if you don't want some form elements:

{% set foo = form['some_field'].setRendered() %}
{% set foo %}{{ form_widget(form.someField) }}{% endset %}

I will leave the button element inside the PHP code for the given reasons, sorry.

from nucleosuserbundle.

fkrauthan avatar fkrauthan commented on June 18, 2024

Yeah that's fair. To be quiet honest for my immediate project I moved to a fully custom authentication system. But I will keep an eye on this project for potential future projects.

from nucleosuserbundle.

core23 avatar core23 commented on June 18, 2024

IMHO the new symfony security system (in combination with the MakeBundle) solves most of the basic auth stuff that is part of the FOSUserBundle and this bundle. This bundle is for the lazy people ;)

from nucleosuserbundle.

Related Issues (20)

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.