Skip to content

Frontend/licensee change email #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion webroot/src/components/Forms/_mixins/form.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ class MixinForm extends Vue {

this.formKeys.forEach((key) => {
if (!formData[key].isSubmitInput && (!formData[key].isDisabled || this.shouldValuesIncludeDisabled)) {
values[key] = formData[key].value;
if (typeof formData[key].value === 'string') {
values[key] = formData[key].value.trim();
} else {
values[key] = formData[key].value;
}
}
});

Expand Down
12 changes: 10 additions & 2 deletions webroot/src/components/Forms/_mixins/mixins.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ describe('Form mixin', async () => {
const wrapper = await mountShallow(FormMixin);
const component = wrapper.vm;

component.formData = { id: { value: 1 }};
component.formData = {
id: { value: 1 },
name: { value: ' name ' },
};

expect(component.formValues).to.matchPattern({ id: 1 });
expect(component.formValues).to.matchPattern(
{
id: 1,
name: 'name',
}
);
});
it('should get custom form values (exclude disabled by default)', async () => {
const wrapper = await mountShallow(FormMixin);
Expand Down
112 changes: 112 additions & 0 deletions webroot/src/components/UserAccount/UserAccount.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,118 @@
}
}

.confirm-email-modal {
:deep(.modal-container) {
width: 95%;
max-width: 60rem;
padding: 2rem;

@media @tabletWidth {
padding: 4rem;
}

.modal-title {
margin: 0 auto;
text-align: center;
}

.modal-content {
padding-top: 0.6rem;

.confirm-email-subtext {
margin-bottom: 1.6rem;
font-size: 1.8rem;
text-align: center;
}

.verification-code-input-container {
justify-self: center;
width: 100%;
max-width: 24rem;

label {
justify-content: center;
font-size: 2rem;
}

input {
border-top: 0;
border-right: 0;
border-left: 0;
border-radius: 0;
font-size: 2.4rem;
text-align: center;
outline: 0;
}
}

.verification-code-success {
display: flex;
flex-direction: column;
align-items: center;
font-weight: @fontWeightBold;
font-size: 2.4rem;
text-align: center;

.icon-container {
display: flex;
align-items: center;
justify-content: center;
width: 6.4rem;
height: 6.4rem;
margin-bottom: 1.6rem;
border-radius: 50%;
overflow: hidden;
background-color: @lightGreen;

.icon-check-circle {
width: 100%;
fill: @white;
}
}
}

.modal-error {
margin-top: 2.4rem;
color: @midRed;
text-align: center;
}

.action-button-row {
display: flex;
flex-direction: column;
margin-top: 2rem;

@media @desktopWidth {
flex-direction: row-reverse;
flex-wrap: wrap;
justify-content: center;
margin-top: 4rem;
}

.action-button {
margin-bottom: 1rem;

@media @desktopWidth {
&:not(:last-child) {
margin-left: 2.4rem;
}
}

.input-button,
.input-submit {
width: 100%;

@media @desktopWidth {
width: auto;
}
}
}
}
}
}
}

.military-status-container {
margin-top: 2rem;
padding-top: 3rem;
Expand Down
Loading