datacite/bracco

View on GitHub
app/templates/components/doi-related-item-contributor.hbs

Summary

Maintainability
Test Coverage
<div>
  <label for="name" class="subtitle">Contributor Name</label>
  <div class="input-group">
    <input type="text" class="form-control name-field" value={{this.fragment.name}} placeholder="Name" oninput={{action "updateName" value="target.value"}} data-test-related-item-contributor-name/>
    <span class="input-group-btn">
        <BsButton @outline={{true}} @onClick={{action "deleteRelatedItemContributor" this.index}}><i class="fas fa-trash"></i></BsButton>
    </span>
  </div>
</div>

<label for="contributorType" class="subtitle">Contributor Type</label>
  <div class="power-select-fragment" doi-related-item-contributor-type>
    <@form.element @controlType="power-select" @value={{this.humanContributorType}} @helpText="The type of contributor of the resource." @options={{this.humanContributorTypes}} @formLayout="vertical" @selected={{this.humanContributorType}} @destination={{this.humanContributorType}} as |el|>
      <el.control @allowClear={{true}} @onChange={{action "selectContributorType"}} @placeholder="Select Contributor Type" @disabled={{this.disabled}} @searchEnabled={{true}} />
    </@form.element>
</div>