{{#f.content class='form'}}
{{#with changesets.model as |changeset|}}
{{#validated-field property='project' label='Project' changeset=changeset}}
{{#power-select
options=options.projects
selected=changeset.project
onchange=(action (mut changeset.project))
searchField='name'
as |project|
}}
{{project.name}}
{{/power-select}}
{{/validated-field}}
{{#validated-field property='adfgPermit' label='ADFG Permit' changeset=changeset}}
{{#power-select-with-create
options=options.adfgPermits
selected=changeset.adfgPermit
onchange=(action (mut changeset.adfgPermit))
oncreate=(action 'addOption' 'adfg-permit' 'adfgPermits' 'adfgPermit' 'name')
searchField='name'
as |adfgPermit term|
}}
{{adfgPermit.name}}
{{/power-select-with-create}}
{{/validated-field}}
{{#validated-field property='studyLocation' changeset=changeset}}
{{#power-select
search=(action 'searchStudyLocation')
options=options.studyLocations
selected=changeset.studyLocation
onchange=(action (mut changeset.studyLocation))
searchField='code'
as |studyLocation|
}}
{{studyLocation.code}}
{{/power-select}}
{{/validated-field}}
{{#validated-field property='collectionType' label='Collection type' changeset=changeset}}
{{#power-select
options=options.collectionTypes
selected=changeset.collectionType
onchange=(action (mut changeset.collectionType))
searchField='name'
as |collectionType|
}}
{{collectionType.name}}
{{/power-select}}
{{/validated-field}}
{{#validated-field property='collectionMethod' label='Collection method' changeset=changeset}}
{{#power-select
options=options.collectionMethods
selected=changeset.collectionMethod
onchange=(action (mut changeset.collectionMethod))
searchField='name'
as |collectionMethod|
}}
{{collectionMethod.name}}
{{/power-select}}
{{/validated-field}}
{{#validated-field property='numberOfTraps' label='Number of traps' changeset=changeset}}
{{input value=changeset.numberOfTraps type='number' class='form-control'}}
{{/validated-field}}
{{#validated-field property='collectionStartDate' label='Collection start date' changeset=changeset}}
{{input value=changeset.collectionStartDate type='date' class='form-control'}}
{{/validated-field}}
{{#validated-field property='collectionStartTime' label='Collection start time' changeset=changeset}}
{{input value=changeset.collectionStartTime type='time' class='form-control'}}
{{/validated-field}}
{{#validated-field property='collectionEndDate' label='Collection end date' changeset=changeset}}
{{input value=changeset.collectionEndDate type='date' class='form-control'}}
{{/validated-field}}
{{#validated-field property='collectionEndTime' label='Collection end time' changeset=changeset}}
{{input value=changeset.collectionEndTime type='time' class='form-control'}}
{{/validated-field}}
{{/with}}
{{/f.content}}