salix/front/core/components/input-file/index.html

40 lines
1.5 KiB
HTML
Raw Normal View History

<div class="container"
ng-class="{selected: $ctrl.hasFocus}">
<div class="textField">
<div class="leftIcons" ng-transclude="leftIcons"></div>
<div class="infix">
<section class="value" ng-click="$ctrl.openFileSelector()" translate>
{{$ctrl.value}}
</section>
<input
class="mdl-textfield__input"
type="file"
name="{{::$ctrl.name}}"
ng-model="$ctrl.files"
vn-validation="{{$ctrl.rule}}"
ng-disabled="$ctrl.disabled"
ng-readonly="$ctrl.readonly"
ng-focus="$ctrl.hasFocus = true"
ng-blur="$ctrl.hasFocus = false"
tabindex="{{$ctrl.input.tabindex}}"
accept="{{$ctrl.accept}}"/>
<label class="label" translate>{{$ctrl.label}}</label>
</div>
<div class="underline"></div>
<div class="selected underline"></div>
<div class="suffix">
<i class="material-icons"
ng-if="::$ctrl.hasInfo"
vn-tooltip="{{::$ctrl.info}}">
info_outline
</i>
<vn-icon-button
icon="cloud_upload"
vn-tooltip="Select a file"
ng-click="$ctrl.openFileSelector()">
</vn-icon-button>
</div>
<div class="rightIcons" ng-transclude="rightIcons"></div>
</div>
</div>