table.ui.definition.table
  tr
    td= t 'attributes.organization.name'
    td= validated-input attribute='name' enter="saveRecord" changeset=model
  unless model.isNew
    tr
      td= t 'attributes.organization.logo'
      td
        if model._content.logo
          img src=model._content.logo_url.small
          = file-upload name='logo' onfileadd=(route-action "setLogo" model._content)
            a.ui.button id="upload-image" tabindex=0
              i.upload.icon
              span Replace logo
        else
          = file-upload name='logo' onfileadd=(route-action "setLogo" model._content)
            a.ui.button id="upload-image" tabindex=0
              i.upload.icon
              span Add logo
  tr
    td= t 'models.plural.user'
    td= ui-multi-select options=possible_users labelProperty='nickname' selected=selected_users placeholder='organization.select_users.placeholder'
.modal-actions.sticky
  button.ui.primary.button.modal-save.pull-right{ action "saveRecord"}= t 'general.save'
  button.ui.negative.button.modal-destroy.pull-right{ action "destroyRecord"}= t 'general.destroy.button'
  button.ui.basic.button.modal-rollback{ action "rollback_and_close"}= t 'general.rollback'
