Skip to content

Commit

Permalink
fix item typpe check
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMonette committed Nov 3, 2021
1 parent 21bdd52 commit a5a9160
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 16 deletions.
8 changes: 4 additions & 4 deletions templates/partials/item-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="item-header-first-collum">
<h1 class="itemname"><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
<div class="item-header-row">
{{#unless data.isSpell}}
{{#unless (eq item.type "spell")}}
<div class="item-header-second-collum">
<label>{{localize "WITCHER.Item.Quantity"}}</label>
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number" />
Expand All @@ -13,7 +13,7 @@ <h1 class="itemname"><input name="name" type="text" value="{{item.name}}" placeh
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number" />
</div>
<div class="item-header-second-collum">
{{#if data.isMutagen}}
{{#if (eq item.type "mutagen")}}
<label>{{localize "WITCHER.Type"}}</label>
<select name="data.type" id="type-select">
{{#select data.type}}
Expand All @@ -23,13 +23,13 @@ <h1 class="itemname"><input name="name" type="text" value="{{item.name}}" placeh
{{/select}}
</select>
{{/if}}
{{#unless data.isMutagen}}
{{#unless (eq item.type "mutagen")}}
<label>{{localize "WITCHER.Item.Cost"}}</label>
<input type="text" name="data.cost" value="{{data.cost}}" data-dtype="Number"/>
{{/unless}}
</div>
{{/unless}}
{{#if data.isSpell}}
{{#if (eq item.type "spell")}}
<div class="item-header-second-collum item-header-spell">
<label>{{localize "WITCHER.Spell.type"}}</label>
<select name="data.class" id="profession-select">
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/alchemical-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}

{{!-- Attributes Tab --}}
<table>
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/armor-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum">
<div class="item-option-tickbox">
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/component-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum">
<label>{{localize "WITCHER.Type"}}</label>
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/diagrams-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum">
<div class="item-option-tickbox">
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/enhancement-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum">
<label>{{localize "WITCHER.Type"}}:</label>
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/mount-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="description">{{localize "WITCHER.Item.Description"}}</a>
Expand Down
3 changes: 1 addition & 2 deletions templates/sheets/mutagen-sheet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
<input type="hidden" name="data.isMutagen" value="data.isMutagen"/>
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<table>
<tr>
<th>{{localize "WITCHER.Mutagen.MutSource"}}</th>
Expand Down
3 changes: 1 addition & 2 deletions templates/sheets/spell-sheet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
<input type="hidden" name="data.isSpell" value="data.isSpell"/>
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum">
<div class="item-option-tickbox">
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/valuable-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum item-selector">
<label>{{localize "WITCHER.Type"}}</label>
Expand Down
2 changes: 1 addition & 1 deletion templates/sheets/weapon-sheet.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="{{cssClass}}" autocomplete="off">
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
{{>"systems/TheWitcherTRPG/templates/partials/item-header.html"}}
<div class="item-options">
<div class="item-collum">
<div class="item-option-tickbox">
Expand Down

0 comments on commit a5a9160

Please sign in to comment.