<!DOCTYPE html>
<html class="no-js css-menubar" lang="en">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="description" content="bootstrap admin template">
    <meta name="author" content="">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>MTN Messenger | Registration</title>
    <link rel="apple-touch-icon" href="{{ asset('img/mtnnlogo.jpg') }}">
    <link rel="shortcut icon" href="{{ asset('img/mtnnlogo.jpg') }}">
    <link rel="stylesheet" href="{{ elixir('css/all.css') }}">
    <link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css" />
    <link type="text/css" rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css" />
    <link rel="stylesheet" href="{{ asset('assets/examples/css/pages/profile.min3f0d.css?v2.2.0') }}">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <style>
        @font-face {
            font-family: "MTNBrighterSans-Regular";
            {{--            src: url("{!! asset('css/WorkSans.ttf') !!}"); --}} src: url("{!! asset('css/MTNBrighterSans-Regular.otf') !!}");
        }

        body {
            font-family: MTNBrighterSans-Regular !important;
        }

        label {
            color: black;
            font-weight: normal;
            font-size: medium;
            font-family: MTNBrighterSans-Regular !important;
        }

        h1,
        .h2,
        .h3,
        .h4,
        .h5,
        .h6,
        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            font-family: MTNBrighterSans-Regular !important;
        }

        .lato {
            font-family: 'Lato', sans-serif;
        }


        body {
            background-image: url("{{ asset('img/login100_new2.jpg') }}");
            overflow: auto;
            background-size: cover;
            font-family: MTNBrighterSans-Regular !important;
            /*background-repeat: no-repeat;*/
        }
    </style>

    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,300italic'>
    <script src="{{ asset('js/modernizr.min.js') }}"></script>
</head>

<body class="page-profile site-navbar-small">
    <div>
        <div class="page-content container">
            <div class="row">

                <div class="col-md-12">
                    <div class="panel">
                        <div class="panel-body nav-tabs-animate nav-tabs-horizontal">

                            <form method="post" enctype="multipart/form-data" action="{{ route('register.company') }}"
                                class="registration lato">
                                @if (session('success'))
                                    <div class="alert alert-success">
                                        <ul>
                                            <li>{{ session('success') }}</li>
                                        </ul>
                                    </div>
                                @endif

                                {{ csrf_field() }}
                                <h3>
                                    Company Registration
                                </h3>
                                <hr>

                                <div
                                    class="form-group col-md-12 text-center {{ $errors->has('register_as') ? ' has-error' : '' }}">
                                    <label for="inputEmail4"><strong>Register As</strong> <em
                                            class="text-danger">*</em></label>
                                    <div class="row">
                                        <div class="col-md-4 col-md-offset-4">
                                            @php $var = old('register_as') @endphp
                                            <select class="form-control " required name="register_as">
                                                <option></option>
                                                <option value="user" {{ $var == 'user' ? 'selected' : 'selected' }}>
                                                    Client
                                                </option>
                                                <option value="reseller" {{ $var == 'reseller' ? 'selected' : '' }}>
                                                    Reseller
                                                </option>
                                            </select>
                                            @if ($errors->has('register_as'))
                                                <span class="text-danger help-block">
                                                    <strong>{{ $errors->first('register_as') }} </strong>
                                                </span>
                                            @endif
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="form-group col-md-6 {{ $errors->has('name') ? 'has-error' : '' }}">
                                        <label for="inputEmail4">Name Of Company <em class="text-danger">*</em></label>
                                        <input type="text" class="form-control" value="{{ old('name') }}"
                                            name="name" placeholder="" required>
                                        @if ($errors->has('name'))
                                            <strong class="text-danger">{{ $errors->first('name') }} </strong>
                                        @endif
                                    </div>

                                    <div
                                        class="form-group col-md-6 {{ $errors->has('date_of_incorporation') ? 'has-error' : '' }}">
                                        <label for="inputEmail4">Date of Incorporation <em
                                                class="text-danger">*</em></label>
                                        <input type="text" class="form-control pick-me"
                                            value="{{ old('date_of_incorporation') }}" name="date_of_incorporation"
                                            placeholder="" required>

                                        @if ($errors->has('date_of_incorporation'))
                                            <strong class="text-danger">{{ $errors->first('date_of_incorporation') }}
                                            </strong>
                                        @endif
                                    </div>
                                </div>
                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('legal_status') ? 'has-error' : '' }} col-md-6">
                                        <label for="legal_status">Legal Status <em class="text-danger">*</em></label>
                                        @php $var = old('legal_status') @endphp
                                        <select class="form-control" required name="legal_status" id="legal_status">
                                            <option></option>
                                            <option value="LCA/MNO" {{ $var == 'LCA/MNO' ? 'selected' : '' }}>LCA/MNO
                                            </option>
                                            <option value="SME" {{ $var == 'SME' ? 'selected' : '' }}>SME</option>
                                            <option value="PUBLIC" {{ $var == 'PUBLIC' ? 'selected' : '' }}>PUBLIC
                                            </option>
                                        </select>

                                        @if ($errors->has('legal_status'))
                                            <strong class="text-danger">{{ $errors->first('legal_status') }} </strong>
                                        @endif
                                    </div>

                                    <div
                                        class="form-group {{ $errors->has('nature_of_business') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputAddress">Nature Of Business <em
                                                class="text-danger">*</em></label>
                                        <input type="text" class="form-control"
                                            value="{{ old('nature_of_business') }}" name="nature_of_business"
                                            placeholder="nature of business" required>

                                        @if ($errors->has('nature_of_business'))
                                            <strong class="text-danger">{{ $errors->first('nature_of_business') }}
                                            </strong>
                                        @endif
                                    </div>
                                </div>

                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('postal_address') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputAddress2">Postal Address <em class="text-danger"></em></label>
                                        <input type="text" class="form-control"
                                            value="{{ old('postal_address') }}" name="postal_address"
                                            placeholder="postal_address">
                                        @if ($errors->has('postal_address'))
                                            <strong class="text-danger">{{ $errors->first('postal_address') }}
                                            </strong>
                                        @endif
                                    </div>

                                    <div
                                        class="form-group {{ $errors->has('physical_address') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputCity">Business Address <em class="text-danger">*</em></label>
                                        <input type="text" class="form-control"
                                            value="{{ old('physical_address') }}" name="physical_address"
                                            placeholder="Business Address" required>
                                        @if ($errors->has('physical_address'))
                                            <strong class="text-danger">{{ $errors->first('physical_address') }}
                                            </strong>
                                        @endif
                                    </div>

                                </div>
                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('company_phone_number') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Company Phone number <em
                                                class="text-danger">*</em></label>
                                        <input type="text" class="form-control company-phone"
                                            name="company_phone_number"
                                            value="{{ old('company_phone_number', $tmp_user->phone_number ?? null) }}"
                                            placeholder="Company Phone number" required>
                                        <span class="badge badge-danger company-alert"></span>
                                        @if ($errors->has('company_phone_number'))
                                            <strong class="text-danger">{{ $errors->first('company_phone_number') }}
                                            </strong>
                                        @endif
                                    </div>

                                    <div
                                        class="form-group {{ $errors->has('location_in_other_countries') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputAddress2">Location In Other Countries <em
                                                class="text-danger"></em></label>
                                        <textarea class="form-control" name="location_in_other_countries" rows="2">{{ old('location_in_other_countries') }}</textarea>
                                        @if ($errors->has('location_in_other_countries'))
                                            <strong
                                                class="text-danger">{{ $errors->first('location_in_other_countries') }}
                                            </strong>
                                        @endif
                                    </div>
                                </div>
                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('mobile_money_number') ? 'has-error' : '' }} col-md-6">
                                        <label for="mobile_money_number">Mobile Money Number <em
                                                class="text-danger">*</em></label>
                                        <input id="mobile_money_number" type="text" class="form-control "
                                            name="mobile_money_number"
                                            value="{{ old('mobile_money_number', $tmp_user->mobile_money_number ?? null) }}"
                                            placeholder="Mobile Money Number" required>
                                        <span class="text-info" id="mm-phone">(For credit purchasing)</span>

                                        @if ($errors->has('mobile_money_number'))
                                            <strong class="text-danger">{{ $errors->first('mobile_money_number') }}
                                            </strong>
                                        @endif
                                    </div>

                                    <div
                                        class="form-group {{ $errors->has('website_url') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Website Url <em class="text-danger"></em></label>
                                        <input id="inputState" type="text" class="form-control "
                                            name="website_url" value="{{ old('website_url') }}"
                                            placeholder="Company Website url">
                                        <span class="text-info">(i.e www.abc.com)</span>

                                        @if ($errors->has('website_url'))
                                            <strong class="text-danger">{{ $errors->first('website_url') }} </strong>
                                        @endif
                                    </div>
                                </div>

                                <h4>Documents</h4>
                                <hr>

                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('business_document') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Business Registration Document</label>
                                        <input type="file" class="form-control" name="business_document" required>

                                        @if ($errors->has('business_document'))
                                            <strong class="text-danger">{{ $errors->first('business_document') }}
                                            </strong>
                                        @endif
                                    </div>

                                    <div
                                        class="form-group {{ $errors->has('sender_id_document') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Sender ID Letter Head </label>
                                        <input type="file" class="form-control" name="sender_id_document"
                                            required>

                                        @if ($errors->has('sender_id_document'))
                                            <strong class="text-danger">{{ $errors->first('sender_id_document') }}
                                            </strong>
                                        @endif
                                    </div>
                                </div>


                                <hr>
                                <h4>Add Sender IDs</h4>
                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('sender_ids') ? 'has-error' : '' }} col-md-12">
                                        <div id="sender-ids">
                                        </div>
                                        <input type="hidden" id="sender_ids" name="sender_ids"
                                            value="{{ old('sender_ids') }}" />

                                        @if ($errors->has('sender_ids'))
                                            <strong class="text-danger">{{ $errors->first('sender_ids') }} </strong>
                                        @endif

                                    </div>
                                </div>


                                <h4>Contact Person Information <em class="text-danger">*</em></h4>
                                <hr>

                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('contact_person') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Name <em class="text-danger">*</em></label>
                                        <input type="text" class="form-control"
                                            value="{{ old('contact_person', isset($tmp_user) ? $tmp_user->first_name . ' ' . $tmp_user->last_name : null) }}"
                                            name="contact_person" placeholder="Contact Person's name" required>

                                        @if ($errors->has('contact_person'))
                                            <strong class="text-danger">{{ $errors->first('contact_person') }}
                                            </strong>
                                        @endif
                                    </div>
                                    <div
                                        class="form-group {{ $errors->has('contact_person_designation') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Designation <em class="text-danger">*</em></label>
                                        <input type="text" class="form-control"
                                            value="{{ old('contact_person_designation') }}"
                                            name="contact_person_designation" placeholder="Designation" required>

                                        @if ($errors->has('contact_person_designation'))
                                            <strong
                                                class="text-danger">{{ $errors->first('contact_person_designation') }}
                                            </strong>
                                        @endif
                                    </div>
                                </div>
                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('contact_person_phone') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Phone Number <em class="text-danger">*</em></label>
                                        <input type="text" class="form-control con-phone"
                                            value="{{ old('contact_person_phone', $tmp_user->phone_number ?? null) }}"
                                            name="contact_person_phone" placeholder="Contact Person's phone" required>
                                        <span class="badge badge-danger contact-phone"></span>

                                        @if ($errors->has('contact_person_phone'))
                                            <strong class="text-danger">{{ $errors->first('contact_person_phone') }}
                                            </strong>
                                        @endif
                                    </div>
                                    <div
                                        class="form-group {{ $errors->has('contact_person_email') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">Email <em class="text-danger">*</em></label>
                                        <input type="text" class="form-control email"
                                            value="{{ old('contact_person_email') }}" name="contact_person_email"
                                            placeholder="Contact Person's email" required>
                                        <span class="badge badge-danger email-alert"></span>

                                        @if ($errors->has('contact_person_email'))
                                            <strong class="text-danger">{{ $errors->first('contact_person_email') }}
                                            </strong>
                                        @endif
                                    </div>
                                </div>
                                <div class="row">
                                    <div
                                        class="form-group {{ $errors->has('contact_person_id') ? 'has-error' : '' }} col-md-6">
                                        <label for="inputState">ID (voters/driver’s license,SSNIT,Passport,NHIS) <em
                                                class="text-danger">*</em></label>
                                        <input type="file" class="form-control"
                                            value="{{ old('contact_person_id') }}" name="contact_person_id"
                                            placeholder="Contact Person  Id" required>

                                        @if ($errors->has('contact_person_id'))
                                            <strong class="text-danger">{{ $errors->first('contact_person_id') }}
                                            </strong>
                                        @endif

                                    </div>
                                </div>

                                <hr>
                                {{--                                <h4>Name of Directors <em class="text-danger">*</em></h4> --}}
                                {{--                                <strong class="text-info">(* Minimum of two directors)</strong> --}}
                                {{--                                <div class="row"> --}}
                                {{--                                    <div class="form-group {{ $errors->has('items') ? 'has-error' : '' }} col-md-12"> --}}
                                {{--                                        <div id="directors"> --}}
                                {{--                                        </div> --}}
                                {{--                                        <input type="hidden" id="items" name="items" --}}
                                {{--                                            value="{{ old('items') }}" /> --}}
                                {{--                                        @if ($errors->has('items')) --}}
                                {{--                                            <strong class="text-danger">{{ $errors->first('items') }} </strong> --}}
                                {{--                                        @endif --}}
                                {{--                                    </div> --}}
                                {{--                                </div> --}}

                                <div class="form-row text-center">
                                    <div class="col-md-12">
                                        <button style="background-color: #ffcb05; color: #000;" type="submit"
                                            id="register-btn" class="btn btn-primary"><i
                                                class="fa fa-plus-circle"></i> Register
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="modal fade" tabindex="-1" role="dialog" id="conditions">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header"
                    style="background: #485563;background: -webkit-linear-gradient(to bottom, #29323c, #485563);background: linear-gradient(to bottom, #29323c, #485563);">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true" style="color:#fff !important;">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel" style="color:#ffc107"><img
                            src="{{ asset('UI/mt2.png') }}" style="vertical-align: center;width:3em;">MTN
                        MESSENGER - <font style="color:#fff">TERMS AND CONDITIONS</font>
                    </h4>
                </div>
                <div class="modal-body">
                    <p style="line-height: 2em">
                    <h4>DEFINITIONS</h4>
                    <hr>
                    <p>
                       <b>App, Application or System</b> 
                       - this refers to MTN’s application that enables the sending of messages via multiple channels.
                    </p>
                    <p>
                        <b>Network Operator</b>
                        - means any party licensed to install, operate and maintain a cellular telephony network; 
                    </p>
                    <p>
                        <b>Services</b>
                        - shall mean and include all products and services offered or provided to Users by BulkSMS, Email, etc.
                    </p>
                    <p>
                        <b>User</b>
                        - shall mean any natural or legal person who makes use of any of the services or who uses or visits the application
                    </p>
                    <p>
                        <b>Privacy</b>
                        - means the protection of information that identifies and or concerns an individual or a group
                    </p>

                    <br>
                    
                    <h4>SERVICES</h4>
                    <hr>

                    <p>
                        {{-- <li> --}}
                    <div class="" style="display: flex;">
                        <i class="fa fa-circle" aria-hidden="true"
                            style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                        <div style="text-align:justify">
                            MTN shall endeavor to make available uninterrupted use of its system and delivery of all
                            messages sent using its application. However, the delivery of messages in this case SMS
                            messaging is largely dependent on the effective functioning of Network Operators' cellular
                            networks, network coverage and the recipient's mobile handset. MTN does not and cannot
                            guarantee the availability of any Service, the delivery of SMS messages or the compatibility
                            between any message or content format and any mobile handsets or mobile operating systems.
                        </div>
                    </div><br>
                    
                    <div style="display: flex;">
                        <i class="fa fa-circle" aria-hidden="true"
                            style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                        <div style="text-align: justify;">
                            The various Network Operators may modify, enhance, develop or discontinue components of
                            their services at any time without prior notice to us, in which event MTN shall in turn
                            modify, enhance, develop or discontinue with the affected Services to Users without notice.
                        </div>
                    </div><br>
                    <div style="display: flex;">
                        <i class="fa fa-circle" aria-hidden="true"
                            style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                        <div style="text-align: justify;">
                            MTN shall endeavor to inform users of any updates, upgrades or downtimes to be experienced
                            on its application so far as it is reasonably practicable.
                        </div>
                    </div><br>
                    <div style="display: flex;">
                        <i class="fa fa-circle" aria-hidden="true"
                            style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                        <div style="text-align: justify;">
                            Messages shall be deemed to have been delivered when MTN has transmitted the messages to the
                            appropriate network and has received feedback status on same,
                        </div>
                    </div><br>
                    <div style="display: flex;">
                        <i class="fa fa-circle" aria-hidden="true"
                            style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                        <div style="text-align: justify;">
                            MTN shall have the right to withhold, terminate or suspend the provision of Services to a
                            User at any time if not doing so may affect the brand of MTN or impact negatively on its
                            services. The user shall not be refunded any cash instead of unused credit. Users are
                            therefore cautioned against the below and others like it:
                            <ol type="a">
                                <li>The sending of spam on the platform</li>
                                <li>The use of the system to terminate fraudulent messages</li>
                                <li>The use of the application for phishing. Users hereby indemnifies MTN against any
                                    fine
                                    imposed on MTN or any damages suffered by MTN because of any act or omission of the
                                    User that amounts to a breach of any law or code of conduct to which MTN may be
                                    subject. Upon notification of any such fine or damages, Users agree to immediately
                                    pay the amount of such fine or damages to MTN. Any amount not paid to MTN within 48
                                    hours of notification thereof shall accrue interest at the prevailing commercial
                                    bank rate
                                    per annum.
                                </li>
                            </ol>
                        </div>
                    </div>
                    </p>

                    <br>
                    <h3>SECURITY</h3>
                    <hr>
                    <p>
                        <div style="display: flex;">
                            <i class="fa fa-circle" aria-hidden="true"
                                style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                            <div style="text-align: justify;">
                                To use the platform, a User is required to complete the registration process and must provide MTN with up to date, complete and accurate information as requested by MTN. Failure to provide accurate and complete information on registration may result in termination and deletion of the Users account. A User may also be required to choose a Username and password. Users are responsible for maintaining the confidentiality of their Usernames and passwords and Users undertake not to divulge their Username and passwords to any other person. A User is entirely responsible for all activities that occur in its account and shall be strictly liable to make payment of all charges incurred under its account whether these charges are incurred by the User or any other person, authorized or unauthorized, intentionally, or unintentionally, or because of any virus, hack, or security breach.
                            </div>
                        </div><br>
                        <div style="display: flex;">
                            <i class="fa fa-circle" aria-hidden="true"
                                style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                            <div style="text-align: justify;">
                                Users agree to notify MTN immediately of any unauthorized use of their account(s) or any other breach of security.
                            </div>
                        </div><br>
                        <div style="display: flex;">
                            <i class="fa fa-circle" aria-hidden="true"
                                style="margin-right:10px; margin-top:5px; font-size:6px;"></i>
                            <div style="text-align: justify;">
                                If a User wishes to replace the name, details, person/employee using a specific MTN account of the User and wishes to prevent the individual or person from accessing the account, the account holder shall inform MTN in writing of this change and change all details on the account accordingly. MTN may refuse to act on the instructions of an account holder where the account holder fails to provide sufficient proof of its identity as the account holder and the authority of the person purporting to represent it in making such a request and MTN shall have no liability to the account holder or the individual person where it refuses to act in the absence of such proof, nor where it acts in good faith reliance of any information submitted to it in support of any such request made by any person purporting to represent the account holder, including in respect of any claims for breach of privacy, security or confidentiality.
                            </div>
                        </div>
                    </p>
                </div>
                <div class="modal-footer radio">
                    {{--				<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Close</button> --}}
                    <div>
                        <div class="radio">
                            <label>
                                <input type="button" name="optionsRadios" class="agree" decision='yes' value="Agree & Proceed"
                                    style="width: auto; background: black; color:#fff; border:none; padding:5px;">
                            </label>

                            {{-- <label>
                                <input type="radio" name="optionsRadios" class="agree" value="no" checked>
                                No
                            </label> --}}

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <footer class="site-footer">
        <div class="site-footer-legal">©
            <script type="text/javascript">
                document.write(new Date().getFullYear());
            </script>
            <a href="http://mtnghana.com"> mtnghana</a>
        </div>
        <div class="site-footer-right">
            Powered by <a href="http://npontu.com">Npontu Technologies</a>
        </div>
    </footer>


    <script src="{{ elixir('js/all.js') }}"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
        integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous">
    </script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
    <script>
        $(function() {
            $('.pick-me').daterangepicker({
                singleDatePicker: true,
                showDropdowns: true,
                minYear: 1901,
                maxYear: parseInt(moment().format('YYYY'), 10)
            }, function(start, end, label) {
                var years = moment().diff(start, 'years');
            });
        });
    </script>


    <script>
        $(document).ready(function() {
            $('#register-btn').on('click', function(t) {
                t.preventDefault();
                $('#conditions').modal('toggle');
                $('.agree').on('click', function() {
                    let decision = $(this).attr('decision');
                    if (decision === 'yes') {
                        $('#conditions').modal('toggle');
                        $('.registration').submit();
                    }
                })

            })

        });

        $("#directors").jsGrid({
            width: "100%",
            height: "250px",

            inserting: true,
            editing: true,
            sorting: true,
            paging: true,

            data: [],

            fields: [{
                    name: "Name",
                    type: "text",
                    width: 50,
                    validate: "required"
                },
                {
                    name: "Designation",
                    type: "text",
                    width: 50
                },
                {
                    type: "control"
                }
            ]
        });

        $("#sender-ids").jsGrid({
            width: "100%",
            height: "250px",

            inserting: true,
            editing: true,
            sorting: true,
            paging: true,

            data: [],

            fields: [{
                    name: "Name",
                    type: "text",
                    width: 50,
                    validate: "required",
                    _createTextBox: function() {
                        var $input = jsGrid.fields.text.prototype._createTextBox.call(this);
                        return $input.attr("maxlength", 11);
                    }
                },
                {
                    type: "control"
                }
            ]
        });


        $('.registration').on('submit', function() {
            grid = $("#directors").jsGrid("option", "data");
            grid2 = $("#sender-ids").jsGrid("option", "data");
            $('#items').val(JSON.stringify(grid));
            $('#sender_ids').val(JSON.stringify(grid2));
        });

        $(".email").keyup(function() {

            let value = $(this).val();
            let contents = value.indexOf('@');

            if (contents === -1) {
                $('.email-alert').html('Please enter a valid email');
                // $('#register-btn').prop('disabled',true);
            } else {
                $('.email-alert').html("");
                // $('#register-btn').prop('disabled',false);
            }


        });

        $('.company-phone').keyup(function() {
            let value = $(this).val();
            let count = value.length;
            let contents = $.isNumeric(value);

            if (contents && count == 10) {
                $('.company-alert').html('');
                // $('#register-btn').prop('disabled',false);
            } else {
                $('.company-alert').html('Please enter a valid phone number');
                // $('#register-btn').prop('disabled',true);
            }


        });

        $('.con-phone').keyup(function() {
            let value = $(this).val();
            let count = value.length;
            let contents = $.isNumeric(value);
            console.log(count);

            if (contents && count == 10) {
                $('.contact-phone').html('');
                // $('#register-btn').prop('disabled',false);

            } else {
                $('.contact-phone').html('Please enter a valid phone number');
                // $('#register-btn').prop('disabled', true);
            }

        });

        $('#mobile_money_number').keyup(function() {
            let value = $(this).val();
            let count = value.length;
            let contents = $.isNumeric(value);
            console.log(count);

            if (contents && count == 10) {
                $('#mm-phone').html('');
                // $('#register-btn').prop('disabled',false);

            } else {
                $('#mm-phone').html('Please enter a valid phone number');
                // $('#register-btn').prop('disabled', true);
            }

        });
    </script>
</body>

</html>
