<ion-view cache-view="false" view-title="{{'Add stream' | translate}}">
  <ion-nav-bar class="bar-stable">
    <ion-nav-back-button class="button-clear" ng-click="goBack()">
      <i class="mopidy-mobile-icon-close"></i> {{'Cancel' | translate}}
    </ion-nav-back-button>
  </ion-nav-bar>
  <ion-content ng-controller="TrackController as track">
    <form class="list" name="form" ng-submit="add(track).then(goBack)">
      <ion-input class="item item-input">
        <ion-label translate>Name</ion-label>
        <input name="name" ng-model="track.name" placeholder="Radio Stream" required type="text">
      </ion-input>
      <ion-input class="item item-input">
        <ion-label translate>URL</ion-label>
        <input name="uri" ng-model="track.uri" placeholder="http://example.com/stream.mp3" required type="text">
      </ion-input>
      <button class="button button-positive button-full item"
              ng-disabled="form.$invalid"
              translate
              type="submit">
        Add stream
      </button>
    </form>
  </ion-content>
</ion-view>
