<ion-view title="{{'Scan To Inventory' | translate}}">

    <ion-header-bar class="bar bar-header bar-stable">
        <button menu-toggle="right" class="button button-icon icon ion-navicon"></button>
        <h1 class="title" translate="Authentication"></h1>
    </ion-header-bar>

    <ion-content class="has-header" data-ng-init="init()">
        <form ng-submit="submit()">
            <div class="list">
                <label class="item item-input input-select" ng-show="data.db_list.length > 1">
                    <div class="form-label col-33" for="db">{{'Database' | translate}}</div>
                    <select name="db" ng-options="value for value in data.db_list" ng-model="data.db" class="item-input select-required col-67"></select>
                </label>
                <label class="item item-input" ng-show="data.db_list.length">
                    <div class="form-label col-33">{{'Login' | translate}}</div>
                    <input type="text" ng-model="data.login" id="input_login" name="input_login" autocomplete="off" class="item-input input-required col-67"/>
                </label>
                <label class="item item-input" ng-show="data.db_list.length">
                    <div class="form-label col-33">{{'Password' | translate}}</div>
                    <input type="password" ng-model="data.password" id="input_password" name="input_password" class="item-input input-required col-67"/>
                </label>
                <label class="item">
                    <button class="button button-full button-royal" translate="Log In" />
                </label>
            </div>
        </form>
    </ion-content>

    <ion-footer-bar class="bar-assertive" ng-show="errorMessage">
        <h1 class="title">{{ errorMessage }}</h1>
    </ion-footer-bar>

</ion-view>
