Fix cannot-use-robot for private base image bug in build dialog

There are a number of small state fixes in this PR, which result in the build dialog being properly reset state-wise each time it is displayed, thus fixing the state inconsistency.

Fixes #2106
This commit is contained in:
Joseph Schorr 2016-11-10 14:47:25 -05:00
parent 6de039dc97
commit 3193f32a95
6 changed files with 44 additions and 16 deletions

View file

@ -1,19 +1,21 @@
<div class="file-upload-box-element">
<div class="file-input-container">
<div ng-show="state != 'uploading'">
<input id="file-drop-{{ boxId }}" name="file-drop-{{ boxId }}" class="file-drop" type="file" files-changed="handleFilesChanged(files)">
<label for="file-drop-{{ boxId }}" ng-class="state">
<span class="chosen-file">
<span ng-if="selectedFiles.length">
{{ selectedFiles[0].name }}
<span ng-if="selectedFiles.length > 1">
and {{ selectedFiles.length - 1 }} others...
<form id="file-drop-form-{{ boxId }}">
<input id="file-drop-{{ boxId }}" name="file-drop-{{ boxId }}" class="file-drop" type="file" files-changed="handleFilesChanged(files)">
<label for="file-drop-{{ boxId }}" ng-class="state">
<span class="chosen-file">
<span ng-if="selectedFiles.length">
{{ selectedFiles[0].name }}
<span ng-if="selectedFiles.length > 1">
and {{ selectedFiles.length - 1 }} others...
</span>
</span>
</span><span class="choose-button">
<span>Select file</span>
</span>
</span><span class="choose-button">
<span>Select file</span>
</span>
</label>
</label>
</form>
</div>
<div class="cor-loader-line" ng-if="state == 'checking'"></div>