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-12-02 10:47:07 -07:00

83 lines
2.6 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>
{{
x-select
options=sortedSpeciesList
nameAttr='speciesName'
selected=species.id
update=(action "speciesDidChange")
}}
</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="2">
<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>
<div data-row-span="1">
<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>
{{#if isNew}}
<div>
Please save before adding measurements
</div>
{{else}}
<div>
{{
protected/strains/measurements-table
measurements=measurements
add-measurement=(action "addMeasurement")
allCharacteristics=sortedCharacteristics
save-measurement=(action "saveMeasurement")
delete-measurement=(action "deleteMeasurement")
canEdit=strain.canEdit
canAdd=metaData.canAdd
}}
</div>
{{/if}}
<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>