Skip to content

Commit

Permalink
File path input should always be readonly
Browse files Browse the repository at this point in the history
The text input for uploading files should always be readonly since you
can't type a file name. You have to use the browse button or drag and drop.
  • Loading branch information
spadgett committed Sep 18, 2017
1 parent 690def0 commit 5104713
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/views/directives/osc-file-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
readonly
ng-show="supportsFileUpload"
ng-disabled="disabled"
ng-readonly="readonly"
ng-attr-aria-describedby="{{helpText ? helpID : undefined}}">
<span class="input-group-btn">
<span class="btn btn-default btn-file" ng-show="supportsFileUpload" ng-attr-disabled="{{ (disabled || readonly) || undefined }}">
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -7734,7 +7734,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<p>Drop file here</p>\n" +
"</div>\n" +
"<div class=\"input-group\">\n" +
"<input type=\"text\" class=\"form-control\" ng-model=\"fileName\" readonly=\"readonly\" ng-show=\"supportsFileUpload\" ng-disabled=\"disabled\" ng-readonly=\"readonly\" ng-attr-aria-describedby=\"{{helpText ? helpID : undefined}}\">\n" +
"<input type=\"text\" class=\"form-control\" ng-model=\"fileName\" readonly=\"readonly\" ng-show=\"supportsFileUpload\" ng-disabled=\"disabled\" ng-attr-aria-describedby=\"{{helpText ? helpID : undefined}}\">\n" +
"<span class=\"input-group-btn\">\n" +
"<span class=\"btn btn-default btn-file\" ng-show=\"supportsFileUpload\" ng-attr-disabled=\"{{ (disabled || readonly) || undefined }}\">\n" +
"Browse&hellip;\n" +
Expand Down

0 comments on commit 5104713

Please sign in to comment.