TABFILES.html 2.11 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<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>