Send Message
diff --git a/src/main/webapp/app/home/email/email.component.ts b/src/main/webapp/app/home/email/email.component.ts
index 6ec2c21d..76d70a3e 100644
--- a/src/main/webapp/app/home/email/email.component.ts
+++ b/src/main/webapp/app/home/email/email.component.ts
@@ -7,68 +7,68 @@ import { MatSnackBar } from '@angular/material';
import { JhiAlertService } from 'ng-jhipster';
@Component({
- selector: 'jhi-email',
- templateUrl: './email.component.html',
- styleUrls: ['./email.scss']
+ selector: 'jhi-email',
+ templateUrl: './email.component.html',
+ styleUrls: ['./email.component.scss']
})
export class EmailComponent implements OnInit {
- contactForm = this.fb.group({
- contactName: ['', Validators.required],
- contactEmail: ['', [Validators.required, Validators.email]],
- contactPhone: [''],
- contactMsg: ['', Validators.required]
- });
-
- get contactName() {
- return this.contactForm.get('contactName');
- }
+ contactForm = this.fb.group({
+ contactName: ['', Validators.required],
+ contactEmail: ['', [Validators.required, Validators.email]],
+ contactPhone: [''],
+ contactMsg: ['', Validators.required]
+ });
- get contactEmail() {
- return this.contactForm.get('contactEmail');
- }
+ get contactName() {
+ return this.contactForm.get('contactName');
+ }
- get contactPhone() {
- return this.contactForm.get('contactPhone');
- }
+ get contactEmail() {
+ return this.contactForm.get('contactEmail');
+ }
- get contactMsg() {
- return this.contactForm.get('contactMsg');
- }
+ get contactPhone() {
+ return this.contactForm.get('contactPhone');
+ }
- onSubmit() {
- this.sendRequest().subscribe(
- () => {
- this._snackBar.open('Thanks for writing to us! We will get back to you soon!', null, {
- duration: 5000,
- panelClass: ['contact-form-snack-bar']
- });
- this.contactForm.reset();
- },
- err => {
- this.onError(err.message);
- }
- );
- }
+ get contactMsg() {
+ return this.contactForm.get('contactMsg');
+ }
- sendRequest(): Observable
{
- return this.http.post('https://usebasin.com/f/b5ed73d03aa5', this.contactForm.value, {
- headers: new HttpHeaders({
- Accept: 'application/json'
- }),
- observe: 'response'
+ onSubmit() {
+ this.sendRequest().subscribe(
+ () => {
+ this._snackBar.open('Thanks for writing to us! We will get back to you soon!', null, {
+ duration: 5000,
+ panelClass: ['contact-form-snack-bar']
});
- }
+ this.contactForm.reset();
+ },
+ err => {
+ this.onError(err.message);
+ }
+ );
+ }
+
+ sendRequest(): Observable {
+ return this.http.post('https://usebasin.com/f/b5ed73d03aa5', this.contactForm.value, {
+ headers: new HttpHeaders({
+ Accept: 'application/json'
+ }),
+ observe: 'response'
+ });
+ }
- constructor(
- private fb: FormBuilder,
- private http: HttpClient,
- private _snackBar: MatSnackBar,
- private jhiAlertService: JhiAlertService
- ) {}
+ constructor(
+ private fb: FormBuilder,
+ private http: HttpClient,
+ private _snackBar: MatSnackBar,
+ private jhiAlertService: JhiAlertService
+ ) {}
- ngOnInit() {}
+ ngOnInit() {}
- private onError(errorMessage: string) {
- this.jhiAlertService.error(errorMessage, null, null);
- }
+ private onError(errorMessage: string) {
+ this.jhiAlertService.error(errorMessage, null, null);
+ }
}
diff --git a/src/main/webapp/app/home/email/email.scss b/src/main/webapp/app/home/email/email.scss
deleted file mode 100644
index 9357851f..00000000
--- a/src/main/webapp/app/home/email/email.scss
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- Contact Us Section: Start
- */
-
-body {
- background: -webkit-linear-gradient(left, #0072ff, #00c6ff);
-}
-
-.contact-form {
- background: #fff;
- margin-top: 10%;
- margin-bottom: 10%;
- width: 70%;
-}
-
-.contact-form .form-control {
- border-radius: 1rem;
-}
-
-.contact-image {
- text-align: center;
-}
-
-.contact-image img {
- margin-top: -3%;
-}
-
-.contact-form form {
- padding: 14%;
-}
-
-.contact-form h3 {
- margin-bottom: 8%;
- margin-top: -10%;
- text-align: center;
- color: #0062cc;
-}
-
-.sendEmail {
- color: #0062cc;
-}
-
-/*
- Contact Us section: END
- */
diff --git a/src/main/webapp/app/home/home.component.html b/src/main/webapp/app/home/home.component.html
index 2c744718..ef3dd295 100644
--- a/src/main/webapp/app/home/home.component.html
+++ b/src/main/webapp/app/home/home.component.html
@@ -21,7 +21,7 @@ Welcome to Python-Sinhala!