Difference between revisions of "Template:User form"
From cm2.liecourt.com
Line 40: | Line 40: | ||
|2={{#arraydefine:@roles|{{{Roles|}}} }} | |2={{#arraydefine:@roles|{{{Roles|}}} }} | ||
<div class="WSShowOnSelect"> | <div class="WSShowOnSelect"> | ||
− | + | -{{{Be candidate|{{#ifexist:User:{{CURRENTLOGGEDUSER}}|Yes|No}} }}}- | |
+ | {{#ifeq:{{{Be candidate|{{#ifexist:User:{{CURRENTLOGGEDUSER}}|Yes|No}} }}}|Yes|checked}} | ||
Candidate: | Candidate: | ||
− | <wsfield type="radio" name="Be candidate[]" value="Yes" checked="{{#ifeq:{{{Be candidate|Yes}}}|Yes|checked}}" data-wssos-show="candidateoptions" /> Yes | + | <wsfield type="radio" name="Be candidate[]" value="Yes" checked="{{#ifeq:{{{Be candidate|{{#ifexist:User:{{CURRENTLOGGEDUSER}}|Yes|No}} }}}|Yes|checked}}" data-wssos-show="candidateoptions" /> Yes |
− | <wsfield type="radio" name="Be candidate[]" value="No" checked="{{#ifeq:{{{Be candidate|Yes}}}|No|checked}}"/> No | + | <wsfield type="radio" name="Be candidate[]" value="No" checked="{{#ifeq:{{{Be candidate|{{#ifexist:User:{{CURRENTLOGGEDUSER}}|Yes|No}} }}}|No|checked}}"/> No |
<div class="hidden" data-wssos-value="candidateoptions"> | <div class="hidden" data-wssos-value="candidateoptions"> | ||
<wslabel>Juror<wsfield type="checkbox" name="Roles[]" value="Juror" checked="{{#if:{{#arraysearch:@roles|Juror}}|checked}}" /></wslabel><br> | <wslabel>Juror<wsfield type="checkbox" name="Roles[]" value="Juror" checked="{{#if:{{#arraysearch:@roles|Juror}}|checked}}" /></wslabel><br> |
Revision as of 12:18, 22 May 2020
This is the User form template. It should be called in the following format:
{{User form |Name= |Email= |Volunteer= |Roles= }}