Skip to content

Commit

Permalink
fix(Project):added counter or uuid when shortname is already taken an…
Browse files Browse the repository at this point in the history
…d is longer than 18 chars
  • Loading branch information
dweinholz committed Dec 18, 2024
1 parent 2ff97d8 commit dda48ea
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
</div>
<div *ngIf="shortNameTaken">
<strong>
<font color="red">Please choose another shortname</font>
<font color="red"
>Warning: This shortname is already in use. A unique suffix will be automatically appended upon
submission.</font
>
</strong>
</div>
<input
Expand All @@ -165,19 +168,17 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
pattern="[a-zA-Z0-9]+"
[ngClass]="{
'is-invalid':
(form.controls.project_application_shortname?.invalid || shortNameTaken) &&
form.controls.project_application_shortname?.invalid &&
(form.controls.project_application_shortname?.dirty ||
form.controls.project_application_shortname?.touched)
,
form.controls.project_application_shortname?.touched),
'is-valid':
form.controls.project_application_shortname?.valid && !shortNameTaken &&
form.controls.project_application_shortname?.valid &&
(form.controls.project_application_shortname?.dirty ||
form.controls.project_application_shortname?.touched),
}"
/>

<span class="help-block">Enter a short name (between 5 and 15 characters).</span>

</div>
</div>

Expand Down Expand Up @@ -1799,7 +1800,6 @@ <h6><strong>Platforms</strong></h6>
data-test-id="submit_application_btn"
[disabled]="
submitting ||
shortNameTaken ||
form.invalid ||
(!unknownPiAffiliationsConfirmation &&
!valid_pi_affiliations &&
Expand Down

0 comments on commit dda48ea

Please sign in to comment.