<ion-view title="Sign-In">

    <ion-header-bar class="bar-positive">
        <h1 class="title">Configuración</h1>
        <div class="buttons">
            <button class="button button-clear ion-checkmark-round" style="font-size:22px !important;" type="submit" form="configuration-form"
                ng-disabled="!configuration.host || !configuration.port || !configuration.database || !configuration.username || !configuration.password"></button>
        </div>
    </ion-header-bar>

    <ion-content>

        <ion-spinner class="centered-spinner" ng-show="loading"></ion-spinner>

        <form id="configuration-form" ng-submit="auth()" ng-show="!loading">
            <div class="list">
                <label class="item item-input item-stacked-label">
                    <span class="input-label">Host</span>
                    <input type="text" autofocus="autofocus" placeholder="localhost" ng-model="configuration.host">
                </label>
                <label class="item item-input item-stacked-label">
                    <span class="input-label">Puerto</span>
                    <input type="number" placeholder="8069" value="8069" ng-model="configuration.port">
                </label>
                <label class="item item-input item-stacked-label">
                    <span class="input-label">Base de datos</span>
                    <input type="text" placeholder="odoo" ng-model="configuration.database">
                </label>
                <label class="item item-input item-stacked-label">
                    <span class="input-label">Usuario</span>
                    <input type="text" placeholder="admin" ng-model="configuration.username">
                </label>
                <label class="item item-input item-stacked-label">
                    <span class="input-label">Contraseña</span>
                    <input type="password" placeholder="admin" ng-model="configuration.password">
                </label>
            </div>
        </form>
        
    </ion-content>
</ion-view>