Commit 8cb79bfc084e5db4e1bd266cac50faacb00a7afc

Authored by Dima Landiak
1 parent 72a202dd

changed fields names

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