Youth League Support

Request new features or changes to existing ones here
Post Reply
acarr
Posts: 1
Joined: Wed Dec 19, 2012 7:40 pm

Youth League Support

Post by acarr »

I am trying to manage a youth league. We need multiple email addresses for a player (parent/guardian 1, parent/guardian 2).
There are two things we need to add - the fields for data entry, and where-ever emails are sent, the multiple fields must be consulted and add the two extra fields.

Where should I start adding this in?

Cheers,
Angus.

GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Youth League Support

Post by GregS »

This is on my todo list, but my approach was going to be a bit different. I was going to add a new "parent" (or "guardian" or some more generic term) account type, which other accounts could then be associated with, because a parent might have multiple kids in the same league, or in different leagues but the same organization, and would want to be able to do things like register and pay for them all at once, see the combined schedules, etc. This would be a more complex but also more complete solution.

To do it your way, I think you'd need to:
  • edit config/schema/schema.php to add the new fields to the people table (and then run http://example.com/install/install/update so it makes the changes in the database)
  • update views/users/create_account.ctp, views/people/edit.ctp and views/people/view.ctp to edit and display the fields (parent emails would presumably only be visible to admins and the captains/coaches of the player's team, or you could add new "publish email" fields like the existing one and use that)
  • add validation for the fields to models/user.php (and probably also add new _formatted fields in the _afterFind function)
  • tweak the _extractEmails function in app_controller.php to include the new fields in the lists of addresses returned

dyoung
Posts: 68
Joined: Mon Dec 09, 2013 5:33 pm

Re: Youth League Support

Post by dyoung »

I am using 1.6.15 and see where you have add a "Non-player" account type. When I create a user with this account, access to the various menus looks correct except for Teams. Non-players can still create teams and franchises. Was this your intent? I would think that if you envisioned this being used for a parent, you would not want them creating teams or franchises.

Update: After reading your code comments I see that team creation is removed when registration is enabled. This works as advertised, but Franchise creation is still enabled.

GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Youth League Support

Post by GregS »

Parents are just one type of non-player that might use the site, and for other types it could make sense for them to be creating teams and franchises. I'm working on the 1.7 series now, and the main focus of these revisions will be improving the parent/child "experience".

dyoung
Posts: 68
Joined: Mon Dec 09, 2013 5:33 pm

Re: Youth League Support

Post by dyoung »

Thanks. I am looking forward to 1.7.

Post Reply