<md-content class="md-padding"> <md-card> <md-card-title> <md-card-title-text> <legend class="md-headline csctheme"> <swaplang code="SW000682">Attach Files</swaplang> </legend> </md-card-title-text> </md-card-title> <md-card-content> <table class="table "> <thead> <tr> <th><swaplang code="SW012811">ประเภทเอกสาร</swaplang></th> <th><swaplang code="SW000271">ชื่อเอกสาร</swaplang></th> <th></th> </tr> </thead> <tbody> <tr ng-repeat="file in clsFormApplicant.formApplicant.other.files"> <td> <select ng-disabled="action != 'fillform'" class="form-control" ng-model="file.paperType" ng-required="enableValidate"> <option value=""></option> <option ng-repeat="paper in masterdata.paper" value="{{paper.id}}">{{paper.name[lang]}}</option> </select> </td> <td> <input ng-required="enableValidate" class="form-control" name="__fileName{{$index}}" type="text" ng-model="file.fileName" readonly="readonly"> </td> <td ng-if="action == 'fillform'"> <i ng-if="file.paperType[$index] !== '' && file.fileName === ''" class="fa fa-upload fa-2x csctheme" ng-click="uploadAttach('__fileName'+$index)"></i> <i ng-if="file.paperType[$index] !== '' && file.fileName !== ''" class="fa fa-trash-o fa-2x csctheme" ng-click="deleteAttach(file)"></i> <i class="fa fa-remove fa-2x csctheme pull-right" ng-click="removeAttachFile(file.fileName, $index)"></i> </td> <td ng-if="action != 'fillform'"> <i class="fa fa-download fa-2x csctheme" ng-click="download(file.fileName)"></i> </td> </tr> </tbody> </table> <div class="row" ng-if="action == 'fillform'"> <div class="col-sm-12 text-center"> <i class="fa fa-user-plus fa-2x csctheme" ng-click="addAttachFile()"></i> </div> </div> </md-card-content> </md-card> </md-content>