Difference between revisions of "Template:Verdict"

From cm2.liecourt.com
Line 57: Line 57:
 
|Deceit={{{Deceit|}}}
 
|Deceit={{{Deceit|}}}
 
|Deceit percentage={{{Deceit percentage|}}}
 
|Deceit percentage={{{Deceit percentage|}}}
|Deceit text={{{Deceit text|}}}
+
|Deceit text={{#if:{{{Deceit text|}}}|{{{Deceit text|}}}|-}}
 
|Deceit intended={{{Deceit intended|}}}
 
|Deceit intended={{{Deceit intended|}}}
 
|Deceit intended percentage={{{Deceit intended percentage|}}}
 
|Deceit intended percentage={{{Deceit intended percentage|}}}
Line 71: Line 71:
 
|Label text={{{Label text|}}}
 
|Label text={{{Label text|}}}
 
|Context={{{Context|None}}}
 
|Context={{{Context|None}}}
 +
|Name={{{Name|}}}
 
}}
 
}}
 
|{{#set:Class=None}}
 
|{{#set:Class=None}}
Line 96: Line 97:
 
   font-weight: 600;
 
   font-weight: 600;
 
}
 
}
#verdict-form input {
+
 
    border-radius: 30px;
 
    background: #f2f2f2;
 
    border: none;
 
    padding-left: 24px;
 
    box-shadow: none;
 
}
 
 
.checkinput-button input[type="radio"]:checked + span {
 
.checkinput-button input[type="radio"]:checked + span {
 
     background-color: #339966;
 
     background-color: #339966;
Line 137: Line 132:
 
}
 
}
 
.form-number{
 
.form-number{
display: inline-block;
+
border: none;
 +
    display: inline-block;
 
     width: 5em;
 
     width: 5em;
 +
    box-shadow: none;
 
}
 
}
 
.row-formitemresponsive div:first-child{
 
.row-formitemresponsive div:first-child{
Line 164: Line 161:
 
     background: #f2f2f2;
 
     background: #f2f2f2;
 
     padding-right: 19px;
 
     padding-right: 19px;
 +
        box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
 +
    transition: border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;
 +
      border: 1px solid #ced4da;
 +
}
 +
.percentage:focus {
 +
    color: #495057;
 +
    background-color: #fff;
 +
    border-color: #80bdff;
 +
    outline: 0;
 +
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 0 0.2rem rgba(0,123,255,0.25);
 
}
 
}
 
.attachment {
 
.attachment {
Line 186: Line 193:
 
     margin-left: 7px;
 
     margin-left: 7px;
 
     cursor:pointer;
 
     cursor:pointer;
 +
}
 +
#verdict-form textarea {
 +
    border-radius: 30px;
 +
    background: #f2f2f2;
 +
    padding-left: 24px;
 +
  height: 41px;
 
}
 
}
 
</style>}}
 
</style>}}
  
 
</div>
 
</div>
{{#vardefine:@stage|{{#show:{{{Workflow|}}}|?Stage|link=none}} }}
+
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{{User|}}}|Yes|{{#ifsysop:Yes|No}}}}}}
<wsform action="addToWiki" id="verdict-form" enctype="multipart/form-data" mwreturn="{{#if:{{{Participant|}}}|{{fullurl:{{{Participant|}}} }}|{{#if:{{#urlget:Participant}}|{{fullurl:{{#urldecode:{{#urlget:Participant}} }} }}|{{fullurl:{{FULLPAGENAME}} }} }} }}" >
+
{{#ifeq:{{#var:@allowed}}|Yes|{{#vardefine:@stage|{{#show:{{{Workflow|}}}|?Stage|link=none}} }}
 +
{{#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" />
  
 
{{#ifeq:{{#var:@stage}}|Waiting for Plaintiff verdict|
 
{{#ifeq:{{#var:@stage}}|Waiting for Plaintiff verdict|
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Stage|value=Needs judge}}
+
{{#vardefine:@randomjudge|{{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{{User|{{CURRENTLOGGEDUSER}} }}}]] [[Online since::>{{#time: r | now - 1 hour}}]]
}}
+
|Limit=1
<wscreate mwwrite="{{FULLPAGENAME}}" mwtemplate="Verdict" />
+
|format=array
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}}}}|template=Workflow|formfield=Plaintiff verdict|value=Yes}}
+
|order=random
 
+
|default={{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{{User|{{CURRENTLOGGEDUSER}} }}}]]|Limit=1|format=array|order=random}}
 
+
}} }}
{{#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=Stage|value=Needs judge}}
 
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Plaintiff verdict|value=Yes}}
<wsfield type="hidden" name="Role"  value="{{{Role|}}}" />
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Random judge|value={{#var:@randomjudge}} }}
 +
}}<!--
 +
--><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|}}}" />
 
<wsfield type="hidden" name="User"  value="{{{User|}}}" />
 
<wsfield type="hidden" name="User"  value="{{{User|}}}" />
 +
<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><!--
{{#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" name="Truth percentage" placeholder="0" value="{{{Truth percentage|}}}" />%</span></div>
+
 
<div class="d-flex"><wsfield type="text" 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}} }}<!--
+
-->{{#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>
 +
<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 243: Line 315:
 
{{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><!--
{{#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" name="Whole truth percentage" placeholder="0" value="{{{Whole truth percentage|}}}" />%</span></div>
+
 
<wsfield type="text" class="form-control mt-2" name="Whole truth text" placeholder="Evidence" value="{{{Whole truth text|}}}" />
+
--></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>
 +
<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><!--
{{#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" name="Nothing But the truth percentage" placeholder="0" value="{{{Nothing But the truth percentage|}}}" />%</span></div>
+
 
<wsfield type="text" class="form-control mt-2" name="Nothing But the truth text" placeholder="Evidence" value="{{{Nothing But the truth text|}}}" />
+
--></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>
 +
<wsfield type="textarea" class="form-control mt-2" name="Nothing But the truth text" placeholder="Additional support">{{{Nothing But the truth text|}}}</wsfield>
 
}}
 
}}
  
Line 260: Line 340:
 
{{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="text" 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><!--
<span class="percentage"><wsfield type="number" class="form-control form-number" name="Deceit percentage[]" placeholder="0" value="{{#explode:{{{Deceit percentage|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />%</span></div>
+
 
<div class="d-flex"><wsfield type="text" 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><!--
 +
 
 +
--></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>
 +
<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 269: Line 357:
 
{{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="text" 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}}|$|@@@|
<span class="percentage"><wsfield type="number" class="form-control form-number" name="Deceit percentage[]" placeholder="0" value="{{{Deceit percentage|}}}" />%</span></div>
+
<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 class="d-flex"><wsfield type="text" class="form-control mt-2" name="Deceit text[]" placeholder="Evidence" value="{{{Deceit text|}}}" /><span class="add-more deceit">{{fa|plus}}</span></div></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>
 +
<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 277: Line 373:
 
{{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><!--
{{#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" name="Deceit intended percentage" placeholder="0" value="{{{Deceit intended percentage|}}}" />%</span></div>
+
 
<wsfield type="text" class="form-control mt-2" name="Deceit intended text" placeholder="Evidence" value="{{{Deceit intended text|}}}" />
+
--></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>
 +
<wsfield type="textarea" class="form-control mt-2" name="Deceit intended text" placeholder="Additional support">{{{Deceit intended text|}}}</wsfield>
 
}}
 
}}
  
Line 287: Line 387:
 
{{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="text" 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><!--
<span class="percentage"><wsfield type="number" class="form-control form-number" name="Motivation percentage[]" placeholder="0" value="{{#explode:{{{Motivation percentage|}}}|,|{{#expr:{{#var:@decietscount}} - 1}} }}" />%</span></div>
+
 
<div class="d-flex"><wsfield type="text" 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><!--
 +
 
 +
--></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>
 +
<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 296: Line 404:
 
{{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="text" 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}}|$|@@@|
<span class="percentage"><wsfield type="number" class="form-control form-number" name="Motivation percentage[]" placeholder="0" value="{{{Motivation percentage|}}}" />%</span></div>
+
<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 class="d-flex"><wsfield type="text" class="form-control mt-2" name="Motivation text[]" placeholder="Evidence" value="{{{Motivation text|}}}" /><span class="add-more motivation">{{fa|plus}}</span></div></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>
 +
<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 304: Line 420:
 
{{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><!--
{{#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" name="Social acceptability percentage" placeholder="0" value="{{{Social acceptability percentage|}}}" />%</span></div>
+
 
<wsfield type="text" class="form-control mt-2" name="Social acceptability text" placeholder="Evidence" value="{{{Social acceptability text|}}}" />
+
--></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>
 +
<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="text" 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><!--
<span class="percentage"><wsfield type="number" class="form-control form-number" name="Label percentage" placeholder="0" value="{{{Label percentage|}}}" />%</span></div>
+
 
<wsfield type="text" class="form-control mt-2" name="Label text" placeholder="Evidence" value="{{{Label text|}}}" />
+
--></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>
 +
<wsfield type="textarea" class="form-control mt-2" name="Label text" placeholder="Additional support">{{{Label text|}}}</wsfield>
 
}}
 
}}
  
Line 321: Line 445:
  
  
 
+
-->|<div class="m-5 alert alert-danger">Not permitted</div>}}<!-- end allowed
  
 
-->{{#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 14:23, 2 August 2021


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= 
}}