{% embed '@ui2022/schoolnow/modal--sidepanel__content.html.twig' with {} %}
{% form_theme form '@ui2022/schoolnow/forms/themes/default.html.twig' %}
{% from "@ui2022/macros.html.twig" import renderMetadata %}
{% block header %}
{% include '@App/dashboard/settings/accounts/includes/_header.html.twig' with {
active: 'account',
} %}
{% endblock %}
{% block body %}
<div class="contacts">
<div class="row justify-content-end">
<span class="font-13 text-medium mb-3 col-auto">Last modified: {{ account.touchedAt ? account.touchedAt|ui_relativeDate : '-' }}</span>
</div>
{% if account.internalUid %}
<div class="row justify-content-end">
<span class="font-13 text-medium mb-3 col-auto">Internal UID: {{ account.internalUid }}</span>
</div>
{% endif %}
<div class="sidepanel__content--body">
<div class="contacts__tabs">
{% include '@App/dashboard/settings/accounts/includes/_tabs.html.twig' with {
active: 'account',
} %}
<div class="tab-content">
{% if not account.oneroster %}
{{ form_start(form, {
action: path('app.app.dashboard.settings.accounts.update', {
account: account.id,
}),
attr: {
target: '_modal',
},
}) }}
<div class="formcontainer formfield-colored" style="max-width: 720px;">
<div class="row mt-5">
<div class="col">
{{ form_row(form.email) }}
</div>
</div>
<div class="row mt-4">
<div class="col-6">
{{ form_row(form.systemProfile.firstName) }}
</div>
<div class="col-6">
{{ form_row(form.systemProfile.lastName) }}
</div>
</div>
<div class="row mt-4">
<div class="col">
{{ form_row(form.password) }}
</div>
</div>
<div class="row mt-3">
<div class="col">
{{ form_row(form.notify) }}
</div>
</div>
</div>
<div class="d-flex align-items-center mt-5 mb-3">
{% include '@ui2022/button--form.html.twig' with {
type: 'submit',
text: 'Save',
styles: 'md primary',
attr: {
class: 'px-4 mr-3',
},
} %}
{% include '@ui2022/button--button.html.twig' with {
text: 'Cancel',
styles: 'md lightgray',
attr: {
class: 'px-4',
'data-dismiss': 'sidepanel',
},
} %}
</div>
{{ form_end(form) }}
{% else %}
<div class="row justify-content-between mt-5">
<h3 class="col-auto">Account metadata</h3>
</div>
<div class="row pt-3">
<div class="col">
{% if account.metadata %}
{{ renderMetadata(account.metadata) }}
{% else %}
<p>Account has no metadata.</p>
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% endembed %}