<div class="content cadastro">
  <h1>Criar nova OS</h1>
  <md-content layout-padding>
    <div>
      <form name="formOs" ng-submit="gravarNovaOs($event)">
        <div layout-gt-sm="row">
          <md-input-container class="md-block" flex-gt-sm>
            <label>Solicitante</label>
            <input name="osSolicitante" required md-no-asterisk ng-model="os.solicitante" md-maxlength="30">
            <div ng-messages="formOs.osSolicitante.$error">
              <div ng-message="required">Campo obrigatório.</div>
              <div ng-message="md-maxlength">Este campo pode conter no máximo 30 caracteres.</div>
            </div>
          </md-input-container>
        </div>
        <md-input-container class="md-block">
          <label>Descrição</label>
          <textarea ng-model="os.observacoes" name="osObservacoes" required rows="5"></textarea>
          <div ng-messages="formOs.osObservacoes.$error">
            <div ng-message="required">Campo obrigatório.</div>
          </div>
        </md-input-container>

        <md-input-container class="md-block" ng-if="enderecosAlternativos.length > 1">
          <label>Endereço</label>
          <md-select ng-model="teste">
            <md-option ng-value="endereco" ng-click="geCodEnderecoSelecionado(endereco)"
              ng-repeat="endereco in enderecosAlternativos" ng-selected="endereco.padrao">
              {{ formataEndereco(endereco) }}
            </md-option>
          </md-select>
        </md-input-container>

        <div>
          <md-button type="submit" ng-disabled="btnIsDisabled" class="md-primary md-raised">Confirmar</md-button>
          <md-button class="md-primary md-ink-ripple">Cancelar</md-button>
        </div>
      </form>
    </div>
  </md-content>
</div>