One more thing.

I want to use a radio button on the discuss form:

(0) invite to submit an ICLA only
(0) invite to become a committer only
(0) invite to become a PMC member only
(0) invite to become a committer and PMC member

The vue control looks like:

<input type="radio" id="one" value="One" v-model="picked">
<label for="one">One</label>
<br>
<input type="radio" id="two" value="Two" v-model="picked">
<label for="two">Two</label>
<br>
<span>Picked: {{ picked }}</span>

What is the mapping to create a radio button? 

> On Dec 17, 2017, at 10:46 AM, Craig Russell <apache....@gmail.com> wrote:
> 
> 
>> On Dec 16, 2017, at 6:34 PM, Sam Ruby <ru...@intertwingly.net> wrote:
>> 
>>> The code in the existing main.rb in get '/invite' sets several variables 
>>> that will be useful in discuss and vote. DRY says this code should only be 
>>> in one place. How can variables be shared among multiple get and post paths?
>> 
>> Two basic approaches come to mind.  In the roster tool, there is code
>> in the models directory that return hashes.  Also in
>> www/roster/main.rb, you can find a helper that is called by multiple
>> views.
> 
> What I'm trying to do is to get the @pmcs and @ppmcs variables sent to the 
> view from discuss, vote, and invite. The roster example shows no variables 
> outside the do... end blocks. The code to calculate these is simple but not 
> trivial. 
> 
> So would you recommend doing the calculation in the common code and setting 
> the @variables in the do... end block. E.g.
> 
>  pmcs = ASF::Committee.pmcs.map(&:name).sort
>  ppmcs = ASF::Podling.list
>    .select {|podling| podling.status == 'current'}
>    .map(&:name).sort
> 
> get '/discuss' do
>  @view = 'discuss'
>  @pmcs = pmcs
>  @ppmcs = ppmcs
>  _html :app
> end
> 
> get '/vote' do
>  @view = 'vote'
>  @pmcs = pmcs
>  @ppmcs = ppmcs
>  _html :app
> end
> 
> Craig L Russell
> Secretary, Apache Software Foundation
> c...@apache.org http://db.apache.org/jdo
> 

Craig L Russell
Secretary, Apache Software Foundation
c...@apache.org http://db.apache.org/jdo

Reply via email to