7cd023a21b
Co-authored-by: Manuel Wiedenmann <manuel@funkensturm.de>
80 lines
2.4 KiB
Handlebars
80 lines
2.4 KiB
Handlebars
<form {{on "submit" this.submit}} novalidate>
|
|
<label>
|
|
<p class="label">Contributor:</p>
|
|
<p>
|
|
<select required {{on "change" this.updateContributor}}>
|
|
<option value="" selected disabled hidden></option>
|
|
{{#each this.contributors as |contributor|}}
|
|
<option value={{contributor.id}} selected={{eq this.contributorId contributor.id}}>{{contributor.name}}</option>
|
|
{{/each}}
|
|
</select>
|
|
</p>
|
|
</label>
|
|
<fieldset class="horizontal thirds total-amounts">
|
|
<label>
|
|
<p class="label">Total amount (BTC):</p>
|
|
<p>
|
|
<Input @type="text"
|
|
@placeholder="0.0015"
|
|
@value={{this.total}}
|
|
@required={{true}}
|
|
@pattern="([0-9]*[.])?[0-9]+"
|
|
@class={{this.totalInputClass}} />
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">EUR total</p>
|
|
<p>
|
|
<Input @type="text"
|
|
@name="total-eur"
|
|
@value={{this.totalEUR}}
|
|
@disabled={{true}} />
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">USD total</p>
|
|
<p>
|
|
<Input @type="text"
|
|
@name="total-usd"
|
|
@value={{this.totalUSD}}
|
|
@disabled={{true}} />
|
|
</p>
|
|
</label>
|
|
</fieldset>
|
|
|
|
<h3>Expense items</h3>
|
|
{{#if this.expenses}}
|
|
<ExpenseList @expenses={{this.expenses}}
|
|
@removeExpenseItem={{this.removeExpenseItem}}
|
|
@deletable={{true}} />
|
|
|
|
<p class="actions">
|
|
<button {{on "click" this.showExpenseForm}}
|
|
class="green small" type="button">+ Add another item</button>
|
|
</p>
|
|
{{else}}
|
|
<p>No line items yet.</p>
|
|
{{/if}}
|
|
|
|
<p class="actions">
|
|
{{#if this.inProgress}}
|
|
<Input @type="submit" @value="Submitting..." @disabled={{true}}
|
|
@title="Submit/propose this reimbursement" />
|
|
{{else}}
|
|
<Input @type="submit" @value="Submit" @disabled={{this.submitButtonDisabled}}
|
|
@title="Submit/propose this reimbursement" />
|
|
{{/if}}
|
|
</p>
|
|
|
|
{{#if this.expenseFormVisible}}
|
|
<h3 id="new-expense-item">New expense item</h3>
|
|
<AddExpenseItem @addExpenseItem={{fn this.addExpenseItem}} />
|
|
{{/if}}
|
|
</form>
|
|
<form id="add-expenses-from-file">
|
|
<h3>Add expense items from file</h3>
|
|
<input type="file" multiple="false"
|
|
onchange={{fn this.addExpensesFromFile}}
|
|
accept="application/json" />
|
|
</form>
|