Giter Club home page Giter Club logo

fieldset's Introduction

FuelPHP

Description

FuelPHP is a fast, lightweight PHP 5.4+ framework. In an age where frameworks are a dime a dozen, we believe that FuelPHP will stand out in the crowd. It will do this by combining all the things you love about the great frameworks out there, while getting rid of the bad.

FuelPHP is fully PHP 7.3 compatible.

More information

For more detailed information, see the development wiki.

Development Team

Want to join?

The FuelPHP development team is always looking for new team members, who are willing to help lift the framework to the next level, and have the commitment to not only produce awesome code, but also great documentation, and support to our users.

You can not apply for membership. Start by sending in pull-requests, work on outstanding feature requests or bugs, and become active in the #fuelphp IRC channel. If your skills are up to scratch, we will notice you, and will ask you to become a team member.

Alumni

fieldset's People

Contributors

elvenspellmaker avatar qweqq avatar sagikazarmark avatar wanwizard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fieldset's Issues

Toggle groups have same ids

Individual toggle groups are rendered with the same ID. This needs to be updated to append the value to ensure IDs do not clash.

Be able to assign meta data to inputs

Add another container to the InputTrait to be able to assign meta information. An example use of this would be to pass validation rules or possibly config options for a renderer to apply to a specific input object.

Legacy

Shouldn't this file go to the legacy package?

Option: label or content?

It is unclear whether setLabel() or setContent() (which is set by the constructor by default) should be used as the label of Option element.

Helper class/function to create shortcuts

Eg:

<?php
//Create the select element
$select = new Select();

$select[] = new Option()->setContent('red');
$select[] = new Option()->setContent('green');
$select[] = new Option()->setContent('black');

$optGroup1 = new Optgroup();

$optGroup1[] = new Option()->setContent('one');
$optGroup1[] = new Option()->setContent('two');
$optGroup1[] = new Option()->setContent('three');
$select[] = $optGroup1;

would become

<?php
Helper::generate('select', array(
  'attributes' => array(...),
  'options' => array(
    'red', 'green', 'black',
    array( 'one', 'two', 'three')
));

Todo list

  • Cleaning up duplicated code
  • Getting test coverage up
  • Logical restructure of elements #33
  • Improve bootstrap renderer #23
  • Cleaning up Builder (interface)

Select setValue

IMO calling setValue on select should deselect all the earlier selected values.

The current problem it occured: in the ModelProvider I showed on IRC first sets the default value. When I repopulate the form, the selected value does not override the default one.

I also think that it should be possible to determine whether an Option is selected or not. IMO this would be better on this line:

$attributes['selected'] = 'selected';

This also makes it super easy to deselect an item.

Optgroup label

Optgroup is special in it's label. I think it usually has a label, so probably a constructor should ask for it.

V1Model builder accept properties array

Currently V1Model builder only accepts a model name and fetches the properties itself. IMO it would be better to be able to pass a properties array, so any custom modifications are possible before building the form.

Logical restructure of elements

There is a strange thing in list of elements, namely all of them are called "Input", but actually almost half of them are not. (I am referring to an element rendering into an input tag or not)

So I propose the following change: Rename the Input directory to Element and create an Input dir under it and move all real Input elements under it (with the necessary namespace changes of course).

Also, the inheritance should also respect this structure, eg. InputElement should only be used for real input elements.

Select field constructor

There is no constructor in select field, which means the usual fieldname, attributes, default value call is impossible. There should be a constructor overriding the DataContainer's. And I think it is more important to be able give in field attributes instead of Options.

General interface

There should be a general interface that is implemented by ALL fields. Currently there is no such thing.

Improve Bootstrap renderer

Update the bootstrap renderer to use the metadata to turn features on an off like button type and if the element is contained in a full span div or not.

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.