<?
if (!isset($facility_image) || $facility_image == '') {
    $facility_image = "/assets/img/bg/provider-1.jpg";
}

if (!isset($facility_text) || $facility_text == '') {
    $facility_text = "Merms Providers";
}

$registeration_completed = isset($loginReturn)?$loginReturn :false;

?>
<!-- begin app -->
<div class="app">
    <!-- begin app-wrap -->
    <div class="app-wrap">
        <!-- begin pre-loader -->
        <div class="loader">
            <div class="h-100 d-flex justify-content-center">
                <div class="align-self-center">
                    <img src="assets/img/loader/loader.svg" alt="loader">
                </div>
            </div>
        </div>
        <!-- end pre-loader -->

        <!--start login contant-->
        <div class="app-contant">
            <div class="bg-white">
                <div class="container-fluid p-0">
                    <div class="row no-gutters">
                        <div class="col-sm-6 col-lg-5 col-xxl-3  align-self-center order-2 order-sm-1">
                            <div class="d-flex align-items-center h-100-vh">
                               
                              

                                <div class="register p-5">
                                <h1 class="mb-2">Merms Providers</h1>

                                    <?php
                                    if ($registeration_completed ==  true ){
                                    ?>
                                        <div class="row">
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">
                                                    You have successfully created your MERMS account, We have started provisioning your account with all the tools you will need. Please check your email in a few minutes.
                                                    <br>
                                                    <a href='/welcome'> go to the login</a> 
                                                    
                                                    </label>
                                                    
                                                </div>
                                            </div>
                                        </div>
                                    <?
                                    }
                                    else
                                    {
                                    ?>
                                    <p>Welcome, Please create your account.</p>
                                    <form action="/register/startacc" method='POST' class="mt-2 mt-sm-5">
                                        <div class="row">
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">Practice Name*</label>
                                                    <input type="text" class="form-control" name="practice_name" value="<?=isset($practice_name)?$practice_name:''?>" placeholder="Practice name" />
                                                </div>
                                            </div>

                                            <div class="col-12 col-sm-6">
                                                <div class="form-group">
                                                    <label class="control-label">First Name*</label>
                                                    <input type="text" class="form-control"  name="firstname"  value="<?=isset($firstname)?$firstname:''?>"  placeholder="First Name" />
                                                </div>
                                            </div>
                                            <div class="col-12 col-sm-6">
                                                <div class="form-group">
                                                    <label class="control-label">Last Name*</label>
                                                    <input type="text" class="form-control"  name="lastname" value="<?=isset($lastname)?$lastname:''?>"   placeholder="Last Name" />
                                                </div>
                                            </div>
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">Email*</label>
                                                    <input type="email" class="form-control"  name="email" value="<?=isset($email)?$email:''?>"   placeholder="Email" />
                                                </div>
                                            </div>
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">Username*</label>
                                                    <input type="text" class="form-control"  name="username" value="<?=isset($username)?$username:''?>"   placeholder="Username" />
                                                </div>
                                            </div>
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label class="control-label">Password*</label>
                                                    <input type="password" class="form-control"   name="password" value="<?=isset($password)?$password:''?>"   placeholder="Password" />
                                                </div>
                                            </div>
                                            <div class="col-12">
                                                <div class="form-check">
                                                    <input class="form-check-input" type="checkbox" id="gridCheck">
                                                    <label class="form-check-label" for="gridCheck">
                                                        I accept terms & policy
                                                    </label>
                                                </div>
                                            </div>
                                            <div class="col-12 mt-3">
                                                <button type="submit" class="btn btn-primary">Sign up</button>

                                            </div>
                                            <div class="col-12  mt-3">
                                                <p>Already have an account ?<a href="/login"> Sign In</a></p>
                                            </div>
                                        </div>
                                    </form>
                                    <?
                                    }
                                    ?>


                                


                                </div>
                            </div>
                        </div>
                         <div class="col-sm-6 col-xxl-9 col-lg-7  o-hidden order-1 order-sm-2" style="background-color:red; background-image: url('<?=$facility_image?>');  background-size: cover;">
                            <!-- img class="img-fluid" src="assets/img/bg/provider.jpg"  alt="" style="background-size:contain;" -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- end app-wrap -->
</div>
<!-- end app -->

