<script type="text/ng-template" id="assets/views/modals/renamePhoto.html">
    <md-dialog class="md-modal md-modal-wide rename-photo-modal">
        <div class="md-modal-header">
            <h1>{{:: 'rename' | translate }}</h1>
            <div ng-click="files.closeModal()" class="md-close-modal"><i class="mdi mdi-close"></i></div>
        </div>
        <form ng-submit="files.rename(selectedItems.first('id'))">
            <md-input-container>
                <label for="photo-name">{{:: 'name' | translate }}</label>
                <input id="photo-name" type="text" ng-model="files.fileNameModel" required>
                <div class="md-modal-error"></div>
            </md-input-container>

            <div class="buttons">
                <md-button type="button" ng-click="files.closeModal()">{{:: 'cancel' | translate }}</md-button>
                <md-button type="submit" ng-disabled="!files.fileNameModel" class="md-raised md-primary">{{:: 'rename' | translate }}</md-button>
            </div>
        </form>
    </md-dialog>
</script>