Project

General

Profile

« Previous | Next » 

Revision 51581

fixed checking if at least one interface was saved

View differences:

datasource-update-form.component.html
12 12
      Basic information
13 13
    </h4>
14 14
  </div>
15
  <form-inline [description]="softwarePlatformDesc" [valid]="updateGroup.get('softwarePlatform').valid || !formSubmitted">
15
  <form-inline [description]="softwarePlatformDesc" [valid]="updateGroup.get('softwarePlatform').valid">
16 16
    <select formControlName="softwarePlatform" class="form-control">
17 17
<!--      <option value="" selected>[Other] (enter name below)</option> RESTORE AFTER getTypologies begins to work-->
18 18
      <option *ngFor="let platform of typologies" value="{{ platform.value }}">{{ platform.name }}</option>
19 19
    </select>
20 20
  </form-inline>
21
  <form-inline [description]="platformNameDesc" [valid]="updateGroup.get('platformName').valid || !formSubmitted">
21
  <form-inline [description]="platformNameDesc" [valid]="updateGroup.get('platformName').valid">
22 22
    <span *ngIf="updateGroup.get('platformName').touched && updateGroup.get('platformName').value"
23 23
          class="help-block inline"
24 24
          style="margin-top: 0px; margin-bottom: 0px; ">This value will be used as the platform for your repository</span>
25 25
    <input formControlName="platformName" class="form-control" style="" type="text">
26 26
  </form-inline>
27
  <form-inline [description]="officialNameDesc" >
27
  <form-inline [description]="officialNameDesc" [valid]="updateGroup.get('officialName').valid">
28 28
    <input formControlName="officialName" class="form-control" style="" type="text">
29 29
  </form-inline>
30 30
  <div *ngIf="selectedRepo.datasourceType == 'journal'">
31
    <form-inline [description]="issnDesc" [valid]="updateGroup.get('issn').valid || !formSubmitted">
32
      <span *ngIf="updateGroup.get('issn').invalid && updateGroup.get('issn').touched && updateGroup.get('issn').dirty"
33
            class="help-block inline uk-text-danger"
34
            style="margin-top: 0px; margin-bottom: 0px; ">Issn needs to be of the form: "1111-1111"</span>
35
      <input formControlName="issn" class="form-control" type="text" (focus)="updateGroup.get('issn').markAsUntouched()" (blur)="updateGroup.get('issn').updateValueAndValidity()">
31
    <form-inline [description]="issnDesc" [valid]="updateGroup.get('issn').valid">
32
      <input formControlName="issn" class="form-control" type="text">
36 33
    </form-inline>
37 34
    <form-inline [description]="eissnDesc" [valid]="updateGroup.get('eissn').valid">
38
      <span *ngIf="updateGroup.get('eissn').invalid && updateGroup.get('eissn').touched && updateGroup.get('eissn').dirty"
39
            class="help-block inline uk-text-danger"
40
            style="margin-top: 0px; margin-bottom: 0px; ">Eissn needs to be of the form: "1111-1111"</span>
41
      <input formControlName="eissn"class="form-control" type="text" (focus)="updateGroup.get('eissn').markAsUntouched()" (blur)="updateGroup.get('eissn').updateValueAndValidity()">
35
      <input formControlName="eissn" class="form-control" type="text">
42 36
    </form-inline>
43 37
    <form-inline [description]="lissnDesc" [valid]="updateGroup.get('lissn').valid">
44
      <span *ngIf="updateGroup.get('lissn').invalid && updateGroup.get('lissn').touched && updateGroup.get('lissn').dirty"
45
            class="help-block inline uk-text-danger"
46
            style="margin-top: 0px; margin-bottom: 0px;">Lissn needs to be of the form: "1111-1111"</span>
47
      <input formControlName="lissn"class="form-control" type="text" (focus)="updateGroup.get('lissn').markAsUntouched()" (blur)="updateGroup.get('lissn').updateValueAndValidity()">
38
      <input formControlName="lissn" class="form-control" type="text">
48 39
    </form-inline>
49 40
  </div>
50
  <form-inline [description]="repoDescriptionDesc" [valid]="updateGroup.get('repoDescription').valid || !formSubmitted">
41
  <form-inline [description]="repoDescriptionDesc" [valid]="updateGroup.get('repoDescription').valid">
51 42
    <textarea formControlName="repoDescription" class="form-control"></textarea>
52 43
  </form-inline>
53
  <form-inline [description]="countryDesc" [valid]="updateGroup.get('country') || !formSubmitted">
44
  <form-inline [description]="countryDesc" [valid]="updateGroup.get('country')">
54 45
    <select formControlName="country" class="form-control">
55 46
      <option value="">-- none selected --</option>
56 47
      <option *ngFor="let country of countries" value="{{country.code}}" title="{{country.name}}">{{ country.name }}</option>
57 48
    </select>
58 49
  </form-inline>
59
  <form-inline [description]="longtitudeDesc" [valid]="updateGroup.get('longtitude').valid || !formSubmitted">
60
    <span *ngIf="updateGroup.get('longtitude').invalid && updateGroup.get('longtitude').touched && updateGroup.get('longtitude').dirty"
61
          class="help-block inline"
62
          style="margin-top: 0px; margin-bottom: 0px; ">Invalid Longtitude</span>
63
    <input formControlName="longtitude" class="form-control" type="number" step="0.05" (focus)="updateGroup.get('longtitude').markAsUntouched()" (blur)="updateGroup.get('longtitude').updateValueAndValidity()">
50
  <form-inline [description]="longtitudeDesc" [valid]="updateGroup.get('longtitude').valid">
51
    <input formControlName="longtitude" type="text" class="form-control">
64 52
  </form-inline>
65
  <form-inline [description]="latitudeDesc" [valid]="updateGroup.get('latitude').valid || !formSubmitted">
66
    <span *ngIf="updateGroup.get('latitude').invalid && updateGroup.get('latitude').touched && updateGroup.get('latitude').dirty"
67
          class="help-block inline"
68
          style="margin-top: 0px; margin-bottom: 0px; ">Invalid Latitude</span>
69
    <input formControlName="latitude" class="form-control" type="number" step="0.05" (focus)="updateGroup.get('latitude').markAsUntouched()" (blur)="updateGroup.get('latitude').updateValueAndValidity()">
53
  <form-inline [description]="latitudeDesc" [valid]="updateGroup.get('latitude').valid">
54
    <input formControlName="latitude" type="text" class="form-control">
70 55
  </form-inline>
71
  <form-inline [description]="websiteUrlDesc" [valid]="updateGroup.get('websiteUrl').valid || !formSubmitted">
72
    <span *ngIf="updateGroup.get('websiteUrl').invalid && updateGroup.get('websiteUrl').touched && updateGroup.get('websiteUrl').dirty"
73
            class="help-block inline uk-text-danger"
74
            style="margin-top: 0px; margin-bottom: 0px; ">You need to enter a valid url</span>
75
    <input formControlName="websiteUrl" class="form-control" type="text"
76
           (focus)="updateGroup.get('websiteUrl').markAsUntouched()"
77
           (blur)="updateGroup.get('websiteUrl').updateValueAndValidity()">
56
  <form-inline [description]="websiteUrlDesc" [valid]="updateGroup.get('websiteUrl').valid">
57
    <input formControlName="websiteUrl" class="form-control" type="text">
78 58
  </form-inline>
79
  <form-inline [description]="institutionNameDesc" [valid]="updateGroup.get('institutionName').valid || !formSubmitted">
59
  <form-inline [description]="institutionNameDesc" [valid]="updateGroup.get('institutionName').valid">
80 60
    <input formControlName="institutionName" class="form-control" type="text">
81 61
  </form-inline>
82 62
  <h4 class="uk-h4 uk-text-primary uk-scrollspy-inview uk-animation-slide-top-medium"
83 63
      uk-scrollspy-class="">Extra Information</h4>
84
  <form-inline [description]="englishNameDesc" [valid]="updateGroup.get('englishName').valid || !formSubmitted">
64
  <form-inline [description]="englishNameDesc" [valid]="updateGroup.get('englishName').valid">
85 65
    <input formControlName="englishName" class="form-control" type="text">
86 66
  </form-inline>
87 67
  <form-inline [description]="logoUrlDesc" [valid]="updateGroup.get('logoUrl').valid">
......
95 75
      Please make sure that the maximum size of the uploaded image is width=360px, height=240px
96 76
    </div>
97 77
  </form-inline>
98
  <form-inline [description]="timezoneDesc" [valid]="updateGroup.get('timezone').valid || !formSubmitted">
78
  <form-inline [description]="timezoneDesc" [valid]="updateGroup.get('timezone').valid">
99 79
    <select formControlName="timezone" class="form-control">
100 80
      <option value="">-- none selected --</option>
101 81
      <option *ngFor="let timezone of timezones" value="{{ timezone.offset }}">{{ timezone.name }}</option>
102 82
    </select>
103 83
  </form-inline>
104
  <form-inline [description]="datasourceTypeDesc" [valid]="updateGroup.get('datasourceType').valid || !formSubmitted">
84
  <form-inline [description]="datasourceTypeDesc" [valid]="updateGroup.get('datasourceType').valid">
105 85
    <select formControlName="datasourceType" class="form-control">
106 86
      <option value="">-- none selected --</option>
107 87
      <option *ngFor="let key of classCodes" value="{{key}}">{{ datasourceClasses[key] }}</option>
......
109 89
  </form-inline>
110 90
  <h4 class="uk-h4 uk-text-primary uk-scrollspy-inview uk-animation-slide-top-medium"
111 91
      uk-scrollspy-class="">Administrator & contact information</h4>
112
  <form-inline [description]="adminEmailDesc" [valid]="updateGroup.get('adminEmail').valid || !formSubmitted">
92
  <form-inline [description]="adminEmailDesc" [valid]="updateGroup.get('adminEmail').valid">
113 93
    <span *ngIf="updateGroup.get('adminEmail').invalid && updateGroup.get('adminEmail').touched && updateGroup.get('adminEmail').dirty"
114 94
          class="help-block inline"
115 95
          style="margin-top: 0px; margin-bottom: 0px; ">You need to enter a valid email address</span>

Also available in: Unified diff