<div class="content cadastro">
  <h1>Elogios e Reclamações</h1>

  <md-content layout-padding>
    <div>
      <form name="formSac" ng-submit="gravarNovoSac()">
        <div layout-gt-sm="row">
          <md-radio-group ng-model="sac.tipo" flex layout='row'>
            <md-radio-button ng-value="tipo.codigo" class="md-primary" ng-repeat="tipo in listTipo"> {{tipo.descricao}}
            </md-radio-button>
          </md-radio-group>
        </div>
        <div layout-gt-sm="row">
          <md-input-container class="md-block" flex-gt-sm>
            <label>Seu Nome</label>
            <input name="nome" required md-no-asterisk ng-model="sac.reclamante" md-maxlength="30">
            <div ng-messages="formSac.nome.$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>O que você tem a dizer?</label>
          <textarea ng-model="sac.reclamacao" name="reclamacao" required md-maxlength="250" rows="5"></textarea>
          <div ng-messages="formSac.reclamacao.$error">
            <div ng-message="required">Campo obrigatório.</div>
            <div ng-message="md-maxlength">Este campo pode conter no máximo 250 caracteres.</div>
          </div>
        </md-input-container>
        <div>
          <md-button type="submit" class="md-primary md-raised" ng-disabled="gravando">Confirmar</md-button>
          <md-button class="md-primary md-ink-ripple" ng-click="cancelar()">Cancelar</md-button>
        </div>
      </form>
    </div>
  </md-content>
</div>