<ion-view view-title="Configuration">
	<ion-content class="has-header" padding="true">
		<h2>Se connecter sur</h2>
		<label class="item item-input">
		  <input ng-model="data.text" type="text" placeholder="Nom du module" required ng-minlength="1" ng-maxlength="70">
		</label>
	    <button class="button button-full button-royal" ng-click="send(data.text)">Changer le nom du module à contacter</button>

		<h2>Mode de reconnexion</h2>
		<div class="list">
			<ion-radio ng-value="1" ng-model="choosenMode.value" ng-change="setAutoConnectMode()"> Automatique </ion-radio>
			<ion-radio ng-value="0" ng-model="choosenMode.value" ng-change="setAutoConnectMode()"> Manuel </ion-radio>
		</div>
        <div class="button-bar">
			<button class="button button-royal button-small" ng-click="connect()">Connexion</button>
			<button class="button button-assertive button-small" ng-click="disconnect()">Forcer la déconnexion</button>
		</div>

		<h2>Statut</h2>
		<ion-list>
			<ion-item class="item" ng-repeat="status in statusHistory">
				{{status.status}}
			</ion-item>
		</ion-list>
	</ion-content>
</ion-view>
