1010 >
1111 Developer tools
1212 </ h1 >
13- < a routerLink ="/my-orcid "> Back to my record</ a >
13+ < a
14+ routerLink ="/my-orcid "
15+ i18n ="@@developerTools.backToMyRecod "
16+ cdkFocusInitial
17+ #firstInput
18+ class ="underline orc-font-body-small "
19+ > Back to my record</ a
20+ >
1421 </ div >
1522
1623 < div class ="loading-container ">
6673
6774 < div class ="row ">
6875 < label
76+ for ="displayName "
6977 class ="row mat-caption "
7078 [ngClass] ="{
7179 error:
7886 >
7987 </ label >
8088 < mat-form-field appearance ="outline " class ="mat-form-field-min ">
81- < input matInput formControlName ="displayName " type ="text " />
89+ < input
90+ matInput
91+ formControlName ="displayName "
92+ type ="text "
93+ id ="displayName "
94+ />
8295 < mat-error
8396 *ngIf ="form.hasError('required', 'displayName') "
8497 i18n ="@@developerTools.applicationNameCannotBeEmpty "
99112 </ div >
100113 < div class ="row ">
101114 < label
115+ for ="website "
102116 class ="row mat-caption "
103117 [ngClass] ="{
104118 error:
111125 >
112126 </ label >
113127 < mat-form-field appearance ="outline " class ="mat-form-field-min ">
114- < input matInput formControlName ="website " type ="text " />
128+ < input
129+ matInput
130+ formControlName ="website "
131+ type ="text "
132+ id ="website "
133+ />
115134 < mat-error
116135 *ngIf ="form.hasError('required', 'website') "
117136 i18n ="@@developerTools.websiteNameCannotBeEmpty "
129148
130149 < div class ="row ">
131150 < label
151+ for ="api-description "
132152 class ="row mat-caption "
133153 [ngClass] ="{
134154 error:
@@ -220,7 +240,7 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.redirectUris">
220240 >
221241
222242 < a
223- class ="undeline "
243+ class ="underline "
224244 i18n ="@@developerTools.redirectUriFaq "
225245 rel ="noopener noreferrer "
226246 target ="_blank "
@@ -249,7 +269,11 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.redirectUris">
249269 < ng-container
250270 *ngFor ="let redirectUri of redirectUris.controls; index as i "
251271 >
252- < mat-form-field appearance ="outline " class ="mat-form-field-min ">
272+ < mat-form-field
273+ appearance ="outline "
274+ class ="mat-form-field-min "
275+ [id] ="i + 'url' "
276+ >
253277 < input
254278 #websiteInput
255279 matInput
@@ -292,7 +316,7 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.redirectUris">
292316 < div class ="row ">
293317 < a
294318 id ="add-link "
295- class ="col add-more no-gutters undeline-link "
319+ class ="col add-more no-gutters underline "
296320 (click) ="addRedirectUri() "
297321 >
298322 < mat-icon class ="large-material-icon "
@@ -319,7 +343,7 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
319343 </ p >
320344
321345 < strong i18n ="@@developerTools.endpoint "> Ednpoint</ strong >
322- < p > https://sandbox.orcid.org /oauth/authorize</ p >
346+ < p > {{ baseURL }} /oauth/authorize</ p >
323347
324348 < strong i18n ="@@developerTools.scope "> Scope</ strong >
325349 < p > /authenticate</ p >
@@ -330,10 +354,12 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
330354 < p i18n ="@@developerTools.code "> code</ p >
331355
332356 < code
333- > https://sandbox.orcid.org /oauth/authorize?client_id={{
357+ > {{ baseURL }} /oauth/authorize?client_id={{
334358 this.existingClient.clientId.value
335- }}&response_type=code&scope=/authenticate&redirect_uri=REPLACE
336- WITH REDIRECT URI
359+ }}&response_type=code&scope=/authenticate&redirect_uri=< ng-container
360+ i18n ="@@developerTools.replaceWithRedirect "
361+ > REPLACE WITH REDIRECT URI</ ng-container
362+ >
337363 </ code >
338364 </ app-code-panel >
339365 < app-code-panel [title] ="labelTokenRequest ">
@@ -343,7 +369,7 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
343369 </ p >
344370
345371 < strong i18n ="@@developerTools.endpoint "> Ednpoint</ strong >
346- < p > https://sandbox.orcid.org /oauth/token</ p >
372+ < p > {{ baseURL }} /oauth/token</ p >
347373
348374 < strong i18n ="@@developerTools.responseType "
349375 > Response type</ strong
@@ -358,9 +384,12 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
358384 this.existingClient.clientId.value
359385 }}&client_secret={{
360386 this.existingClient.clientSecret.value
361- }}&grant_type=authorization_code&redirect_uri=REPLACE WITH
362- REDIRECT URI&code=REPLACE WITH OAUTH CODE'
363- https://sandbox.orcid.org/oauth/token
387+ }}&grant_type=authorization_code&redirect_uri=< ng-container
388+ i18n ="@@developerTools.replaceWithRedirect "
389+ > REPLACE WITH REDIRECT URI</ ng-container
390+ > &code=< ng-container i18n ="@@developerTools.replaceWithOauth "
391+ > REPLACE WITH OAUTH CODE</ ng-container
392+ > ' {{ baseURL }}/oauth/token
364393 </ code >
365394 </ app-code-panel >
366395 < app-code-panel [title] ="labelOpenIdImplicitRequest ">
@@ -372,7 +401,7 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
372401 >
373402
374403 < a
375- class ="undeline "
404+ class ="underline "
376405 i18n ="@@developerTools.moreInformation "
377406 rel ="noopener noreferrer "
378407 target ="_blank "
@@ -382,7 +411,7 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
382411 </ p >
383412
384413 < strong i18n ="@@developerTools.endpoint "> Ednpoint</ strong >
385- < p > https://sandbox.orcid.org /oauth/token</ p >
414+ < p > {{ baseURL }} /oauth/token</ p >
386415
387416 < strong i18n ="@@developerTools.scope "> Scope</ strong >
388417 < p > openid</ p >
@@ -393,62 +422,56 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
393422 < p > token</ p >
394423
395424 < code
396- > https://sandbox.orcid.org /oauth/authorize?client_id={{
425+ > {{ baseURL }} /oauth/authorize?client_id={{
397426 this.existingClient.clientId.value
398- }}&response_type=token&scope=openid&redirect_uri=REPLACE WITH
399- REDIRECT URI
400- </ code >
427+ }}&response_type=token&scope=openid&redirect_uri=< ng-container
428+ i18n ="@@developerTools.replaceWithRedirect "
429+ > REPLACE WITH REDIRECT URI</ ng-container
430+ > </ code
431+ >
401432 </ app-code-panel >
402433 </ ng-container >
403434
404- < ng-container *ngIf ="sucessSave && form.pristine ">
405- < p i18n ="@@developerTools.changesHaveBeenSavedSuccessfully ">
406- Changes have been saved successfully.
407- </ p >
408- </ ng-container >
409- < p >
410- < mat-error
411- *ngIf ="
412- form.hasError('forbiddenLength', 'redirectUris') &&
413- formWasSummited
414- "
415- i18n ="@@developerTools.youShouldProvideAtLeastOneRedirectUri "
416- >
417- You should provide at least one redirect URI
418- </ mat-error >
419-
420- < mat-error
421- *ngIf ="
422- form.hasError('duplicate', 'redirectUris') && formWasSummited
423- "
424- i18n ="@@developerTools.redirectUrisMustBeUnique "
435+ < p class ="save-message " *ngIf ="sucessSave && form.pristine ">
436+ < ng-container
437+ i18n ="@@developerTools.changesHaveBeenSavedSuccessfully "
425438 >
439+ Changes have been saved successfully.
440+ </ ng-container >
441+ </ p >
442+ < p
443+ class ="save-message "
444+ *ngIf ="
445+ form.hasError('duplicate', 'redirectUris') && formWasSummited
446+ "
447+ >
448+ < mat-error i18n ="@@developerTools.redirectUrisMustBeUnique ">
426449 Redirect URIs must be unique
427450 </ mat-error >
451+ </ p >
428452
429- < button
430- mat-raised-button
431- color ="primary "
432- id ="cy-register-for-public-api "
433- (click) ="save() "
434- [disabled] ="form.pristine "
435- class ="save-button "
453+ < button
454+ mat-raised-button
455+ color ="primary "
456+ id ="cy-register-for-public-api "
457+ (click) ="save() "
458+ [disabled] ="form.pristine "
459+ class ="save-button "
460+ >
461+ < ng-container
462+ *ngIf ="!existingClient?.clientId?.value "
463+ i18n ="@@developerTools.saveApplicationAndGenerate "
436464 >
437- < ng-container
438- *ngIf ="!existingClient?.clientId?.value "
439- i18n ="@@developerTools.saveApplicationAndGenerate "
440- >
441- Save application and generate my client ID and secret
442- </ ng-container >
465+ Save application and generate my client ID and secret
466+ </ ng-container >
443467
444- < ng-container
445- *ngIf ="existingClient?.clientId?.value "
446- i18n ="@@developerTools.saveApplication "
447- >
448- Save application
449- </ ng-container >
450- </ button >
451- </ p >
468+ < ng-container
469+ *ngIf ="existingClient?.clientId?.value "
470+ i18n ="@@developerTools.saveApplication "
471+ >
472+ Save application
473+ </ ng-container >
474+ </ button >
452475 </ ng-container >
453476 </ ng-container >
454477
0 commit comments