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/species/species-form/template.hbs
2015-11-04 12:26:43 -07:00

46 lines
1.4 KiB
Handlebars

<form class="grid-form" {{action 'save' on='submit'}}>
<fieldset>
<legend><em>{{speciesName}}</em></legend>
<div data-row-span="2">
<div data-field-span="1">
<label>Species Name</label>
{{one-way-input type="text" class="species-name" value=speciesName update=(action "speciesNameDidChange")}}
</div>
<div data-field-span="1">
<label>Type Species?</label>
<input type="checkbox" checked={{typeSpecies}} value="{{typeSpecies}}" onchange={{action "typeSpeciesDidChange"}}>
{{if typeSpecies 'Yes' 'No'}}
</div>
</div>
{{#unless isNew}}
<div data-row-span="1">
<div data-field-span="1">
<label>Strains</label>
{{#each strains as |strain index|}}
{{if index ","}}
{{#link-to 'protected.strains.show' strain.id}}
{{{strain.strainNameMU}}}
{{/link-to}}
{{/each}}
{{add-button label="Add Strain" link="protected.strains.new" canAdd=metaData.canAdd}}
</div>
</div>
{{/unless}}
<div data-row-span="1">
<div data-field-span="1">
<label>Etymology</label>
{{text-editor value=etymology update=(action "etymologyDidChange")}}
</div>
</div>
</fieldset>
<br>
<a class="button-red smaller" {{action 'cancel'}}>
Cancel
</a>
{{# if isDirty}}
<button type="submit" class="button-green smaller save-species">
Save
</button>
{{/if}}
</form>