Difference between revisions of "Template:User"
From cm2.liecourt.com
(Fill database) |
|||
Line 13: | Line 13: | ||
|Name= | |Name= | ||
|Filed by= | |Filed by= | ||
− | |||
}} | }} | ||
</pre> | </pre> | ||
<!--{{User }}--> | <!--{{User }}--> | ||
− | </noinclude><includeonly> | + | </noinclude><includeonly> |
− | <div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{# | + | <div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}}|+sep=,|User={{{User|}}}|Name={{{Name|}}}|Email={{{Email|}}}|Volunteer={{{Volunteer|}}}|Tokens spent={{{Tokens spent|}}}|Pagename={{FULLPAGENAME}} }} }} |
</div> | </div> | ||
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}} | {{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}} | ||
Line 49: | 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={{# | + | |2={{#show:{{FULLPAGENAME}}|?Role}} {{#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 | + | |
− | | | + | <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}} |
+ | |||
+ | |||
+ | {{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 14:13, 22 May 2020
This is the User template. It should be called in the following format:
{{User |User= |Roles= |Name= |Filed by= }}