Difference between revisions of "Template:Verdict"

From cm2.liecourt.com
(Fill database)
(Fill database)
(38 intermediate revisions by 2 users not shown)
Line 205: Line 205:
 
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{{User|}}}|Yes|{{#ifsysop:Yes|No}}}}}}
 
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{{User|}}}|Yes|{{#ifsysop:Yes|No}}}}}}
 
{{#ifeq:{{#var:@allowed}}|Yes|{{#vardefine:@stage|{{#show:{{{Workflow|}}}|?Stage|link=none}} }}
 
{{#ifeq:{{#var:@allowed}}|Yes|{{#vardefine:@stage|{{#show:{{{Workflow|}}}|?Stage|link=none}} }}
<wsform action="addToWiki" id="verdict-form" enctype="multipart/form-data"  mwreturn="{{#if:{{{Participant|}}}|{{fullurl:{{{Participant|}}} }}|{{#if:{{#urlget:Participant}}|{{fullurl:{{#urldecode:{{#urlget:Participant}} }} }}|{{fullurl:{{FULLPAGENAME}} }} }} }}" >
+
{{#vardefine:@myparticipantpage|{{#ask:[[Class::Participant]] [[User::User:{{CURRENTLOGGEDUSER}}]] [[Case ID::{{{Case ID|}}}]]|link=none }} }}<!--
 +
--><wsform action="addToWiki" id="verdict-form"  mwreturn="{{#if:{{#var:@myparticipantpage}}|{{fullurl:{{#var:@myparticipantpage}} }}|{{#if:{{{Participant|}}}|{{fullurl:{{{Participant|}}} }}|{{#if:{{#urlget:Participant}}|{{fullurl:{{#urldecode:{{#urlget:Participant}} }} }}|{{fullurl:{{FULLPAGENAME}} }} }} }} }}" >
 
<wscreate mwwrite="{{FULLPAGENAME}}" mwtemplate="Verdict" />
 
<wscreate mwwrite="{{FULLPAGENAME}}" mwtemplate="Verdict" />
  
 
{{#ifeq:{{#var:@stage}}|Waiting for Plaintiff verdict|
 
{{#ifeq:{{#var:@stage}}|Waiting for Plaintiff verdict|
 +
{{#vardefine:@randomjudge|{{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{{User|}}}]]|Limit=1|format=array|order=random}} }}
 
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Stage|value=Needs judge}}
 
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Stage|value=Needs judge}}
 
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Plaintiff verdict|value=Yes}}
 
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Plaintiff verdict|value=Yes}}
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Random judge|value={{#ask:[[Class::Member]][[Role::Judge]][[!{{{User|}}}]]|Limit=1|format=array|order=random}} }}
+
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Random judge|value={{#var:@randomjudge}} }}
}}
+
}}<!--
 
+
--><wsfield type="hidden" name="Role"  value="{{{Role|}}}" />
<wsfield type="hidden" name="Role"  value="{{{Role|}}}" />
 
 
<wsfield type="hidden" name="Workflow"  value="{{{Workflow|}}}" />
 
<wsfield type="hidden" name="Workflow"  value="{{{Workflow|}}}" />
 
<wsfield type="hidden" name="Case ID"  value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Case ID"  value="{{{Case ID|}}}" />
Line 220: Line 221:
 
<wsfield type="hidden" name="Name"  value="{{{Name|}}}" />
 
<wsfield type="hidden" name="Name"  value="{{{Name|}}}" />
 
<wsfield type="hidden" name="Context"  value="{{{Context|}}}" />
 
<wsfield type="hidden" name="Context"  value="{{{Context|}}}" />
<h1><span>{{{Role|}}} verdict</span><span>{{{Context|}}}</span><span>Suit: {{{Case ID|}}}</span></h1>
+
<h1><span>{{{Role|}}} verdict</span><span>{{{Context|}}}</span><span>Suit: {{{Case ID|}}}</span></h1>Every decision should include your 0 - 100% confidence in the decision<!--
 +
-->{{#vardefine:verdictsarray|{{#ask:[[Class::Verdict]][[Case ID:: {{{Case ID|}}}]]{{#ifeq:{{{Role|}}}|Judge|[[Role::!Judge]]|[[Role::Plaintiff]]}}
 +
|?Case ID
 +
|?Role
 +
|?User
 +
|?Truth
 +
|?Truth percentage
 +
|?Truth text
 +
|?Whole truth
 +
|?Whole truth percentage
 +
|?Whole truth text
 +
|?Nothing But the truth
 +
|?Nothing But the truth percentage
 +
|?Nothing But the truth text
 +
|?Deceit
 +
|?Deceit percentage
 +
|?Deceit text
 +
|?Deceit intended
 +
|?Deceit intended percentage
 +
|?Deceit intended text
 +
|?Motivation
 +
|?Motivation percentage
 +
|?Motivation text
 +
|?Social acceptability
 +
|?Social acceptability percentage
 +
|?Social acceptability text
 +
|?Label
 +
|?Label percentage
 +
|?Label text
 +
|?-Verdict=File
 +
|?-Verdict.Modification date
 +
|?Name
 +
|link=none
 +
|Sort=Role
 +
|Order=desc
 +
|Format=array
 +
|Sep=$
 +
}}}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>Is it the Truth?</h3>
 
|1=<h3>Is it the Truth?</h3>
|2=<div class="d-flex">{{#widget:Check input |type=radio |name=Truth  |text=yes |id=truthyes |value=yes |checked={{#ifeq:{{{Truth|}}}|no||checked}} }}
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex"> </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|4}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|4}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|5}}%,#f2f2f2 {{#explode:@@@|<PROP>|5}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 43%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|5}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|6}} </div><!--
 +
 
 +
-->{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Verdict file]][[Verdict::{{#explode:@@@|<PROP>|0}}]]|?=|?Modification date|Format=array|link=none}}|,|###|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=vi attachment mt-2 |text={{fa|image}} }}<!--
 +
 
 +
-->{{Modal
 +
|Targetid=image-modal-{{#var:@counter}}
 +
|Dialog class=image-modal
 +
|ModalHeading=Image
 +
|BodyText=[[{{#explode:###|<PROP>|0}}]] Uploaded on: {{#explode:###|<PROP>|1}}
 +
|FooterText={{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=btn btn-submit  |text=close}}
 +
|Hide link=Yes
 +
}}<!--
 +
 
 +
-->{{#vardefine:@counter|{{#expr:{{#var:@counter}} + 1}} }} |}}</div><!--
 +
 
 +
--></div></div></div>|}} {{#tag:html|</details>}} }}
 +
<div class="d-flex">{{#widget:Check input |type=radio |name=Truth  |text=yes |id=truthyes |value=yes |checked={{#ifeq:{{{Truth|}}}|no||checked}} }}
 
{{#widget:Check input |type=radio |name=Truth |text=no |id=truthno |value=no  |checked={{#ifeq:{{{Truth|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Truth percentage" placeholder="0" value="{{{Truth percentage|}}}" />%</span></div>
 
{{#widget:Check input |type=radio |name=Truth |text=no |id=truthno |value=no  |checked={{#ifeq:{{{Truth|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Truth percentage" placeholder="0" value="{{{Truth percentage|}}}" />%</span></div>
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Truth text" placeholder="Evidence" value="{{{Truth text|}}}" />{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Verdict file]][[Verdict::{{FULLPAGENAME}}]]|?=|?Modification date|Format=array|link=none}}|,|@@@|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=attachment  |text={{fa|image}} }}<!--
+
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Truth text" placeholder="Additional support">{{{Truth text|}}}</wsfield>{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Verdict file]][[Verdict::{{FULLPAGENAME}}]]|?=|?Modification date|Format=array|link=none}}|,|@@@|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=attachment  |text={{fa|image}} }}<!--
  
 
-->{{Modal
 
-->{{Modal
Line 256: Line 310:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>Is it the Whole Truth?</h3>
 
|1=<h3>Is it the Whole Truth?</h3>
|2=<div class="d-flex">{{#widget:Check input |type=radio |name=Whole truth  |text=yes |id=wholetruthdyes |value=yes |checked={{#ifeq:{{{Whole truth|}}}|no||checked}} }}
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|7}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|7}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|8}}%,#f2f2f2 {{#explode:@@@|<PROP>|8}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|8}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|8}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|9}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div></div></div>|}}{{#tag:html|</details>}} }}<div class="d-flex">{{#widget:Check input |type=radio |name=Whole truth  |text=yes |id=wholetruthdyes |value=yes |checked={{#ifeq:{{{Whole truth|}}}|no||checked}} }}
 
{{#widget:Check input |type=radio |name=Whole truth |text=no |id=wholetruthno |value=no  |checked={{#ifeq:{{{Whole truth|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Whole truth percentage" placeholder="0" value="{{{Whole truth percentage|}}}" />%</span></div>
 
{{#widget:Check input |type=radio |name=Whole truth |text=no |id=wholetruthno |value=no  |checked={{#ifeq:{{{Whole truth|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Whole truth percentage" placeholder="0" value="{{{Whole truth percentage|}}}" />%</span></div>
<wsfield type="textarea" class="form-control mt-2" name="Whole truth text" placeholder="Evidence" value="{{{Whole truth text|}}}" />
+
<wsfield type="textarea" class="form-control mt-2" name="Whole truth text" placeholder="Additional support">{{{Whole truth text|}}}</wsfield>
 
}}
 
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>Is it Nothing But the Truth?</h3>
 
|1=<h3>Is it Nothing But the Truth?</h3>
|2=<div class="d-flex">{{#widget:Check input |type=radio |name=Nothing But the truth  |text=yes |id=nothingyes |value=yes |checked={{#ifeq:{{{Nothing But the truth|}}}|no||checked}} }}
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|10}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|10}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|11}}%,#f2f2f2 {{#explode:@@@|<PROP>|11}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|11}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|11}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|12}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div></div></div>|}}{{#tag:html|</details>}} }}<div class="d-flex">{{#widget:Check input |type=radio |name=Nothing But the truth  |text=yes |id=nothingyes |value=yes |checked={{#ifeq:{{{Nothing But the truth|}}}|no||checked}} }}
 
{{#widget:Check input |type=radio |name=Nothing But the truth |text=no |id=nothingno |value=no  |checked={{#ifeq:{{{Nothing But the truth|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Nothing But the truth percentage" placeholder="0" value="{{{Nothing But the truth percentage|}}}" />%</span></div>
 
{{#widget:Check input |type=radio |name=Nothing But the truth |text=no |id=nothingno |value=no  |checked={{#ifeq:{{{Nothing But the truth|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Nothing But the truth percentage" placeholder="0" value="{{{Nothing But the truth percentage|}}}" />%</span></div>
<wsfield type="textarea" class="form-control mt-2" name="Nothing But the truth text" placeholder="Evidence" value="{{{Nothing But the truth text|}}}" />
+
<wsfield type="textarea" class="form-control mt-2" name="Nothing But the truth text" placeholder="Additional support">{{{Nothing But the truth text|}}}</wsfield>
 
}}
 
}}
  
Line 273: Line 335:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>What is the Deceit?</h3>
 
|1=<h3>What is the Deceit?</h3>
|2={{#arraymap:{{{Deceit text|}}}|,|@@@|
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|
{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<div class="original">|<div class="old-copy">}}<div class="d-flex"><wsfield type="textarea" class="form-control" name="Deceit[]" placeholder="Lie about Plans" value="{{#explode:{{{Deceit|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />
+
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div>{{#vardefine:@decietscount|0}}{{#arraymap:{{#explode:@@@|<PROP>|15}}|,|###|<div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:{{#explode:@@@|<PROP>|13}}|,|{{#var:@decietscount}}}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%,#f2f2f2 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:{{#explode:@@@|<PROP>|15}}|,|{{#var:@decietscount}}}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}|}}</div></div>
 +
 
 +
 
 +
|}} {{#tag:html|</details>}} }}{{#arraymap:{{{Deceit text|}}}|,|@@@|
 +
{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<div class="original">|<div class="old-copy">}}<div class="d-flex"><wsfield type="textarea" class="form-control" name="Deceit[]" placeholder="Decision">{{#explode:{{{Deceit|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}</wsfield>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Deceit percentage[]" placeholder="0" value="{{#explode:{{{Deceit percentage|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />%</span></div>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Deceit percentage[]" placeholder="0" value="{{#explode:{{{Deceit percentage|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />%</span></div>
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Deceit text[]" placeholder="Evidence" value="{{#explode:{{{Deceit text|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<span class="add-more deceit">{{fa|plus}}</span>}}</div></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}
+
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Deceit text[]" placeholder="Additional support" >{{#explode:{{{Deceit text|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}</wsfield>{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<!--<span class="add-more deceit">{{fa|plus}}</span>-->}}</div></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}
 
|}}
 
|}}
 
}}
 
}}
Line 282: Line 352:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>What is the Deceit?</h3>
 
|1=<h3>What is the Deceit?</h3>
|2=<div class="original"><div class="d-flex"><wsfield type="textarea" class="form-control" name="Deceit[]" placeholder="Lie about Plans" value="{{{Deceit|}}}" />
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|
 +
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div>{{#vardefine:@decietscount|0}}{{#arraymap:{{#explode:@@@|<PROP>|15}}|,|###|<div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:{{#explode:@@@|<PROP>|13}}|,|{{#var:@decietscount}}}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%,#f2f2f2 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:{{#explode:@@@|<PROP>|15}}|,|{{#var:@decietscount}}}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}|}}</div></div>
 +
 
 +
 
 +
|}} {{#tag:html|</details>}} }}<div class="original"><div class="d-flex"><wsfield type="textarea" class="form-control" name="Deceit[]" placeholder="Decision">{{{Deceit|}}}</wsfield>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Deceit percentage[]" placeholder="0" value="{{{Deceit percentage|}}}" />%</span></div>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Deceit percentage[]" placeholder="0" value="{{{Deceit percentage|}}}" />%</span></div>
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Deceit text[]" placeholder="Evidence" value="{{{Deceit text|}}}" /><span class="add-more deceit">{{fa|plus}}</span></div></div>
+
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Deceit text[]" placeholder="Additional support">{{{Deceit text|}}}</wsfield><!--<span class="add-more deceit">{{fa|plus}}</span>--></div></div>
 
}}
 
}}
 
}}
 
}}
Line 290: Line 368:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>Is the Deceit Intended?</h3>
 
|1=<h3>Is the Deceit Intended?</h3>
|2=<div class="d-flex">{{#widget:Check input |type=radio |name=Deceit intended  |text=yes |id=deceitintendedyes |value=yes |checked={{#ifeq:{{{Deceit intended|}}}|no||checked}} }}
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|16}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|16}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|17}}%,#f2f2f2 {{#explode:@@@|<PROP>|17}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|17}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|17}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|18}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div></div></div>|}}{{#tag:html|</details>}} }}<div class="d-flex">{{#widget:Check input |type=radio |name=Deceit intended  |text=yes |id=deceitintendedyes |value=yes |checked={{#ifeq:{{{Deceit intended|}}}|no||checked}} }}
 
{{#widget:Check input |type=radio |name=Deceit intended |text=no |id=deceitintendedno |value=no  |checked={{#ifeq:{{{Deceit intended|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Deceit intended percentage" placeholder="0" value="{{{Deceit intended percentage|}}}" />%</span></div>
 
{{#widget:Check input |type=radio |name=Deceit intended |text=no |id=deceitintendedno |value=no  |checked={{#ifeq:{{{Deceit intended|}}}|no|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Deceit intended percentage" placeholder="0" value="{{{Deceit intended percentage|}}}" />%</span></div>
<wsfield type="textarea" class="form-control mt-2" name="Deceit intended text" placeholder="Evidence" value="{{{Deceit intended text|}}}" />
+
<wsfield type="textarea" class="form-control mt-2" name="Deceit intended text" placeholder="Additional support">{{{Deceit intended text|}}}</wsfield>
 
}}
 
}}
  
Line 300: Line 382:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>What is the Motivation behind the Lie?</h3>
 
|1=<h3>What is the Motivation behind the Lie?</h3>
|2={{#arraymap:{{{Motivation text|}}}|,|@@@|
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|
{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<div class="original">|<div class="old-copy">}}<div class="d-flex"><wsfield type="textarea" class="form-control" name="Motivation[]" placeholder="Lie about Plans" value="{{#explode:{{{Motivation|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />
+
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div>{{#vardefine:@decietscount|0}}{{#arraymap:{{#explode:@@@|<PROP>|19}}|,|###|<div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:{{#explode:@@@|<PROP>|19}}|,|{{#var:@decietscount}}}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%,#f2f2f2 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:{{#explode:@@@|<PROP>|21}}|,|{{#var:@decietscount}}}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}|}}</div></div>
 +
 
 +
 
 +
|}}  {{#tag:html|</details>}} }}{{#arraymap:{{{Motivation text|}}}|,|@@@|
 +
{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<div class="original">|<div class="old-copy">}}<div class="d-flex"><wsfield type="textarea" class="form-control" name="Motivation[]" placeholder="Decision">{{#explode:{{{Motivation|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}</wsfield>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Motivation percentage[]" placeholder="0" value="{{#explode:{{{Motivation percentage|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />%</span></div>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Motivation percentage[]" placeholder="0" value="{{#explode:{{{Motivation percentage|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />%</span></div>
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Motivation text[]" placeholder="Evidence" value="{{#explode:{{{Motivation text|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<span class="add-more motivation">{{fa|plus}}</span>}}</div></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}
+
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Motivation text[]" placeholder="Additional support">{{#explode:{{{Motivation text|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}</wsfield>{{#ifexpr:{{#arraysize:@deciets}} = {{#var:@decietscount}}|<!--<span class="add-more motivation">{{fa|plus}}</span>-->}}</div></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}
 
|}}
 
|}}
 
}}
 
}}
Line 309: Line 399:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>What is the Motivation behind the Lie?</h3>
 
|1=<h3>What is the Motivation behind the Lie?</h3>
|2=<div class="original"><div class="d-flex"><wsfield type="textarea" class="form-control" name="Motivation[]" placeholder="Lie about Plans" value="{{{Motivation|}}}" />
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|
 +
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div>{{#vardefine:@decietscount|0}}{{#arraymap:{{#explode:@@@|<PROP>|19}}|,|###|<div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:{{#explode:@@@|<PROP>|19}}|,|{{#var:@decietscount}}}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%,#f2f2f2 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:{{#explode:@@@|<PROP>|21}}|,|{{#var:@decietscount}}}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}|}}</div></div>
 +
 
 +
 
 +
|}}  {{#tag:html|</details>}} }}<div class="original"><div class="d-flex"><wsfield type="textarea" class="form-control" name="Motivation[]" placeholder="Decision">{{{Motivation|}}}</wsfield>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Motivation percentage[]" placeholder="0" value="{{{Motivation percentage|}}}" />%</span></div>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Motivation percentage[]" placeholder="0" value="{{{Motivation percentage|}}}" />%</span></div>
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Motivation text[]" placeholder="Evidence" value="{{{Motivation text|}}}" /><span class="add-more motivation">{{fa|plus}}</span></div></div>
+
<div class="d-flex"><wsfield type="textarea" class="form-control mt-2" name="Motivation text[]" placeholder="Additional support">{{{Motivation text|}}}</wsfield><!--<span class="add-more motivation">{{fa|plus}}</span>--></div></div>
 
}}
 
}}
 
}}
 
}}
Line 317: Line 415:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>What is the Social Acceptability for the lie?</h3>
 
|1=<h3>What is the Social Acceptability for the lie?</h3>
|2=<div class="d-flex">{{#widget:Check input |type=radio |name=Social acceptability  |text=Acceptable |id=socialacceptabilityyes |value=Acceptable |checked={{#ifeq:{{{Social acceptability|}}}|Unacceptable||checked}} }}
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|22}}|Acceptable|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|22}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|23}}%,#f2f2f2 {{#explode:@@@|<PROP>|23}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|23}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|23}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|24}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div></div></div>|}}{{#tag:html|</details>}} }}<div class="d-flex">{{#widget:Check input |type=radio |name=Social acceptability  |text=Acceptable |id=socialacceptabilityyes |value=Acceptable |checked={{#ifeq:{{{Social acceptability|}}}|Unacceptable||checked}} }}
 
{{#widget:Check input |type=radio |name=Social acceptability |text=Unacceptable |id=socialacceptabilityno |value=Unacceptable  |checked={{#ifeq:{{{Social acceptability|}}}|Unacceptable|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Social acceptability percentage" placeholder="0" value="{{{Social acceptability percentage|}}}" />%</span></div>
 
{{#widget:Check input |type=radio |name=Social acceptability |text=Unacceptable |id=socialacceptabilityno |value=Unacceptable  |checked={{#ifeq:{{{Social acceptability|}}}|Unacceptable|checked|}} }}<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Social acceptability percentage" placeholder="0" value="{{{Social acceptability percentage|}}}" />%</span></div>
<wsfield type="textarea" class="form-control mt-2" name="Social acceptability text" placeholder="Evidence" value="{{{Social acceptability text|}}}" />
+
<wsfield type="textarea" class="form-control mt-2" name="Social acceptability text" placeholder="Additional support">{{{Social acceptability text|}}}</wsfield>
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>What is the label for the lie needed to Improve the Social Acceptability?</h3>
 
|1=<h3>What is the label for the lie needed to Improve the Social Acceptability?</h3>
|2=<div class="d-flex"><wsfield type="textarea" class="form-control" name="Label" value="{{{Label|}}}" placeholder="label" />
+
|2={{#ifeq:{{{Role|}}}|Plaintiff||{{#tag:html|<details><summary>{{#ifeq:{{{Role|}}}|Judge|Verdicts|Plaintiff answer}}</summary>}}{{#arraymap:{{#var:verdictsarray}}|$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:@@@|<PROP>|25}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|26}}%,#f2f2f2 {{#explode:@@@|<PROP>|26}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|26}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|26}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|27}} </div><!--
 +
 
 +
--></div><!--
 +
 
 +
--></div></div></div>|}}{{#tag:html|</details>}} }}<div class="d-flex"><wsfield type="textarea" class="form-control" name="Label" value="{{{Label|}}}" placeholder="Label" />
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Label percentage" placeholder="0" value="{{{Label percentage|}}}" />%</span></div>
 
<span class="percentage"><wsfield type="number" class="form-control form-number" min="0" max="100" name="Label percentage" placeholder="0" value="{{{Label percentage|}}}" />%</span></div>
<wsfield type="textarea" class="form-control mt-2" name="Label text" placeholder="Evidence" value="{{{Label text|}}}" />
+
<wsfield type="textarea" class="form-control mt-2" name="Label text" placeholder="Additional support">{{{Label text|}}}</wsfield>
 
}}
 
}}
  
Line 337: Line 443:
  
 
-->{{#tag:html|<script>
 
-->{{#tag:html|<script>
var addMore = document.querySelectorAll('.add-more'),i;
+
//var addMore = document.querySelectorAll('.add-more'),i;
  
for(i = 0; i < addMore.length; ++i){
+
//for(i = 0; i < addMore.length; ++i){
    addMore[i].addEventListener('click', addMoreInputs, false);
+
//    addMore[i].addEventListener('click', addMoreInputs, false);
}
+
//}
var newDeceit = document.querySelector('.add-more.deceit').closest('.col-md-8').querySelector('.original').innerHTML;
+
//var newDeceit = document.querySelector('.add-more.deceit').closest('.col-md-8').querySelector('.original').innerHTML;
var newMotivation = document.querySelector('.add-more.motivation').closest('.col-md-8').querySelector('.original').innerHTML;
+
//var newMotivation = document.querySelector('.add-more.motivation').closest('.col-md-8').querySelector('.original').innerHTML;
  
 
function addMoreInputs(){
 
function addMoreInputs(){

Revision as of 13:29, 7 December 2020


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

{{Verdict
|Workflow=
|Case ID=
|Role=
|User=
|Truth=
|Truth percentage=
|Truth text=
|Whole truth=
|Whole truth percentage=
|Whole truth text=
|Nothing But the truth=
|Nothing But the truth percentage=
|Nothing But the truth text=
|Deceit=
|Deceit percentage=
|Deceit text=
|Deceit intended=
|Deceit intended percentage=
|Deceit intended text=
|Motivation=
|Motivation percentage=
|Motivation text=
|Social acceptability=
|Social acceptability percentage=
|Social acceptability text=
|Label=
|Label percentage=
|Label text=
|Context= 
}}