[jifty-devel] Multiple-choice with checkbox

Ruslan Zakirov ruslan.zakirov at gmail.com
Fri Sep 4 15:10:19 EDT 2009


Hello Stanislav,

May be I was not clear enough. I was not talking about multiple groups
of checkboxes, but only about a selector widget that allows user
select one or several values for an argument of the action. We can
render such selector widget in different ways, for example it can
<select>, set of radio buttons, set of checkboxes to allow user select
multiple values, it can be combobox to allow user type alternative
value, it can checkboxes with text input for alternative. For you as
developer there should be no difference between them, you picked
multi-select, but then decided that checkboxes are better and you just
switch renderer and code just works.

About your code:
* MultiChoice is bad name. You say that you prefer elementary
functionality then it should be named Checkbox. Checkbox is the way to
allow people choose multiple values, otherwise radio buttons should be
used.
* ::Radio, ::Select and other don't wrap widget into a div and you shouldn't too
* probably you shouldn't wrap each element into a div, but span

What I don't like is Zoo and hope you understand that it's more
pleasant to work with consistent and predictable enviroment.


On Fri, Sep 4, 2009 at 7:52 PM, Stanislav Sinyagin<ssinyagin at yahoo.com> wrote:
> hi Ruslan,
>
> I think your proposal is a bit orthogonal to what is implemented now. Each of
> the Form::* classes implement some elementary form input, so I would prefer having
> it the same way.
>
> Also multiple checkboxes need a bit of different indentation, so that one could recongize a group.
>
> Here's a first draft of the new module. I'm not sure yet the default_values work correctly:
> http://pastebin.com/m599d2e1d
>
> regards,
> stanislav
>
>
>
>
> ----- Original Message ----
>> From: Ruslan Zakirov <ruslan.zakirov at gmail.com>
>
>> ::Form::Choice with the following properties: look => {Dropdown,
>> List}, multiple => {0, 1}, alternative => {0, 1}.
>>
>> This widget can delegate to particular implementation depending on properties:
>>
>> Dropdown => Select
>> Dropdown, alternative => Combobox
>> List => Radios
>> List, multiple => Checkboxes
>> ...
>>
>> As you can see it requires more work, but you can implement only what
>> you need and live some combinations not implemented. For example
>> radios with alternative may look like this:
>>
>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>



-- 
Best regards, Ruslan.


More information about the jifty-devel mailing list