ncbo/bioportal_web_ui

View on GitHub
app/views/change_requests/_create_synonym.html.haml

Summary

Maintainability
Test Coverage
%div{class: 'modal-header'}
  %h5{class: 'modal-title', id: 'changeRequestModalLabel'}
    = "Add synonym proposal for #{@concept_label}"
  %button{type: 'button', class: 'btn-close', 'data-bs-dismiss': 'modal', 'aria-label': 'Close'}
= form_with scope: :create_synonym, url: change_requests_path, local: false do |f|
  = hidden_field_tag 'concept_id', @concept_id
  = hidden_field_tag 'concept_label', @concept_label
  = hidden_field_tag 'ont_acronym', @ont_acronym
  = hidden_field_tag 'username', @username
  = hidden_field_tag 'operation', KGCL::Operations::NEW_SYNONYM
  %div{class: 'modal-body'}
    %div.mb-3
      = f.label :preferred_label, 'Label', class: 'form-label'
      = f.text_field :preferred_label, class: 'form-control'
    %div.mb-3
      = f.label :qualifier, 'Type', class: 'form-label'
      = synonym_qualifier_select(f)
    %div.mb-3
      = f.label :comment, 'Comment', class: 'form-label'
      = f.text_area :comment, rows: 5, class: 'form-control'
  %div{class: 'modal-footer'}
    %button{type: 'button', class: 'btn btn-secondary', 'data-bs-dismiss': 'modal'} Close
    = submit_tag 'Submit', id: 'create_synonym_button', class: 'btn btn-primary'