<div class="field row" ng-if="form.autofillPDFs" ng-click="setActiveField(field._id, index)">
    <div class="col-sm-4 field-title">
        <h5>{{field.title}}     <span class="required-error" ng-show="field.required && field.fieldValue == 0">(* required)</span></h5>
    </div>
    <div class="col-sm-8 field-input">
        <div class="input-group ">
            <div tabindex="-1" class="form-control file-caption">
                <span class="file-caption-ellipsis" ng-if="!form.pdf">…</span>
                <div class="file-caption-name" ng-if="form.pdf">
                    {{field.file.originalname}}
                </div>
            </div>
            <div class="input-group-btn">
                <button type="button"  ng-if="field.file" ng-click="removeFile(field);" title="Clear selected files" class="btn btn-danger fileinput-remove fileinput-remove-button">
                    <i class="glyphicon glyphicon-trash"  ></i> 
                    Delete
                </button>

                <button type="button" ng-if="field.fileLoading" title="Abort ongoing upload" class="btn btn-default" ng-click="cancelFileUpload(field)">
                    <i class="glyphicon glyphicon-ban-circle"></i> 
                    Cancel
                </button>

                <div class="btn btn-success btn-file" ngf-select ngf-change="uploadPDF($files)" ng-if="!field.file"> 
                    <i class="glyphicon glyphicon-upload"></i>
                    Upload your File
                </div>
            </div>
        </div>
    </div>
</div>