Adds message on submit of contact form
This commit is contained in:
parent
e2326e1070
commit
9fd33e421b
|
@ -26,8 +26,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!isDialog" class="row contact-actions">
|
<div *ngIf="!isDialog" class="row contact-actions">
|
||||||
<div class="ml-auto col-auto"><button mat-raised-button type="button" (click)="cancel()">{{'CONTACT.SUPPORT.CANCEL' | translate}}</button></div>
|
<div class="ml-auto col-auto"><button mat-raised-button type="button" class="cancel-btn" (click)="cancel()">{{'CONTACT.SUPPORT.CANCEL' | translate}}</button></div>
|
||||||
<div class="col-auto"><button mat-raised-button color="primary" type="button" [disabled]="!formGroup.valid" (click)="send()"><i class="fa fa-paper-plane pr-2"></i>{{'CONTACT.SUPPORT.SEND' | translate}}</button></div>
|
<div class="col-auto"><button mat-raised-button type="button" class="send-btn" [ngClass]="{'send-btn-disabled': !formGroup.valid}" [disabled]="!formGroup.valid" (click)="send()"><i class="fa fa-paper-plane pr-2"></i>{{'CONTACT.SUPPORT.SEND' | translate}}</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -22,3 +22,38 @@ img {
|
||||||
.contact-actions {
|
.contact-actions {
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.send-btn {
|
||||||
|
background: #ffffff 0% 0% no-repeat padding-box;
|
||||||
|
border: 1px solid #129d99;
|
||||||
|
border-radius: 30px;
|
||||||
|
opacity: 1;
|
||||||
|
width: 101px;
|
||||||
|
height: 43px;
|
||||||
|
color: #129d99;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.send-btn-disabled {
|
||||||
|
width: 6.64em;
|
||||||
|
height: 2.93em;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border: 1px solid #B5B5B5;
|
||||||
|
border-radius: 30px;
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing: -0.35px;
|
||||||
|
color: #B5B5B5;
|
||||||
|
margin-bottom: 0.25em;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel-btn {
|
||||||
|
background: #ffffff 0% 0% no-repeat padding-box;
|
||||||
|
border: 1px solid #B5B5B5;
|
||||||
|
border-radius: 30px;
|
||||||
|
opacity: 1;
|
||||||
|
width: 101px;
|
||||||
|
height: 43px;
|
||||||
|
color: #212121;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
|
@ -66,7 +66,9 @@
|
||||||
<div class="col ">
|
<div class="col ">
|
||||||
<div class="page-title">Contact</div>
|
<div class="page-title">Contact</div>
|
||||||
</div>
|
</div>
|
||||||
<form class="form" method="POST" action="/api/contactEmail/public">
|
|
||||||
|
<iframe name="hiddenFrame" class="hide"></iframe>
|
||||||
|
<form class="form" method="POST" action="/api/contactEmail/public" target="hiddenFrame" onsubmit="emailSend()">
|
||||||
<div class="main-contact">
|
<div class="main-contact">
|
||||||
<div class="col page-subtitle">
|
<div class="col page-subtitle">
|
||||||
<div>Contact us to learn more</div>
|
<div>Contact us to learn more</div>
|
||||||
|
|
|
@ -20,3 +20,11 @@
|
||||||
font-size: 1.12rem;
|
font-size: 1.12rem;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide {
|
||||||
|
position:absolute;
|
||||||
|
top:-1px;
|
||||||
|
left:-1px;
|
||||||
|
width:1px;
|
||||||
|
height:1px;
|
||||||
|
}
|
||||||
|
|
|
@ -51,8 +51,10 @@ window.onload = function slideImages() {
|
||||||
var x = -1;
|
var x = -1;
|
||||||
slides = setInterval(function displayNextImage() {
|
slides = setInterval(function displayNextImage() {
|
||||||
x = (x === images.length - 1) ? 0 : x + 1;
|
x = (x === images.length - 1) ? 0 : x + 1;
|
||||||
|
if (document.getElementById('template-preview')) {
|
||||||
document.getElementById('template-preview').src = images[x];
|
document.getElementById('template-preview').src = images[x];
|
||||||
toggleClass(['id1','id2','id3'], 'id'.concat((x + 1).toString()));
|
toggleClass(['id1', 'id2', 'id3'], 'id'.concat((x + 1).toString()));
|
||||||
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,3 +63,8 @@ var images = [];
|
||||||
images[0] = 'assets/img/template-preview-1.svg';
|
images[0] = 'assets/img/template-preview-1.svg';
|
||||||
images[1] = 'assets/img/template-preview-2.svg';
|
images[1] = 'assets/img/template-preview-2.svg';
|
||||||
images[2] = 'assets/img/template-preview-3.svg';
|
images[2] = 'assets/img/template-preview-3.svg';
|
||||||
|
|
||||||
|
|
||||||
|
function emailSend() {
|
||||||
|
alert("The form was submitted");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue