This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
foundryvtt-beam-saber/templates/items/cohort.html
Megastruktur ff7197455c GH-91
- Closes #91
- Fixes Edges and Flaws selection for Cohorts
2021-01-04 17:27:11 +03:00

122 lines
4.2 KiB
HTML

<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="{{localize 'BITD.Name'}}"/></h1>
</div>
</header>
<section class="flex-vertical">
<div class="label-stripe">{{localize "BITD.Information"}}</div>
<div>{{{localize "BITD.AddAdditionalTypeOfGangText"}}}</div>
</section>
<section class="flex-vertical">
<div class="label-stripe">{{localize "BITD.CohortType"}}</div>
<div id="cohort-type-list">
{{#each data.cohort_list as |cohort key|}}
{{#multiboxes ../data.cohort}}
<label for="{{key}}-cohort">{{localize cohort.label}}</label>
<input id="{{key}}-cohort" type="radio" name="data.cohort" value="{{key}}">
{{/multiboxes}}
{{/each}}
</div>
</section>
<section id="gang-expert-type-selector" class="flex-vertical">
{{#if (eq data.cohort "Gang")}}
<div class="label-stripe">{{localize "BITD.GangType"}}</div>
<div id="gang-type-boxes" class="flex-horizontal">
<select name="data.gang_type" multiple>
{{selectOptionsWithLabel data.gang_type_list selected=data.gang_type localize=true}}
</select>
</div>
<div id="selected-gang-description" class="description">
{{#each data.gang_type as |gang_type key|}}
{{#with (lookup ../data.gang_type_list gang_type)}}
{{localize description}}
{{/with}}
{{/each}}
</div>
{{/if}}
{{#if (eq data.cohort "Expert")}}
<div class="label-stripe">{{localize "BITD.ExpertType"}}</div>
<input type="text" name="data.expert_type" value="{{data.expert_type}}">
{{/if}}
</section>
{{!-- Scale and Quality if attached to Actor --}}
{{#if data.quality}}
<section id="quality-scale" class="flex-vertical">
<div class="label-stripe">{{localize "BITD.ScaleAndQuality"}}</div>
<div>{{localize "BITD.Quality"}}: {{data.quality}}</div>
<div>{{localize "BITD.Scale"}}: {{data.scale}}</div>
</section>
{{/if}}
{{!-- Edges and Flaws --}}
<section id="edges-flaws" class="flex-vertical">
<div class="label-stripe">{{localize "BITD.ChooseOneOrTwoEdges"}}</div>
<div class="flex-horizontal">
<div class="edgeflaw-container flex-vertical">
<div class="label-stripe">{{localize "BITD.Edges"}}</div>
{{#each data.edges_list as |edge key|}}
<div class="edgeflaw flex-horizontal">
<input id="cohort-{{item._id}}-edge-{{key}}" type="checkbox" name="data.edges_list.{{key}}.selected"
{{checked edge.selected}}>
<label for="cohort-{{item._id}}-edge-{{key}}">{{localize edge.label}}</label>
</div>
{{/each}}
</div>
<div class="edgeflaw-container flex-vertical">
<div class="label-stripe">{{localize "BITD.Flaws"}}</div>
{{#each data.flaws_list as |flaw key|}}
<div class="edgeflaw flex-horizontal">
<input id="cohort-{{item._id}}-flaw-{{key}}" type="checkbox" name="data.flaws_list.{{key}}.selected"
{{checked flaw.selected}}>
<label for="cohort-{{item._id}}-flaw-{{key}}">{{localize flaw.label}}</label>
</div>
{{/each}}
</div>
</div>
</section>
<section id="cohort-harm" class="flex-vertical">
<div class="label-stripe">{{localize "BITD.Harm"}}</div>
<div id="harm-list" class="flex-horizontal">
{{#multiboxes data.harm}}
{{#each data.harm_list as |harm harm_key|}}
<input id="{{harm_key}}-harm" type="radio" name="data.harm" value="{{harm_key}}">
<label for="{{harm_key}}-harm">{{localize harm.label}}</label>
{{/each}}
{{/multiboxes}}
</div>
</section>
<section>
<input id="cohort-armor" type="checkbox" name="data.armor" value="{{data.armor}}" {{checked data.armor}}>
<label for="cohort-armor">{{localize "BITD.Armor"}}</label>
</section>
<section class="sheet-body flex-vertical">
<div class="label-stripe">{{localize "BITD.Description"}}</div>
<textarea name="data.description">{{data.description}}</textarea>
</section>
</form>