<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<div class="page" data-name="setup1">

    <div class="navbar">
        <div class="navbar-inner">
            <div class="left">
                <a href="#" class="link icon-only back">
                    <i class="icon icon-back"></i>
                </a>
            </div>
            <div class="title">Link Account</div>
        </div>
    </div>


    <div class="page-content">

        <div class="block">
            {{#js_if "this.personal == true || this.business == true"}}
            <div class="card">
                <div class="card-content card-content-padding">
                    {{#if personal}}
                    <p>Type your netsyms.com username and password.</p>
                    {{/if}}
                    {{#if business}}
                    <p>Type your netsyms.biz username, password, and business ID.</p>
                    {{/if}}

                    <div class="list no-hairlines">
                        <ul>
                            <li class="item-content item-input">
                                <div class="item-inner">
                                    <div class="item-title item-floating-label">Username</div>
                                    <div class="item-input-wrap">
                                        <input type="text" id="personal_username" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
                                        <span class="input-clear-button"></span>
                                    </div>
                                </div>
                            </li>

                            <li class="item-content item-input">
                                <div class="item-inner">
                                    <div class="item-title item-floating-label">Password</div>
                                    <div class="item-input-wrap">
                                        <input type="password" id="personal_password" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
                                        <span class="input-clear-button"></span>
                                    </div>
                                </div>
                            </li>

                            {{#if business}}
                            <li class="item-content item-input">
                                <div class="item-inner">
                                    <div class="item-title item-floating-label">Business ID (____.netsyms.biz)</div>
                                    <div class="item-input-wrap">
                                        <input type="text" id="bizid" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
                                        <span class="input-clear-button"></span>
                                    </div>
                                </div>
                            </li>
                            {{/if}}

                        </ul>
                    </div>

                    <br />
                    <div class="button button-fill button-raised button-round" onclick="{{#if personal}}personalsetup(){{else}}businesssetup(){{/if}}">
                        Continue
                    </div>
                </div>
            </div>

            <p style="text-align: center; font-size: 120%;">- or -</p>
            {{/js_if}}

            <div class="card">
                <div class="card-content card-content-padding">
                    {{#if personal}}
                    <p>Scan a QR code with your phone camera.  Open your account dashboard on another device (like a computer) and go to Sync settings.  Generate a mobile sync code, then press the button below to scan it.</p>
                    {{else}}
                    <p>Open AccountHub on another device and go to Sync settings.  Generate a mobile sync code, then press the button below to scan it.</p>
                    {{/if}}
                    <div class="row">
                        <button class="col button button-fill button-raised button-round" onclick="scanCode()" id="scancodebtn">Scan Code</button>
                        <button class="col button button-raised button-round" onclick="manualshow()" id="manualsetupbtn">Manual Setup</button>
                    </div>

                    <div id="manual_setup" class="block" style="display: none; padding-top: 20px; padding-bottom: 20px;">

                        <div class="list">
                            <ul>
                                <li class="item-content item-input">
                                    <div class="item-inner">
                                        <div class="item-title item-floating-label">Username</div>
                                        <div class="item-input-wrap">
                                            <input type="text" id="username" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
                                            <span class="input-clear-button"></span>
                                        </div>
                                    </div>
                                </li>

                                <li class="item-content item-input">
                                    <div class="item-inner">
                                        <div class="item-title item-floating-label">Key</div>
                                        <div class="item-input-wrap">
                                            <input type="text" id="key" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
                                            <span class="input-clear-button"></span>
                                        </div>
                                    </div>
                                </li>

                                <li class="item-content item-input">
                                    <div class="item-inner">
                                        <div class="item-title item-floating-label" id="protocol-select">https://</div>
                                        <div class="item-input-wrap">
                                            <input type="url" id="syncurl" placeholder="URL" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
                                            <span class="input-clear-button"></span>
                                        </div>
                                    </div>
                                </li>

                                <li id="use-security-checkbox-li">
                                    <label class="item-checkbox item-content">
                                        <input type="checkbox" id="use-security" checked="checked" />
                                        <i class="icon icon-checkbox"></i>
                                        <span class="item-inner">
                                            <span class="item-title">Use secure connection</span>
                                        </span>
                                    </label>
                                </li>
                            </ul>
                        </div>

                        <div class="button button-fill button-raised button-round" onclick="manualsetup()">
                            Continue
                        </div>
                    </div>

                </div>
            </div>

        </div>

    </div>

    <script src="js/setup1.js"></script>

</div>