Difference between revisions of "Template:Workflow"

From cm2.liecourt.com
(Fill database)
Line 111: Line 111:
 
|2=<wsform action="addToWiki">
 
|2=<wsform action="addToWiki">
 
   {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
 
   {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
   {{#arraydefine:@members |{{{Random judge|}}} }}
+
   {{#arraydefine:$judges|{{#ask: [[User group::icol-user]][[Class::Member]][[Role::Judge]] |limit=9999|link=none|format=plainlist}} }}
  <wstoken id="tokener52" name="Random judge" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[User group::icol-user]][[Class::Member]][[Role::Judge]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" >
+
  {{#arraydefine:$judges-selected|{{{Random judge|}}} }}
  {{#arraymap:{{#arrayprint:@members}}|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}}  
+
  <wstoken id="tokener52" name="Random judge" multiple="multiple" placeholder="Type a minimal of 3 characters" class="form-control" >
</wstoken><wsfield type="submit" class="btn btn-green" value="Save" /></wsform>}}
+
{{#arraymap:{{#arrayprint:$judges}}|,|__JUDGE__|{{#tag:wsfield|{{PAGENAME:__JUDGE__}}|type=option|value=__JUDGE__|selected={{#if:{{#arraysearch:$judges-selected|__JUDGE__}}|selected}} }}|}}
 +
</wstoken>
 +
<wsfield type="submit" class="btn btn-green" value="Save" /></wsform>}}
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
Line 135: Line 137:
 
|2=<wsform action="addToWiki">
 
|2=<wsform action="addToWiki">
 
   {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
 
   {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
   {{#arraydefine:@members |{{{Random juror|}}} }}
+
   {{#arraydefine:$jurors|{{#ask: [[User group::icol-user]][[Class::Member]][[Role::Juror]] |limit=9999|link=none|format=plainlist}} }}
  <wstoken id="tokener2" name="Random juror[]" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[User group::icol-user]][[Class::Member]][[Role::Juror]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" multiple="multiple">
+
  {{#arraydefine:$jurors-selected|{{{Random juror|}}} }}
  {{#arraymap:{{#arrayprint:@members}}|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}}  
+
  <wstoken id="tokener2" name="Random juror[]" multiple="multiple" placeholder="Type a minimal of 3 characters" class="form-control" >
 +
{{#arraymap:{{#arrayprint:$jurors}}|,|__JUROR__|{{#tag:wsfield|{{PAGENAME:__JUROR__}}|type=option|value=__JUROR__|selected={{#if:{{#arraysearch:$jurors-selected|__JUROR__}}|selected}} }}|}}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Save" /></wsform>}}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Save" /></wsform>}}
  

Revision as of 07:38, 15 July 2021


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

{{Workflow
|Case ID=
|Type=
|Stage=
|Filed by=
|Lie=
|Topic=
|Description=
|Lies=
|Facts=
|Locations=
|Judge=
|Juror amount=
|Jurors=
|Suit date=
|Plaintiff verdict=
|Reason for judge decline=
|Random judge=
|Random juror=
|Declined judge=
|Declined juror= 
}}