Difference between revisions of "Template:User form"

From cm2.liecourt.com
(Created page with "{{subst:new}}")
 
Line 8: Line 8:
  
 
<pre>
 
<pre>
{{User form }}
+
{{User form
 +
|Name=
 +
|Email=
 +
|Volunteer=
 +
|Roles=
 +
}}
 
</pre>
 
</pre>
  
</noinclude><includeonly>
+
</noinclude><includeonly><wsform action="addToWiki">
 +
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Name}}
 +
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Roles}}
 +
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Email}}
 +
{{#tag:wsedit||target={{PAGEID}}|template=User|formfield=Volunteer}}
  
</includeonly>
+
 
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Name</b>
 +
|2={{#tag:wsfield||name=Name|type=text|value={{{Name|}}}|class=form-control|required=required}}
 +
}}
 +
 
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Email</b>
 +
|2={{#tag:wsfield||name=Email|type=text|value={{{Email|}}}|class=form-control|required=required}}
 +
}}
 +
 
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Roles</b>
 +
|2={{#arraydefine:@roles|{{{Roles|}}} }}
 +
<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></includeonly>

Revision as of 10:32, 22 May 2020


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

{{User form
|Name=
|Email=
|Volunteer=
|Roles=
}}