This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/pods/protected/strains/strain-form/template.hbs
2015-11-10 14:35:17 -07:00

69 lines
2.4 KiB
Handlebars

<form class="grid-form" {{action 'save' on='submit'}}>
<fieldset>
<legend><em>{{strainName}}</em></legend>
<div data-row-span="2">
<div data-field-span="1">
<label>Strain Name</label>
{{one-way-input type="text" class="strain-name" value=strainName update=(action "strainNameDidChange")}}
</div>
<div data-field-span="1">
<label>Type Strain?</label>
<input type="checkbox" checked={{typeStrain}} value="{{typeStrain}}" onchange={{action "typeStrainDidChange"}}>
{{if typeStrain 'Yes' 'No'}}
</div>
</div>
<div data-row-span="2">
<div data-field-span="2">
<label>Species</label>
<select onchange={{action "speciesDidChange" value="target.value"}}>
{{#each speciesList as |speciesChoice|}}
<option value={{speciesChoice.id}} selected={{equal species.id speciesChoice.id}}>{{speciesChoice.speciesName}}</option>
{{/each}}
</select>
</div>
</div>
<div data-row-span="2">
<div data-field-span="2">
<label>Isolated From</label>
{{text-editor value=isolatedFrom update=(action "isolatedFromDidChange")}}
</div>
</div>
<div data-row-span="3">
<div data-field-span="1">
<label>Accession Numbers</label>
{{one-way-input type="text" class="accession-numbers" value=accessionNumbers update=(action "accessionNumbersNameDidChange")}}
</div>
<div data-field-span="1">
<label>GenBank</label>
{{one-way-input type="text" class="genbank" value=genbank update=(action "genbankDidChange")}}
</div>
<div data-field-span="1">
<label>Whole Genome Sequence</label>
{{one-way-input type="text" class="whole-genome-sequenc" value=wholeGenomeSequence update=(action "wholeGenomeSequenceDidChange")}}
</div>
</div>
<div data-row-span="2">
<div data-field-span="2">
<label>Notes</label>
{{text-editor value=notes update=(action "notesDidChange")}}
</div>
</div>
</fieldset>
<div>
{{
protected/strains/measurements-table
model=strain
canEdit=strain.canEdit
canAdd=canAdd
}}
</div>
<br>
<a class="button-red smaller" {{action 'cancel'}}>
Cancel
</a>
{{#if isDirty}}
<button type="submit" class="button-green smaller save-strain">
Save
</button>
{{/if}}
</form>