103 lines
3.7 KiB
HTML
103 lines
3.7 KiB
HTML
{% from "components/icon.html" import Icon %}
|
|
{% from "components/text_input.html" import TextInput %}
|
|
{% from "components/checkbox_input.html" import CheckboxInput %}
|
|
{% from "components/phone_input.html" import PhoneInput %}
|
|
|
|
{% macro MemberFormTemplate(title, next_button, previous=True) %}
|
|
<div class="modal__form--header">
|
|
<h1>{{ Icon('avatar') }} {{ title }}</h1>
|
|
<hr>
|
|
</div>
|
|
|
|
{{ caller() }}
|
|
|
|
<div class='action-group'>
|
|
{{ next_button }}
|
|
{% if previous %}
|
|
<input
|
|
type='button'
|
|
v-on:click="previous()"
|
|
class='action-group__action usa-button usa-button-secondary'
|
|
value='Previous'>
|
|
{% endif %}
|
|
<a class='action-group__action icon-link icon-link--default' v-on:click="closeModal('{{ new_port_mem }}')">{{ "common.cancel" | translate }}</a>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro MemberStepOne(new_member_form) %}
|
|
{% set next_button %}
|
|
<input
|
|
type='button'
|
|
v-on:click="next()"
|
|
v-bind:disabled="invalid"
|
|
class='action-group__action usa-button'
|
|
value='Next'>
|
|
{% endset %}
|
|
|
|
{% call MemberFormTemplate(title="Add Member", next_button=next_button, previous=False) %}
|
|
<div class='form-row'>
|
|
{{ TextInput(new_member_form.user_data.first_name, validation='requiredField', optional=False) }}
|
|
</div>
|
|
<div class='form-row'>
|
|
{{ TextInput(new_member_form.user_data.last_name, validation='requiredField', optional=False) }}
|
|
</div>
|
|
<div class='form-row'>
|
|
{{ TextInput(new_member_form.user_data.email, validation='email', optional=False) }}
|
|
</div>
|
|
<div class="form-row">
|
|
{{ PhoneInput(new_member_form.user_data.phone_number, new_member_form.user_data.phone_ext)}}
|
|
</div>
|
|
<div class='form-row'>
|
|
{{ TextInput(new_member_form.user_data.dod_id, validation='dodId', optional=False) }}
|
|
</div>
|
|
{% endcall %}
|
|
{% endmacro %}
|
|
{% macro MemberStepTwo(new_member_form, application) %}
|
|
{% set next_button %}
|
|
<input
|
|
type="submit"
|
|
class='action-group__action usa-button'
|
|
form="add-app-mem"
|
|
value='Add Member'>
|
|
{% endset %}
|
|
|
|
{% call MemberFormTemplate(title="Set Permissions and Roles", next_button=next_button) %}
|
|
<h4>Project Permissions</h4>
|
|
<div class="application-perms">
|
|
{{ CheckboxInput(new_member_form.permission_sets.perms_team_mgmt, classes="input__inline-fields") }}
|
|
{{ CheckboxInput(new_member_form.permission_sets.perms_env_mgmt, classes="input__inline-fields") }}
|
|
{{ CheckboxInput(new_member_form.permission_sets.perms_del_env, classes="input__inline-fields") }}
|
|
</div>
|
|
<div class="environment-roles-new">
|
|
<h4>Environment Access</h4>
|
|
<hr>
|
|
{% for environment_data in new_member_form.environment_roles %}
|
|
<optionsinput inline-template
|
|
v-bind:initial-value="'{{ environment_data.role.data | string }}'"
|
|
v-bind:name="'{{ environment_data.name | string }}'"
|
|
v-bind:optional="true"
|
|
>
|
|
<div class="usa-input">
|
|
<fieldset data-ally-disabled="true" class="usa-input__choices">
|
|
<div class="form-row">
|
|
<div class="form-col form-col--two-thirds">
|
|
<legend>
|
|
<div v-bind:class='["usa-input__title-inline", {"environment-name--gray": value === "None" }]'>
|
|
{{ environment_data.environment_name.data }}
|
|
</div>
|
|
</legend>
|
|
</div>
|
|
<div class="form-col form-col--third">
|
|
{{ environment_data.role(**{"v-model": "value"}) }}
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</optionsinput>
|
|
{{ environment_data.environment_id() }}
|
|
<hr>
|
|
{% endfor %}
|
|
</div>
|
|
{% endcall %}
|
|
{% endmacro %}
|