Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 1a149aa3 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

- small bugfixes

parent 43c55009
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ mat-sidenav.menu-expanded {
}
mat-sidenav.menu-collapsed {
width: 50px;
width: 55px;
}
html, body, material-app, .my-content {
......
......@@ -8,12 +8,12 @@
<mat-form-field style="width:100%">
<input matInput placeholder="Domain Code" name="domainCode"
id="domainCode_id"
[formControl]="domainForm.controls['domainCode']" maxlength="255" required>
[formControl]="domainForm.controls['domainCode']" maxlength="63" required>
<mat-hint align="end">For WS API integration: the Domain property</mat-hint>
<div
*ngIf="(!editMode && domainForm.controls['domainCode'].touched || editMode) && domainForm.controls['domainCode'].hasError('pattern')"
style="color:red; font-size: 70%">
Domain code must contain only chars and numbers.
Domain code must contain only chars and numbers and must be less than 63 chars long.
</div>
<div
*ngIf="(!editMode && domainForm.controls['domainCode'].touched || editMode) && domainForm.controls['domainCode'].hasError('notInList')"
......@@ -24,7 +24,7 @@
<mat-form-field style="width:100%">
<input matInput placeholder="SML domain"
name="smlSubdomain" id="smldomain_id"
[formControl]="domainForm.controls['smlSubdomain']" maxlength="63" required>
[formControl]="domainForm.controls['smlSubdomain']" maxlength="63" >
<mat-hint align="end">Part of DNS Zone (e.g. for eHealth: 'ehealth', for peppol: '', ..</mat-hint>
<div
*ngIf="(!editMode && domainForm.controls['smlSubdomain'].touched || editMode) && domainForm.controls['smlSubdomain'].hasError('pattern')"
......@@ -37,6 +37,11 @@
style="color:red; font-size: 70%">
The SML subdomain is already defined!
</div>
<div
*ngIf="(!editMode && domainForm.controls['smlSubdomain'].hasError('blankDomainError'))"
style="color:red; font-size: 70%">
Domain with empty sml subdomain already exists!
</div>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-select placeholder="Response signature Certificate"
......
......@@ -19,7 +19,7 @@ export class DomainDetailsDialogComponent {
static readonly EDIT_MODE = 'Domain Edit';
readonly subDomainPattern = '^(?![0-9]+$)(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$';
readonly smpIdDomainPattern = '^(?![0-9]+$)(?!.*-$)(?!-)[a-zA-Z0-9-]{0,63}$';
readonly domainCodePattern = '^[a-zA-Z0-9]{1,255}$';
readonly domainCodePattern = '^[a-zA-Z0-9]{1,63}$';
editMode: boolean;
formTitle: string;
......@@ -99,7 +99,24 @@ export class DomainDetailsDialogComponent {
submitForm() {
this.checkValidity(this.domainForm)
this.dialogRef.close(true);
// check if empty domain already exists
if(this.current.status === SearchTableEntityStatus.NEW
&& !this.domainForm.value['smlSubdomain'] ){
var domainWithNullSML = this.lookups.cachedDomainList.filter(function(dmn) {
return !dmn.smlSubdomain;
})[0];
if(!domainWithNullSML) {
this.dialogRef.close(true);
} else {
this.domainForm.controls['smlSubdomain'].setErrors({'blankDomainError': true});
}
} else {
this.dialogRef.close(true);
}
}
checkValidity(g: FormGroup) {
......@@ -113,6 +130,8 @@ export class DomainDetailsDialogComponent {
Object.keys(g.controls).forEach(key => {
g.get(key).updateValueAndValidity();
});
}
public getCurrent(): DomainRo {
......
......@@ -82,6 +82,23 @@
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- force UTF-8 encoding-->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
- Loads the root application context of this web app at startup.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment