Commit 8cb79bfc084e5db4e1bd266cac50faacb00a7afc

Authored by Dima Landiak
1 parent 72a202dd

changed fields names

... ... @@ -128,8 +128,8 @@ export default function ExtensionFormOpcDirective($compile, $templateCache, $tra
128 128 let addedFile = event.target.result;
129 129
130 130 if (addedFile && addedFile.length > 0) {
131   - model[options.fileName] = $file.name;
132   - model[options.location] = addedFile.replace(/^data.*base64,/, "");
  131 + model[options.location] = $file.name;
  132 + model[options.fileContent] = addedFile.replace(/^data.*base64,/, "");
133 133
134 134 }
135 135 }
... ... @@ -142,8 +142,8 @@ export default function ExtensionFormOpcDirective($compile, $templateCache, $tra
142 142 scope.clearFile = function(model, options) {
143 143 scope.theForm.$setDirty();
144 144
145   - model[options.fileName] = null;
146 145 model[options.location] = null;
  146 + model[options.fileContent] = null;
147 147
148 148 };
149 149
... ...
... ... @@ -212,8 +212,8 @@
212 212 </md-input-container>
213 213
214 214 <section class="dropdown-section">
215   - <div class="tb-container" ng-class="{'ng-invalid':!server.keystore.location}">
216   - <span ng-init='fieldsToFill = {"fileName":"fileName", "location":"location"}'></span>
  215 + <div class="tb-container" ng-class="{'ng-invalid':!server.keystore.fileContent}">
  216 + <span ng-init='fieldsToFill = {"location":"location", "fileContent":"fileContent"}'></span>
217 217 <label class="tb-label" translate>extension.opc-keystore-location</label>
218 218 <div flow-init="{singleFile:true}" flow-file-added='fileAdded($file, server.keystore, fieldsToFill)' class="tb-file-select-container">
219 219 <div class="tb-file-clear-container">
... ... @@ -231,14 +231,14 @@
231 231 class="file-input"
232 232 flow-btn id="dropFileKeystore_{{serverIndex}}"
233 233 name="keystoreFile"
234   - ng-model="server.keystore.location"
  234 + ng-model="server.keystore.fileContent"
235 235 >
236 236 </div>
237 237 </div>
238 238 </div>
239 239 <div class="dropdown-messages">
240   - <div ng-if="!server.keystore[fieldsToFill.fileName]" class="tb-error-message" translate>extension.no-file</div>
241   - <div ng-if="server.keystore[fieldsToFill.fileName]">{{server.keystore[fieldsToFill.fileName]}}</div>
  240 + <div ng-if="!server.keystore[fieldsToFill.location]" class="tb-error-message" translate>extension.no-file</div>
  241 + <div ng-if="server.keystore[fieldsToFill.location]">{{server.keystore[fieldsToFill.location]}}</div>
242 242 </div>
243 243 </section>
244 244
... ...