app/templates/contacts/show/edit.hbs
<div class="panel panel-transparent" id="contact-member">
<div class="panel-body">
<div class="col-md-9 col-md-offset-3">
<h3 class="edit">
Update Contact
</h3>
{{#each this.flashMessages.queue as |flash|}}
<FlashMessage @flash={{flash}} />
{{/each}}
</div>
<BsForm
@formLayout="horizontal"
class="form-horizontal"
@horizontalLabelGridClass="col-md-3"
@model={{this.model}}
@onSubmit={{action 'submit' this.model}}
@submitOnEnter={{true}} as |form|
>
<form.element
@controlType="text"
id="givenName"
class="form-group"
@label="Given Name"
@property="givenName" as |el|
>
<el.control id="givenName-field" />
</form.element>
<form.element
@controlType="text"
id="familyName"
class="form-group"
@label="Family Name"
@property="familyName"as |el|
>
<el.control id="familyName-field" />
</form.element>
<form.element
@controlType="email"
id="email"
class="form-group"
@label="Email"
@property="email"
@helpText="Please enter a valid email address." as |el|
>
<el.control id="email-field" />
</form.element>
<form.element
@controlType="text"
id="roles"
class="form-group"
@label="Roles"
@property="roleNameString"
@helpText="Please assign roles in the
{{if
(eq this.model.provider.memberType 'consortium_organization')
'Consortium Organization'
'Member'
}}
Settings."
readonly as |el|
>
<el.control id="roles-field" />
</form.element>
<div class="col-md-offset-3">
<BsAlert @dismissible={{false}} class="opt-in" @type="warning">
The contact may receive notifications about administration, webinars, product testing,
or news that will impact the use of DataCite services and/or membership. Individuals may remove
themselves from mailings by following the unsubscribe link provided in every DataCite email.
For information about our privacy practices and commitment to protecting your privacy, please
review our
<a
target="_blank" rel="noopener noreferrer" href={{get (links) "PRIVACY_POLICY_URL" }}
>
Privacy Policy
</a>
.
</BsAlert>
</div>
<div class="col-md-9 col-md-offset-3">
{{#if (is-empty (contact-form-errors this.model))}}
<button
type="submit"
id="update-contact"
class="btn btn-sm btn-fill"
disabled={{false}}
>
Update Contact
</button>
{{else}}
<BsAlert @dismissible={{false}} @type="danger">
To save this contact, first resolve the errors with these fields:
{{contact-form-errors this.model}}
.
</BsAlert>
<button
type="submit"
id="update-contact"
class="btn btn-sm btn-fill"
disabled={{true}}
>
Update Contact
</button>
{{/if}}
<button class="btn btn-sm" type="button" {{action 'cancel' this.model}}>
Cancel
</button>
</div>
</BsForm>
</div>
</div>