Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.ts	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.ts	(revision 51771)
@@ -43,7 +43,7 @@
     baseUrl: ['', Validators.required],
     selectValidationSet: [''],
     customValidationSet: [''],
-    compatibilityLevel: ['', Validators.required]
+    compatibilityLevel: ['']
   };
   baseUrlDesc: Description = baseUrlDesc;
   existingValSetDesc: Description = existingValSetDesc;
@@ -58,7 +58,6 @@
 
   ngOnInit() {
     this.currentRepository = <Repository>this.otherData;
-    this.getCompatibilityClasses();
     console.log(`other data is: ${JSON.stringify(this.otherData,null,2)}`);
     if (this.data && this.data.length) {
       this.currentInterface = this.data[0];
@@ -80,22 +79,8 @@
     /* initializes MyGroup parent component and the FormGroup */
     super.ngOnInit();
     console.log(this.group, this.parentGroup);
+    this.getCompatibilityClasses();
 
-    if (this.currentInterface) {
-      console.log(`accessParams is ${JSON.stringify(this.currentInterface.accessParams)}`);
-      if ( !this.getMyControl('compatibilityLevel').value || !this.classCodes.filter( x => x == this.currentInterface.desiredCompatibilityLevel).length ) {
-        this.getMyControl('compatibilityLevel').setValue("");
-        this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
-      } else {
-        this.getMyControl('compatibilityLevel').setValue(this.compClasses[this.currentInterface.desiredCompatibilityLevel]);
-      }
-      if (this.group.valid ) {
-        if (this.group.valid && ( this.getMyControl('selectValidationSet').value || this.getMyControl('customValidationSet').value ) ) {
-          this.exportedData = this.currentInterface;
-        }
-      }
-    }
-
     /*  NOT ANYMORE
     if (this.currentInterface) {
       this.getMyControl('baseUrl').disable();
@@ -115,6 +100,7 @@
       this.getMyControl('selectValidationSet').disable();
       this.getMyControl('customValidationSet').enable();
     }
+    this.checkIfValid();
   }
 
   getInterfaceInfo(baseUrl: string) {
@@ -144,7 +130,7 @@
         },
         () => {
           if ( this.currentInterface && this.currentInterface.accessParams && this.currentInterface.accessParams['set'] ) {
-            if ( this.valsetList.filter( x => x === this.currentInterface.accessParams['set']).length ) {
+            if ( this.valsetList.some( x => x === this.currentInterface.accessParams['set']) ) {
               this.patchData.next({selectValidationSet:this.currentInterface.accessParams['set']});
             } else {
               this.patchData.next({customValidationSet:this.currentInterface.accessParams['set']});
@@ -169,6 +155,23 @@
       error => {
         this.errorMessage = noServiceMessage;
         console.log(error);
+      },
+      () => {
+        if (this.currentInterface) {
+          console.log(`accessParams is ${JSON.stringify(this.currentInterface.accessParams)}`);
+          if ( !this.currentInterface.desiredCompatibilityLevel || !this.classCodes.some( x => x == this.currentInterface.desiredCompatibilityLevel ) ) {
+            this.patchData.next({compatibilityLevel:''});
+            this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
+          } else {
+            this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel];
+          }
+          if (this.group.valid ) {
+            if ( this.getMyControl('selectValidationSet').value || this.getMyControl('customValidationSet').value ) {
+              this.exportedData = this.currentInterface;
+            }
+          }
+        }
+
       }
     );
   }
@@ -177,7 +180,7 @@
     this.groupErrorMessage = '';
     this.errorMessage = '';
     this.successMessage = '';
-    if (this.group.valid && ( this.getMyControl('selectValidationSet').value || this.getMyControl('customValidationSet').value ) ) {
+    if (this.group.valid && this.checkIfValsetWasChosen() && this.checkIfCompatibilityLevelWasChosen() ) {
       if (this.identifiedBaseUrl) {
         let baseUrl = this.getMyControl('baseUrl').value;
         let valset: string = '';
@@ -186,8 +189,14 @@
         } else {
           valset = this.getMyControl('customValidationSet').value;
         }
-        let compLvl = this.getMyControl('compatibilityLevel').value;
+        let compLvl: string = '';
+        if (this.getMyControl('compatibilityLevel').value) {
+          compLvl = this.getMyControl('compatibilityLevel').value;
+        } else {
+          compLvl = this.existingCompLevel;
+        }
 
+
         if (this.currentInterface) {
           this.updateCurrent(baseUrl,valset,compLvl);
         } else {
@@ -202,11 +211,21 @@
     }
   }
 
+  checkIfValsetWasChosen() {
+    return ( ( this.getMyControl('selectValidationSet').enabled && this.getMyControl('selectValidationSet').value !='' ) || ( this.getMyControl('customValidationSet').enabled && this.getMyControl('customValidationSet').value !='' ) );
+  }
+
+  checkIfCompatibilityLevelWasChosen() {
+    return ( this.getMyControl('compatibilityLevel').value != '' || (this.existingCompLevel && this.existingCompLevel != '') );
+  }
+
   checkIfValid() {
+    console.log(this.existingCompLevel);
     if (this.inRegister) {
-      if (this.group.valid && ( this.getMyControl('selectValidationSet').value || this.getMyControl('customValidationSet').value ) ) {
-        if (this.identifiedBaseUrl) {
+      if ( this.group.valid && this.checkIfValsetWasChosen() && this.checkIfCompatibilityLevelWasChosen() ) {
+        if ( this.identifiedBaseUrl ) {
           let baseUrl = this.getMyControl('baseUrl').value;
+
           let valset: string = '';
           if (this.getMyControl('selectValidationSet').enabled) {
             valset = this.getMyControl('selectValidationSet').value;
@@ -213,8 +232,14 @@
           } else {
             valset = this.getMyControl('customValidationSet').value;
           }
-          let compLvl = this.getMyControl('compatibilityLevel').value;
 
+          let compLvl: string = '';
+          if (this.getMyControl('compatibilityLevel').value) {
+            compLvl = this.getMyControl('compatibilityLevel').value;
+          } else {
+            compLvl = this.existingCompLevel;
+          }
+
           if (this.currentInterface) {
             this.updateCurrent(baseUrl,valset,compLvl);
           } else {
@@ -221,6 +246,10 @@
             this.addCurrent(baseUrl,valset,compLvl);
           }
         }
+      } else {
+        this.exportedData = null;
+        this.wasSaved = false;
+        this.successMessage = '';
       }
     }
   }
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.html	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.html	(revision 51771)
@@ -100,7 +100,3 @@
   </div>
 </form>
 
-<confirmation-dialog #updateLogoUrlModal [title]="'Update Logo URL'" [isModalShown]="isModalShown"
-                     [confirmActionButton]="'Update'" (emitObject)="updatedLogoUrl($event)">
-  <input type="text" #logoURLinput name="logoUrl" placeholder="Logo URL" class="form-control" value="{{ updateGroup.get('logoUrl').value }}" (change)="changeLogoUrl(logoURLinput.value)">
-</confirmation-dialog>
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.ts	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-update-form.component.ts	(revision 51771)
@@ -48,14 +48,7 @@
   datasourceClasses: Map<string,string> = new Map<string,string>();
   classCodes: string[] = [];
 
-  isModalShown: boolean;
-  @ViewChild('updateLogoUrlModal')
-  public updateLogoUrlModal: ConfirmationDialogComponent;
-
-  /* in sources/update emits the new logoUrl */
-  @Output() emittedUrl: EventEmitter<string> = new EventEmitter();
-
-  /*  in sources/register (of literature or data repository) emits the updated repository */
+  /*  in sources/register (in literature or data mode) the updated repository is emitted */
   @Output() emittedInfo: EventEmitter<Repository> = new EventEmitter();
 
   @Input() selectedRepo: Repository;
@@ -116,17 +109,13 @@
     if (this.selectedRepo) {
       this.loadingMessage = loadingRepoMessage;
       this.updateGroup = this.fb.group(this.updateGroupDefinition, {validator: checkPlatform});
-      this.setupUpdateForm();
-      //this.getDatasourceClasses();
-      //this.getCountries();
-      this.getTypologies();
-      this.getTimezones();
+      this.getDatasourceClasses();
     } else {
       this.errorMessage = loadingRepoError;
     }
   }
 
-  setupUpdateForm(){
+  setupUpdateForm() {
     if (this.selectedRepo) {
       console.log(`my datasource type is: ${this.selectedRepo.datasourceType}`);
       /*if (this.selectedRepo.datasourceType == 'journal') {
@@ -155,10 +144,12 @@
         datasourceType: this.selectedRepo.datasourceClass,
         adminEmail: this.selectedRepo.contactEmail
       });
-      if ( !this.updateGroup.get('softwarePlatform').value || !this.typologies.filter(x=> x.value == this.selectedRepo.typology).length ) {
+
+      if ( this.selectedRepo.typology === '' || !this.typologies.some(x => x.value == this.selectedRepo.typology) ) {
         this.updateGroup.get('softwarePlatform').setValue('');
         this.updateGroup.get('platformName').setValue(this.selectedRepo.typology);
       }
+
       this.updateGroup.get('officialName').disable();
       this.updateGroup.get('country').disable();
       this.updateGroup.get('longtitude').disable(); // MAYBE NOT DISABLED
@@ -184,7 +175,7 @@
         this.updateGroup.get('eissn').disable();
         this.updateGroup.get('lissn').disable();
       }
-      this.getDatasourceClasses();
+      /*this.getDatasourceClasses();*/
     }
   }
 
@@ -233,7 +224,9 @@
         this.loadingMessage = '';
         console.log(error);
       },
-      () => this.getTimezones()
+      () => {
+        this.getTimezones();
+      }
     );
   }
 
@@ -246,6 +239,7 @@
       },
       () => {
         this.loadingMessage = '';
+        this.setupUpdateForm();
       }
     );
   }
@@ -271,7 +265,6 @@
               if (response) {
                 this.selectedRepo = response;
                 console.log(`updateRepository responded: ${JSON.stringify(response)}`);
-                this.emittedInfo.emit(response);
               }
             },
             error => {
@@ -298,10 +291,10 @@
   }
 
   refreshSelectedRepo() {
-    if (this.updateGroup.get('platformName').value ) {
+    if (this.updateGroup.get('softwarePlatform').value ) {
+      this.selectedRepo.typology = this.updateGroup.get('softwarePlatform').value;
+    } else if (this.updateGroup.get('platformName').value) {
       this.selectedRepo.typology = this.updateGroup.get('platformName').value;
-    } else if (this.updateGroup.get('softwarePlatform').value) {
-      this.selectedRepo.typology = this.updateGroup.get('softwarePlatform').value;
     }
     this.selectedRepo.officialName = this.updateGroup.get('officialName').value;
     this.selectedRepo.description = this.updateGroup.get('repoDescription').value;
@@ -339,19 +332,6 @@
     }
   }
 
-  changeLogoUrl(logoUrl: string) {
-    this.updateGroup.get('logoUrl').setValue(logoUrl);
-  }
-
-  updateLogoUrl(logoUrl: string){
-    this.updateLogoUrlModal.ids = [logoUrl];
-    this.updateLogoUrlModal.showModal();
-  }
-
-  updatedLogoUrl(event: any) {
-    this.emittedUrl.emit(this.updateGroup.get('logoUrl').value);
-  }
-
 }
 
 export function checkPlatform(c: AbstractControl) {
@@ -359,7 +339,3 @@
     return null;
   return 'invalid';
 }
-
-export function markPlatformAsRequired(c: AbstractControl) {
-  c.get('platformName').setValidators([Validators.required]);
-}
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.html	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-forms/datasource-interface-form.component.html	(revision 51771)
@@ -46,7 +46,7 @@
     </div>
     <div class="form-group">
       <label class="control-label" for="compLvl" title="{{ compatibilityLevelDesc.desc }}">Desired Compatibility Level (*)</label>
-      <select class="form-control" #compLvl id="compLvl" formControlName="compatibilityLevel" required (change)="checkIfValid()">
+      <select class="form-control" #compLvl id="compLvl" formControlName="compatibilityLevel" (change)="checkIfValid()">
         <option value="">-- none selected --</option>
         <option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>
       </select>
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.html	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.html	(revision 51771)
@@ -26,7 +26,7 @@
               <div *ngIf="errorMessage" class="uk-alert uk-alert-danger">{{ errorMessage }}</div>
               <div *ngIf="repo" class="uk-margin-medium-bottom">
                 <h1 class="uk-article-title">
-                  <a id="updateLogoURL" (click)="datasourceUpdateForm.updateLogoUrl(repo.logoUrl)">
+                  <a id="updateLogoURL" (click)="updateLogoUrl(repo.logoUrl)">
                     <img *ngIf="!logoURL" src="/assets/imgs/yourLogoHere.jpg" style="margin-right: 15px; margin-top:-8px" width="60">
                     <img *ngIf="logoURL" src="{{ logoURL }}" style="margin-right: 15px; margin-top:-8px" width="60">
                   </a>
@@ -89,3 +89,10 @@
       </div>
     </div>
 
+
+    <confirmation-dialog #updateLogoUrlModal [title]="'Update Logo URL'" [isModalShown]="isModalShown"
+                         [confirmActionButton]="'Update'" (emitObject)="updatedLogoUrl($event)">
+      <input type="text" name="logoUrl" placeholder="Logo URL" class="form-control" value="{{ logoURL }}" (change)="getNewLogoUrl($event)" >
+    </confirmation-dialog>
+
+
Index: modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.ts	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/pages/sources/sources-update-repo.component.ts	(revision 51771)
@@ -10,6 +10,7 @@
 } from '../../domain/oa-description';
 import { formInfoLoading, loadingRepoError } from '../../domain/shared-messages';
 import { DatasourceUpdateFormComponent } from './sources-forms/datasource-update-form.component';
+import {ConfirmationDialogComponent} from "../../shared/reusablecomponents/confirmation-dialog.component";
 
 
 
@@ -33,6 +34,10 @@
   interfaceFormDesc: Description = interfaceFormDesc;
   updateDatasourceInterfaces: Type<any> = DatasourceInterfaceFormComponent;
 
+  isModalShown: boolean;
+  @ViewChild('updateLogoUrlModal')
+  public updateLogoUrlModal: ConfirmationDialogComponent;
+
   constructor (
     private fb: FormBuilder,
     private repoService: RepositoryService,
@@ -94,8 +99,21 @@
     );
   }
 
-  getNewLogoUrl(newURL: string) {
-    this.logoURL = newURL;
+  updateLogoUrl(logoUrl: string){
+    this.updateLogoUrlModal.ids = [logoUrl];
+    this.updateLogoUrlModal.showModal();
   }
 
+  updatedLogoUrl(event: any) {
+    this.repo.logoUrl = this.logoURL;
+    this.datasourceUpdateForm.updateGroup.get('logoUrl').setValue(this.logoURL);
+    this.datasourceUpdateForm.updateRepo();
+
+  }
+
+  getNewLogoUrl( event: any ) {
+    this.logoURL = event.target.value;
+
+  }
+
 }
Index: modules/uoa-repository-dashboard-gui/trunk/app/services/repository.service.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/services/repository.service.ts	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/services/repository.service.ts	(revision 51771)
@@ -193,7 +193,7 @@
         console.log(`responded ${res.statusText}`);
         return res.status.toString();
       })
-      .catch(this.handleError).share();
+      .catch(this.handleError);
   }
 
   updateLongtitude(id: string, longtitude: string): Observable<string>{
@@ -208,7 +208,7 @@
 
     return this.http.post(url,body,httpOptions)
       .map( res => <string>res.json())
-      .catch(this.handleError).share();
+      .catch(this.handleError);
   }
 
   updateLatitude(id: string, latitude: string): Observable<string>{
@@ -223,10 +223,10 @@
 
     return this.http.post(url,body,httpOptions)
       .map( res => <string>res.json())
-      .catch(this.handleError).share();
+      .catch(this.handleError);
   }
 
-  updateLogoUrl(id: string, logoUrl: string): Observable<string>{
+  updateLogoUrl(id: string, logoUrl: string): Observable<any>{
     let url = `${this.apiUrl}updateLogoUrl`;
     console.log(`knocking on: ${url}`);
     let body = JSON.stringify({
@@ -237,8 +237,8 @@
     httpOptions.withCredentials = true;
 
     return this.http.post(url, body, httpOptions)
-      .map( res => <string>res.json())
-      .catch(this.handleError).share();
+      .map( res => <any>res.json())
+      .catch(this.handleError);
   }
 
   updateTimezone(id: string, timezone: string): Observable<string>{
@@ -253,7 +253,7 @@
 
     return this.http.post(url, body, httpOptions)
       .map( res => <string>res.json())
-      .catch(this.handleError).share();
+      .catch(this.handleError);
   }
 
   getListLatestUpdate(mode: string): Observable<string> {
Index: modules/uoa-repository-dashboard-gui/trunk/app/app.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/app.component.html	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/app.component.html	(revision 51771)
@@ -1,5 +1,29 @@
 <div class="uk-offcanvas-content">
   <top-menu></top-menu>
   <router-outlet></router-outlet>
+
+  <!-- Piwik -->
+  <script type="text/javascript">
+    var _paq = _paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="//analytics.openaire.eu/";
+      _paq.push(['setTrackerUrl', u+'piwik.php']);
+      _paq.push(['setSiteId', '92']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Piwik Code -->
+
+  <div>
+    <!-- Piwik Image Tracker-->
+    <img src="https://analytics.openaire.eu/piwik.php?idsite=92&rec=1" style="border:0" alt="" />
+    <!-- End Piwik -->
+  </div>
+
+
   <footer></footer>
 </div>
Index: modules/uoa-repository-dashboard-gui/trunk/app/shared/topmenu/topmenu.component.html
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/shared/topmenu/topmenu.component.html	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/shared/topmenu/topmenu.component.html	(revision 51771)
@@ -151,7 +151,7 @@
 
               <ul class="uk-navbar-nav">
                 <li class="uk-parent" [routerLinkActive]="['uk-active']">
-                  <a [routerLink]="['dashboard']" [routerLinkActive]="['active']">
+                  <a [routerLink]="['dashboard']" [routerLinkActive]="['uk-active']">
                     Dashboard
                   </a>
                 </li>
Index: modules/uoa-repository-dashboard-gui/trunk/app/shared/reusablecomponents/forms/my-array.interface.ts
===================================================================
--- modules/uoa-repository-dashboard-gui/trunk/app/shared/reusablecomponents/forms/my-array.interface.ts	(revision 51770)
+++ modules/uoa-repository-dashboard-gui/trunk/app/shared/reusablecomponents/forms/my-array.interface.ts	(revision 51771)
@@ -97,17 +97,15 @@
         ((this.parentGroup as FormArray).controls[this.name].at(0).corpus((<MyGroup>componentView.instance).generate().value));
       } else {
         if (index>0){
-          if (this.registerMode ) {
-            if(!<MyGroup>componentView.instance.exportedData) {
-              this.remove(index);
-              (this.parentGroup as FormArray).controls[this.name].removeAt(index - 1);
-              this.components.splice(index, 1);
-              this.arrayData_.splice(index - 1, 1);
-            }
+          if (this.registerMode || !(<MyGroup>componentView.instance).wasSaved ) {
+            this.remove(index);
+            (this.parentGroup as FormArray).controls[this.name].removeAt(index - 1);
+            this.components.splice(index, 1);
+            this.arrayData_.splice(index - 1, 1);
           } else {
             this.curIntrf = <MyGroup>componentView.instance;
             this.curIndex = index;
-            this.components.splice(index,1);
+            this.components.splice(index, 1);
             this.confirmRemoveInterface();
           }
         } else {
