Project

General

Profile

« Previous | Next » 

Revision 51581

fixed checking if at least one interface was saved

View differences:

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

Also available in: Unified diff