<div class="modal-header">
    <h2><i class="fa fa-pencil" /> Scheda fine trattamento</h2>
</div>
<form role="form" name="endTherapyCardForm">

    <div class="modal-body">
        <div class="form-group">
            <label for="endTherapyCard__date">Data</label>
            <div class="error" ng-show="errors.date">
                <div class="alert alert-danger" ng-repeat="e in errors.date">{{ e }}</div>
            </div>
            <div class="dropdown">
                <span class="dropdown-toggle" id="dropdown2" role="button" data-target="#" href="#">
                    <div class="input-group">
                        Data selezionata: {{ endTherapyCard.date | date:'dd/MM/yyyy' }}
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </span>
                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                    <datetimepicker ng-required="true" data-ng-model="endTherapyCard.date" data-datetimepicker-config="{ dropdownSelector: '#dropdown2', 'minView': 'day' }"/>
                </ul>
            </div>
        </div>
        <div class="form-group">
            <label>Visibilità</label>
            <div class="checkbox checkbox-primary">
                <label for="endTherapyCard__visible">Rendi visibile al paziente una volta pubblicata
                    <input type="checkbox" class="form-control" id="endTherapyCard__visible" ng-model="endTherapyCard.visible" />
                </label>
            </div>
        </div>
    </div>

    <div class="modal-footer">
        <button class="btn btn-default" ng-click="cancel()" type="button">Annulla</button>
        <button class="btn btn-primary" ng-disabled="!endTherapyCardForm.$valid" ng-click="save()" type="button" disabled="disabled">Salva</button>
    </div>
</form>
<script>$.material.checkbox();</script>
