<div class="container">
  <div class="row">
    <pageheader headertitle="jsp.projects.dialog.title.importProject">
    </pageheader>
  </div>
  <div class="row">
    <div class="col-sm-12">
      <form name="importProjectForm" class="form-horizontal" ng-submit="$ctrl.save(importProjectForm.$valid)" novalidate>
        <div class="form-group">
          <label class="col-sm-3 control-label" for="bibiscoCreateProjectNameLabel">{{"jsp.importProject.label.file" | translate}}</label>
          <div class="col-sm-8" ng-class="{ 'has-error': (importProjectForm.$submitted && importProjectForm.fileToImport.$invalid) || $ctrl.invalidArchive }">
            <div class="input-group" ng-class="{ 'has-error': importProjectForm.$submitted && importProjectForm.projectsDirectory.$invalid }">
              <input id="bibiscoImportProjectArchiveLabel" name="fileToImport" class="form-control" type="text" readonly="readonly" ng-model="$ctrl.fileToImport" required/>
              <span class="input-group-btn"><fileselect filefilter="['bibisco2']" onselectfile="$ctrl.selectFileToImport(file)"></fileselect></span>
            </div>
          </div>
          <div class="col-sm-8 col-sm-offset-3">
            <validationmessages field="importProjectForm.fileToImport"></validationmessages>
            <p ng-if="$ctrl.invalidArchive" class="text-danger bibiscoNotSelectableText">{{"jsp.importProject.form.input.file.validationMessage" | translate}}</p>
          </div>
        </div>
        <div class="top30 col-sm-9 col-sm-offset-3">
          <button type="submit" class="btn btn-primary">
            {{"jsp.common.button.save" | translate}}
          </button>
          <buttonback fixedpath="$ctrl.backpath"></buttonback>
        </div>
      </form>
    </div>
  </div>
</div>
