Fix and generalize styling for member form macro
Only display permissions with 'Edit' value Delete unused files and rename MemberForm macro file
This commit is contained in:
65
templates/components/member_form.html
Normal file
65
templates/components/member_form.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!-- Layout macro -->
|
||||
{% macro MemberForm(title=None, next_button=None, previous=True, modal=modal) %}
|
||||
<div class="member-form">
|
||||
<hr class="full-width">
|
||||
{% if title %} <h1>{{ title }}</h1> {% endif %}
|
||||
|
||||
{{ caller() }}
|
||||
</div>
|
||||
<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='{{ "common.previous" | translate }}'>
|
||||
{% endif %}
|
||||
<a class='action-group__action' v-on:click="closeModal('{{ modal }}')">{{ "common.cancel" | translate }}</a>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- Step macros to use with MultiStepModalForm -->
|
||||
{% macro BasicStep(
|
||||
title=None,
|
||||
form=form,
|
||||
next_button_text=next_button_text,
|
||||
previous=True,
|
||||
modal=modal
|
||||
) %}
|
||||
{% set next_button %}
|
||||
<input
|
||||
type='button'
|
||||
v-on:click="next()"
|
||||
v-bind:disabled="!canSave"
|
||||
class='action-group__action usa-button'
|
||||
value='{{ next_button_text }}'>
|
||||
{% endset %}
|
||||
|
||||
{% call MemberForm(title=title, next_button=next_button, previous=previous, modal=modal) %}
|
||||
{{ form }}
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro SubmitStep(
|
||||
name=name,
|
||||
title=None,
|
||||
form=form,
|
||||
submit_text=submit_text,
|
||||
previous=True,
|
||||
modal=modal
|
||||
) %}
|
||||
{% set next_button %}
|
||||
<input
|
||||
type="submit"
|
||||
class='action-group__action usa-button'
|
||||
form="{{ name }}"
|
||||
v-bind:disabled="!canSave"
|
||||
value='{{ submit_text }}'>
|
||||
{% endset %}
|
||||
|
||||
{% call MemberForm(title=title, next_button=next_button, previous=previous, modal=modal) %}
|
||||
{{ form }}
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
Reference in New Issue
Block a user