a9480a09f1
After adding it as a separate field, I figured out that we should use the same picker, because otherwise we'd have to keep the date in sync depending on the time zone. Zones are too messy in that regard, and the date is already normalized to UTC before creating the contribution record. closes #141
73 lines
2.1 KiB
Handlebars
73 lines
2.1 KiB
Handlebars
<form {{action "submit" on="submit"}}>
|
|
<label>
|
|
<p class="label">Contributor:</p>
|
|
<p>
|
|
<select required onchange={{action (mut contributorId) value="target.value"}}>
|
|
<option value="" selected disabled hidden></option>
|
|
{{#each contributors as |contributor|}}
|
|
<option value={{contributor.id}} selected={{eq contributorId contributor.id}}>{{contributor.name}}</option>
|
|
{{/each}}
|
|
</select>
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">Kind:</p>
|
|
<p>
|
|
<select required onchange={{action (mut kind) value="target.value"}}>
|
|
<option value="" selected disabled hidden></option>
|
|
<option value="community" selected={{eq kind "community"}}>Community</option>
|
|
<option value="design" selected={{eq kind "design"}}>Design</option>
|
|
<option value="dev" selected={{eq kind "dev"}}>Development</option>
|
|
<option value="docs" selected={{eq kind "docs"}}>Documentation</option>
|
|
<option value="ops" selected={{eq kind "ops"}}>IT Operations</option>
|
|
<option value="special" selected={{eq kind "special"}}>Special</option>
|
|
</select>
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">Date:</p>
|
|
<p>
|
|
{{ember-flatpickr
|
|
date=date
|
|
defaultDate=defaultDate
|
|
maxDate=defaultDate
|
|
enableTime=true
|
|
time_24hr=true
|
|
onChange=(action (mut date))
|
|
}}
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">Amount:</p>
|
|
<p>
|
|
{{input type="text"
|
|
placeholder="500"
|
|
value=amount
|
|
class=(if isValidAmount "valid" "")}}
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">Description:</p>
|
|
<p>
|
|
{{input type="text"
|
|
value=description
|
|
class=(if isValidDescription "valid" "")}}
|
|
</p>
|
|
</label>
|
|
<label>
|
|
<p class="label">URL (optional):</p>
|
|
<p>
|
|
{{input type="text"
|
|
value=url
|
|
class=(if isValidUrl "valid" "")}}
|
|
</p>
|
|
</label>
|
|
|
|
<p class="actions">
|
|
{{input type="submit"
|
|
disabled=inProgress
|
|
value=(if inProgress "Processing" "Save")}}
|
|
</p>
|
|
</form>
|
|
|