Difference between revisions of "Template:User form"

From cm2.liecourt.com
(Fill database)
 
(18 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
|Volunteer=
 
|Volunteer=
 
|Roles=
 
|Roles=
 +
|Be candidate=overrules role
 
}}
 
}}
 
</pre>
 
</pre>
  
</noinclude><includeonly><wsform action="addToWiki" mwreturn="{{fullurl:User:{{CURRENTLOGGEDUSER}} }}">
+
</noinclude><includeonly><wsform action="addToWiki" mwreturn="{{fullurl:{{{Target|User:{{CURRENTLOGGEDUSER}} }}} }}"><!--
{{#tag:wsedit||target={{PAGEID:User:{{CURRENTLOGGEDUSER}} }}|template=User|formfield=Name}}
 
{{#tag:wsedit||target={{{PAGEID:User:{{CURRENTLOGGEDUSER}} }}|template=User|formfield=Roles|value=None}}
 
{{#tag:wsedit||target={{PAGEID:User:{{CURRENTLOGGEDUSER}} }}|template=User|formfield=Email}}
 
{{#tag:wsedit||target={{PAGEID:User:{{CURRENTLOGGEDUSER}} }}|template=User|formfield=Volunteer}}
 
  
 +
-->{{#ifexist:{{{Target|User:{{CURRENTLOGGEDUSER}} }}}
 +
|{{#tag:wsedit||target={{PAGEID:{{{Target|User:{{CURRENTLOGGEDUSER}} }}} }}|template=User|formfield=Name}}
 +
{{#tag:wsedit||target={{PAGEID:{{{Target|User:{{CURRENTLOGGEDUSER}} }}} }}|template=User|formfield=Roles}}
 +
{{#tag:wsedit||target={{PAGEID:{{{Target|User:{{CURRENTLOGGEDUSER}} }}} }}|template=User|formfield=Be candidate}}
 +
{{#tag:wsedit||target={{PAGEID:{{{Target|User:{{CURRENTLOGGEDUSER}} }}} }}|template=User|formfield=Volunteer}}
 +
|{{#tag:wscreate||mwwrite={{{Target|User:{{CURRENTLOGGEDUSER}} }}}|mwtemplate=User|mwfollow=true}}
 +
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
Line 30: Line 34:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Email</b>
 
|1=<b>Email</b>
|2={{#tag:wsfield||name=Email|type=text|value={{{Email|}}}|class=form-control|required=required}}
+
|2={{{Email|}}} {{#widget:link|type=a|text=change email|href={{fullurl:Special:ChangeEmail|returnto={{FULLPAGENAME}} }} }}
 
}}
 
}}
  
{{Item responsive |Cols={{#var:@cols|4-8}}
+
<!--{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Roles</b>
 
|1=<b>Roles</b>
 
|2={{#arraydefine:@roles|{{{Roles|}}} }}
 
|2={{#arraydefine:@roles|{{{Roles|}}} }}
 +
<div class="WSShowOnSelect">
 +
 +
Candidate:
 +
{{#vardefine:@becandidatedefault|{{#if:{{{Be candidate|}}}|{{{Be candidate|}}}|{{#if:{{{Roles|}}}|Yes|{{#ifexist:{{{Target|User:{{CURRENTLOGGEDUSER}} }}}|Yes|No}} }} }} }}
 +
<wsfield type="radio" name="Be candidate[]" value="Yes" checked="{{#ifeq:{{#var:@becandidatedefault}}|Yes|checked}}" data-wssos-show="candidateoptions" /> Yes
 +
<wsfield type="radio" name="Be candidate[]" value="No" checked="{{#ifeq:{{#var:@becandidatedefault}}|No|checked}}"/> No
 +
<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>
 
<wslabel>Judge<wsfield type="checkbox" name="Roles[]" value="Judge" checked="{{#if:{{#arraysearch:@roles|Judge}}|checked}}" /></wslabel>
 
<wslabel>Judge<wsfield type="checkbox" name="Roles[]" value="Judge" checked="{{#if:{{#arraysearch:@roles|Judge}}|checked}}" /></wslabel>
 +
</div>
 +
</div>
 
}}
 
}}
  
Line 43: Line 56:
 
|1=<b>Volunteer</b>
 
|1=<b>Volunteer</b>
 
|2=<div class="d-flex">  
 
|2=<div class="d-flex">  
{{#widget:Check input |type=radio |name=Volunteer  |text=yes |id=volunteeryes |value=Yes|checked={{#ifeq:{{{Volunteer|}}}|Yes|checked}}}}
+
{{#widget:Check input |type=radio |name=Volunteer  |text=Yes |id=volunteeryes |value=Yes|checked={{#ifeq:{{{Volunteer|}}}|Yes|checked}}}}
{{#widget:Check input |type=radio |name=Volunteer |text=no |id=volunteerno |value=No|checked={{#ifeq:{{{Volunteer|}}}|Yes| |checked}} }}
+
{{#widget:Check input |type=radio |name=Volunteer |text=No |id=volunteerno |value=No|checked={{#ifeq:{{{Volunteer|}}}|Yes| |checked}} }}
 
</div>
 
</div>
}}
+
}}-->
  
 
{{#widget:link|text=Cancel|type=a|class=btn-red btn btn-half|id=profile-tab|datatoggle=tab|href=#info-tab|role=tab|aria-controls=info-tab|ariaselected=true}}{{#tag:wsfield||type=submit|value=Save|class=btn btn-green btn-half}}
 
{{#widget:link|text=Cancel|type=a|class=btn-red btn btn-half|id=profile-tab|datatoggle=tab|href=#info-tab|role=tab|aria-controls=info-tab|ariaselected=true}}{{#tag:wsfield||type=submit|value=Save|class=btn btn-green btn-half}}
 
</wsform></includeonly>
 
</wsform></includeonly>

Latest revision as of 09:42, 14 August 2020


This is the User form template. It should be called in the following format:

{{User form
|Name=
|Email=
|Volunteer=
|Roles=
|Be candidate=overrules role
}}