indico icon indicating copy to clipboard operation
indico copied to clipboard

Allow linking badge templates to regforms

Open tomasr8 opened this issue 1 year ago • 3 comments

Something that has been asked many times before is the ability to reference regform fields in the badge designer. Currently you can use any regform as a source when printing badges and the list of available placeholders is limited to personal data since every regform has them.

The idea is to essentially allow linking templates to a specific regform. Once linked, you would be able reference any field from the linked regform.

Once linked, you have all registration data placeholders available in the badge designer and you can print the badges.

When printing badges/tickets, you can only select the linked regform (if any). The equivalent is true when configuring default ticket template in regforms (TicketsForm) - you can only select unlinked templates, or templates which are linked to the given regform.

This is what the UI for linking looks like currently: image

For not currently linked templates, there is a 'plus' icon which opens dropdown where you can select to link a regform (same as when printing badges). To unlink, you click on the red 'X'.

tomasr8 avatar Dec 08 '23 13:12 tomasr8

For double-sided:

  • Front/back side must be linked to the same regform (this implies both templates are linked to the event itself), or the backside must not be linked to anything
  • Linking a template to a regform should not be allowed if it's the backside of another template, unless that template is linked to the same registration form

ThiefMaster avatar Dec 08 '23 13:12 ThiefMaster

Looks promising, if ready I can also try to review it in detail.

bpedersen2 avatar Dec 18 '23 08:12 bpedersen2

Looks promising, if ready I can also try to review it in detail.

Hi! Yes, definitely feel free to give it a try :) It should be more or less working at this point, I mostly need to add tests. I rebased it on the latest master and updated the migration so you just need indico db upgrade

tomasr8 avatar Dec 18 '23 09:12 tomasr8