diff --git a/.env b/.env index 7cf7357..fae5d1c 100644 --- a/.env +++ b/.env @@ -8,6 +8,7 @@ REACT_APP_IOS_URL="https://play.google.com/store/apps/details?id=com.mermsemr.my REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246" REACT_APP_TWITTER="https://twitter.com/fluxtra" -REACT_APP_APPSITE="https://myfitapp.mermsemr.com" +# Changed href to this url +REACT_APP_APPSITE=" http://www.dev.floatev.chiefsoft.us" REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit" diff --git a/src/assets/css/style.css b/src/assets/css/style.css index bab1b11..9c06d9e 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -3521,6 +3521,10 @@ header.fix_style.white_header { margin-bottom: 20px; } +.contact_page_section .contact_inner .contact_form form .form-group textarea { + resize: none; +} + /* For the err msg */ .contact_page_section .contact_inner .contact_form form .form-group span{ font-size: 12px; @@ -3529,20 +3533,18 @@ header.fix_style.white_header { display: none; } -.contact_page_section .contact_inner .contact_form form .form-group input:invalid ~ span{ +.contact_page_section .contact_inner .contact_form form .form-group input:valid[focused="true"]{ + border: 1px solid var(--dark-purple); +} + +.contact_page_section .contact_inner .contact_form form .form-group input:invalid[focused="true"]{ + border: 1px solid tomato; +} + +.contact_page_section .contact_inner .contact_form form .form-group input:invalid[focused="true"] ~ span{ display: block; } -/* -input:invalid[focused="true"]{ - border: 1px solid red; -} - -input:invalid[focused="true"] ~ span{ - display: block; -} -*/ - .contact_page_section .contact_inner .contact_form diff --git a/src/component/Contact/Main.js b/src/component/Contact/Main.js index 1ea58d3..eb4d922 100644 --- a/src/component/Contact/Main.js +++ b/src/component/Contact/Main.js @@ -1,9 +1,12 @@ +/** @format */ + import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import Bredcrumb from "../Bredcrumb/Main"; import BGImg from "../../assets/images/bread_crumb_bg.png"; import BGImg1 from "../../assets/images/bread_crumb_bg_one.png"; import BGImg2 from "../../assets/images/bread_crumb_bg_two.png"; +import axios from "axios" import SiteService from "../../vendors/service/siteService"; @@ -18,8 +21,14 @@ const FormInput = (props) => { errorMessage, value, onChange, + pattern, } = props; - + + const [focused, setFocused] = useState(false); + const handleFocus = () => { + return setFocused(true); + }; + return (
{ required={required} value={value} onChange={onChange} + onBlur={handleFocus} + pattern={pattern} + focused={focused.toString()} /> {errorMessage}
@@ -44,7 +56,8 @@ const Main = ({ brdcum }) => { email: "", phone: "", msg: "", - country: '' + country: "", + checkBox: false }); //initial state values const [countries, setCountries] = useState([]); // initial state for country dropdown @@ -58,14 +71,16 @@ const Main = ({ brdcum }) => { const contactForm = () => { return API_CALL.contactData(); }; + + const onChange = (e) => { + setValues((prev) => ({ ...prev, [e.target.name]: e.target.value })); + }; + console.log(values) // Submitting form const handleSubmit = (e) => { e.preventDefault(); - }; - const onChange = (e) => { - setValues({ ...values, [e.target.name]: e.target.value }); }; //CALLS THE API AFTER COMPONENT LOADS @@ -125,7 +140,9 @@ const Main = ({ brdcum }) => { /> )} -
+
@@ -147,13 +164,14 @@ const Main = ({ brdcum }) => { maxLenght={35} value={values.name} onChange={onChange} + pattern="^[A-Za-z]{1,35}$" /> { />
- + {countries.length > 0 && countries.map((country, index) => ( - ))} @@ -189,16 +214,25 @@ const Main = ({ brdcum }) => { placeholder="Your message" value={values.msg} onChange={onChange} - > + maxLength={350} + />
- +
-
@@ -208,7 +242,10 @@ const Main = ({ brdcum }) => { {/* Contact Info */}
- image + image

@@ -219,13 +256,18 @@ const Main = ({ brdcum }) => { or company, Visit our FAQs page.

- + READ FAQ
  • - image + image
    Email Us @@ -236,7 +278,10 @@ const Main = ({ brdcum }) => {
  • - image + image
    Call Us @@ -247,7 +292,10 @@ const Main = ({ brdcum }) => {
  • - image + image
    Visit Us @@ -266,4 +314,4 @@ const Main = ({ brdcum }) => { ); }; -export default Main; \ No newline at end of file +export default Main;