Difference between revisions of "Template:User"

From cm2.liecourt.com
Line 48: Line 48:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Roles</b>
 
|1=<b>Roles</b>
|2={{#show:{{FULLPAGENAME}}|?Role}} {{#ifeq:{{{Volunteer|}}}|Yes|(Volunteer)}}
+
|2={{{Roles|}}} {{#ifeq:{{{Volunteer|}}}|Yes|(Volunteer)}}
 
}}
 
}}
 
{{#widget:link|text=Edit|type=a|class=btn btn-blue|id=profile-tab|datatoggle=tab|href=#info-tab-form|role=tab|aria-controls=info-tab-form|ariaselected=false}}
 
{{#widget:link|text=Edit|type=a|class=btn btn-blue|id=profile-tab|datatoggle=tab|href=#info-tab-form|role=tab|aria-controls=info-tab-form|ariaselected=false}}
 
</div>
 
</div>
 
<div id="info-tab-form" class="tab-pane fade"  role="tabpanel" aria-labelledby="info-tab-form">
 
<div id="info-tab-form" class="tab-pane fade"  role="tabpanel" aria-labelledby="info-tab-form">
 
+
{{User form
<wsform action="addToWiki">
+
|Name={{{Name|}}}
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Name}}
+
|Email={{{Email|}}}
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Roles}}
+
|Volunteer={{{Volunteer|}}}
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Email}}
+
|Roles={{{Roles|}}}
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Volunteer}}
 
 
 
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Name</b>
 
|2={{#tag:wsfield||name=Name|type=text|value={{{Name|}}}|class=form-control }}
 
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Email</b>
 
|2={{#tag:wsfield||name=Email|type=text|value={{{Email|}}}|class=form-control }}
 
}}
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Roles</b>
 
|2={{#arraydefine:@roles|{{#show:{{FULLPAGENAME}}|?Role}} }}
 
<wslabel>Juror<wsfield type="checkbox" name="Roles[]" value="Juror" checked="{{#if:{{#arraysearch:@roles|Juror}}|checked}}" /></wslabel><br>
 
{{#ifsysop:<wslabel>Judge<wsfield type="checkbox" name="Roles[]" value="Judge" checked="{{#if:{{#arraysearch:@roles|Judge}}|checked}}" /></wslabel>|{{#if:{{#arraysearch:@roles|Judge}}|email the court to give up Judge role}} }}
 
}}
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Volunteer</b>
 
|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=no |id=volunteerno |value=No|checked={{#ifeq:{{{Volunteer|}}}|Yes| |checked}} }}
 
</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}}
 
</wsform>
 
 
</div>
 
</div>
 
</div>
 
</div>

Revision as of 10:33, 22 May 2020


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

{{User
|User=
|Roles=
|Name=
|Filed by=
}}