Difference between revisions of "Template:Verdict"

From cm2.liecourt.com
(Fill database)
 
(Fill database)
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 193: Line 200:
 
{{#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}} }} }} }}" >
 
<wsform action="addToWiki" id="verdict-form" enctype="multipart/form-data" mwreturn="{{#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}}
+
{{#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=Random judge|value={{#ask:[[Class::Member]][[Role::Judge]][[!{{{User|}}}]]|Limit=1|format=array|order=random}} }}
 
}}
 
}}
<wscreate mwwrite="{{FULLPAGENAME}}" mwtemplate="Verdict" />
 
{{#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}} }}
 
  
 
<wsfield type="hidden" name="Role"  value="{{{Role|}}}" />
 
<wsfield type="hidden" name="Role"  value="{{{Role|}}}" />
Line 207: Line 212:
 
<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>
Line 212: Line 218:
 
|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=<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" 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="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}} }}<!--
 
<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}} }}<!--
  
Line 245: Line 251:
 
|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=<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" 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="text" class="form-control mt-2" name="Whole truth text" placeholder="Evidence" value="{{{Whole truth text|}}}" />
 
<wsfield type="text" class="form-control mt-2" name="Whole truth text" placeholder="Evidence" value="{{{Whole truth text|}}}" />
 
}}
 
}}
Line 252: Line 258:
 
|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=<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" 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="text" class="form-control mt-2" name="Nothing But the truth text" placeholder="Evidence" value="{{{Nothing But the truth text|}}}" />
 
<wsfield type="text" class="form-control mt-2" name="Nothing But the truth text" placeholder="Evidence" value="{{{Nothing But the truth text|}}}" />
 
}}
 
}}
Line 263: Line 269:
 
|2={{#arraymap:{{{Deceit text|}}}|,|@@@|
 
|2={{#arraymap:{{{Deceit text|}}}|,|@@@|
 
{{#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}} }}" />
 
{{#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}} }}" />
<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>
+
<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="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 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 }} }}
 
|}}
 
|}}
Line 271: Line 277:
 
|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=<div class="original"><div class="d-flex"><wsfield type="text" class="form-control" name="Deceit[]" placeholder="Lie about Plans" value="{{{Deceit|}}}" />
<span class="percentage"><wsfield type="number" class="form-control form-number" 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="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 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>
 
}}
 
}}
Line 279: Line 285:
 
|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=<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" 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="text" class="form-control mt-2" name="Deceit intended text" placeholder="Evidence" value="{{{Deceit intended text|}}}" />
 
<wsfield type="text" class="form-control mt-2" name="Deceit intended text" placeholder="Evidence" value="{{{Deceit intended text|}}}" />
 
}}
 
}}
Line 290: Line 296:
 
|2={{#arraymap:{{{Motivation text|}}}|,|@@@|
 
|2={{#arraymap:{{{Motivation text|}}}|,|@@@|
 
{{#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}} }}" />
 
{{#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}} }}" />
<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>
+
<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="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 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 }} }}
 
|}}
 
|}}
Line 298: Line 304:
 
|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=<div class="original"><div class="d-flex"><wsfield type="text" class="form-control" name="Motivation[]" placeholder="Lie about Plans" value="{{{Motivation|}}}" />
<span class="percentage"><wsfield type="number" class="form-control form-number" 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="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 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>
 
}}
 
}}
Line 306: Line 312:
 
|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=<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" 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="text" class="form-control mt-2" name="Social acceptability text" placeholder="Evidence" value="{{{Social acceptability text|}}}" />
 
<wsfield type="text" class="form-control mt-2" name="Social acceptability text" placeholder="Evidence" value="{{{Social acceptability text|}}}" />
 
}}
 
}}
Line 312: Line 318:
 
|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=<div class="d-flex"><wsfield type="text" class="form-control" name="Label" value="{{{Label|}}}" placeholder="label" />
<span class="percentage"><wsfield type="number" class="form-control form-number" 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="text" class="form-control mt-2" name="Label text" placeholder="Evidence" value="{{{Label text|}}}" />
 
<wsfield type="text" class="form-control mt-2" name="Label text" placeholder="Evidence" value="{{{Label text|}}}" />
 
}}
 
}}

Revision as of 09:19, 19 May 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= 
}}