Skip to content

Commit 1d8ed28

Browse files
HejdaJakubxkureck
authored andcommitted
fix(admin): remove two unsupported types of application form items
* Unsupported types of application form items (FROM_FEDERATION_SHOW and FROM_FEDERATION_HIDDEN) were removed. * All occurrences of these unsupported types were removed across the GUI.
1 parent 23fc08d commit 1d8ed28

File tree

9 files changed

+7
-89
lines changed

9 files changed

+7
-89
lines changed

apps/admin-gui/src/app/shared/components/dialogs/add-application-form-item-dialog/add-application-form-item-dialog.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ export class AddApplicationFormItemDialogComponent implements OnInit {
2424
selectedWidget = 'HEADING';
2525
widgets = [
2626
'HEADING',
27-
'FROM_FEDERATION_HIDDEN',
2827
'HTML_COMMENT',
2928
'TEXTFIELD',
30-
'FROM_FEDERATION_SHOW',
3129
'VALIDATED_EMAIL',
3230
'USERNAME',
3331
'PASSWORD',

apps/admin-gui/src/app/shared/components/dialogs/edit-application-form-item-dialog/edit-application-form-item-dialog.component.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ <h1 mat-dialog-title>
3939
</app-edit-application-form-item-line>
4040

4141
<div
42-
*ngIf="isApplicationFormItemOfType(['TEXTFIELD', 'FROM_FEDERATION_HIDDEN', 'FROM_FEDERATION_SHOW', 'USERNAME', 'VALIDATED_EMAIL',
43-
'PASSWORD', 'TEXTAREA', 'TIMEZONE', 'CHECKBOX', 'RADIO', 'COMBOBOX', 'SELECTIONBOX'])">
42+
*ngIf="isApplicationFormItemOfType(['TEXTFIELD', 'USERNAME', 'VALIDATED_EMAIL', 'PASSWORD', 'TEXTAREA',
43+
'TIMEZONE', 'CHECKBOX', 'RADIO', 'COMBOBOX', 'SELECTIONBOX'])">
4444
<app-edit-application-form-item-line
4545
[label]="'DIALOGS.APPLICATION_FORM_EDIT_ITEM.REQUIRED' | translate"
4646
[description]="'DIALOGS.APPLICATION_FORM_EDIT_ITEM.REQUIRED_DESCRIPTION' | translate">
@@ -102,8 +102,7 @@ <h1 mat-dialog-title>
102102
</app-edit-application-form-item-line>
103103
</div>
104104
<div
105-
*ngIf="isApplicationFormItemOfType(['TEXTFIELD', 'FROM_FEDERATION_HIDDEN', 'FROM_FEDERATION_SHOW', 'USERNAME', 'PASSWORD',
106-
'TEXTAREA', 'CHECKBOX', 'RADIO', 'COMBOBOX', 'SELECTIONBOX'])">
105+
*ngIf="isApplicationFormItemOfType(['TEXTFIELD', 'USERNAME', 'PASSWORD', 'TEXTAREA', 'CHECKBOX', 'RADIO', 'COMBOBOX', 'SELECTIONBOX'])">
107106
<app-edit-application-form-item-line
108107
[label]="'DIALOGS.APPLICATION_FORM_EDIT_ITEM.REGEX' | translate"
109108
[description]="'DIALOGS.APPLICATION_FORM_EDIT_ITEM.REGEX_DESCRIPTION' | translate">
@@ -182,9 +181,8 @@ <h1 mat-dialog-title>
182181
</div>
183182

184183
<div
185-
*ngIf="isApplicationFormItemOfType(['TEXTFIELD', 'FROM_FEDERATION_HIDDEN', 'FROM_FEDERATION_SHOW', 'VALIDATED_EMAIL', 'USERNAME',
186-
'PASSWORD', 'RADIO', 'TEXTAREA', 'COMBOBOX', 'CHECKBOX', 'TIMEZONE',
187-
'SELECTIONBOX', 'EMBEDDED_GROUP_APPLICATION'])">
184+
*ngIf="isApplicationFormItemOfType(['TEXTFIELD', 'VALIDATED_EMAIL', 'USERNAME', 'PASSWORD', 'RADIO', 'TEXTAREA',
185+
'COMBOBOX', 'CHECKBOX', 'TIMEZONE', 'SELECTIONBOX', 'EMBEDDED_GROUP_APPLICATION'])">
188186
<app-edit-application-form-item-line
189187
[label]="'DIALOGS.APPLICATION_FORM_EDIT_ITEM.LABEL' | translate"
190188
[description]="'DIALOGS.APPLICATION_FORM_EDIT_ITEM.LABEL_DESCRIPTION' | translate">

apps/admin-gui/src/app/shared/pipes/application-form-item-type.pipe.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ export class ApplicationFormItemTypePipe implements PipeTransform {
1919
});
2020
break;
2121
}
22-
case 'FROM_FEDERATION_HIDDEN': {
23-
this.translateService
24-
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.TYPES.FROM_FEDERATION_HIDDEN')
25-
.subscribe((text) => {
26-
this.returnData = text;
27-
});
28-
break;
29-
}
3022
case 'HTML_COMMENT': {
3123
this.translateService
3224
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.TYPES.HTML_COMMENT')
@@ -43,14 +35,6 @@ export class ApplicationFormItemTypePipe implements PipeTransform {
4335
});
4436
break;
4537
}
46-
case 'FROM_FEDERATION_SHOW': {
47-
this.translateService
48-
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.TYPES.FROM_FEDERATION_SHOW')
49-
.subscribe((text) => {
50-
this.returnData = text;
51-
});
52-
break;
53-
}
5438
case 'VALIDATED_EMAIL': {
5539
this.translateService
5640
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.TYPES.VALIDATED_EMAIL')

apps/admin-gui/src/app/shared/pipes/application-form-widget-description.pipe.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ export class ApplicationFormWidgetDescriptionPipe implements PipeTransform {
1919
});
2020
break;
2121
}
22-
case 'FROM_FEDERATION_HIDDEN': {
23-
this.translateService
24-
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.WIDGET_DESCRIPTION.FROM_FEDERATION_HIDDEN')
25-
.subscribe((text) => {
26-
this.returnData = text;
27-
});
28-
break;
29-
}
3022
case 'HTML_COMMENT': {
3123
this.translateService
3224
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.WIDGET_DESCRIPTION.HTML_COMMENT')
@@ -43,14 +35,6 @@ export class ApplicationFormWidgetDescriptionPipe implements PipeTransform {
4335
});
4436
break;
4537
}
46-
case 'FROM_FEDERATION_SHOW': {
47-
this.translateService
48-
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.WIDGET_DESCRIPTION.FROM_FEDERATION_SHOW')
49-
.subscribe((text) => {
50-
this.returnData = text;
51-
});
52-
break;
53-
}
5438
case 'VALIDATED_EMAIL': {
5539
this.translateService
5640
.get('VO_DETAIL.SETTINGS.APPLICATION_FORM.WIDGET_DESCRIPTION.VALIDATED_EMAIL')

apps/admin-gui/src/app/vos/components/application-detail/application-detail.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,15 @@ <h2 class="page-subtitle">
150150
<th mat-header-cell *matHeaderCellDef></th>
151151
<td mat-cell *matCellDef="let userData" class="font-weight-bold">
152152
{{getLabel(userData.formItem)}}
153-
{{userData.formItem.type.startsWith("FROM_FEDERATION") ? '*' : ''}}
153+
{{userData.formItem.required ? '*' : ''}}
154154
</td>
155155
</ng-container>
156156
<ng-container matColumnDef="value">
157157
<th mat-header-cell *matHeaderCellDef></th>
158158
<td class="word-break-all" mat-cell *matCellDef="let userData">
159159
{{userData.value}}
160160
<button
161-
*ngIf="!userData.formItem.type.startsWith('FROM_FEDERATION') &&
162-
(application.state === 'NEW' || application.state === 'VERIFIED') &&
161+
*ngIf="(application.state === 'NEW' || application.state === 'VERIFIED') &&
163162
userData.formItem.type !== 'EMBEDDED_GROUP_APPLICATION'"
164163
mat-icon-button
165164
aria-label="Edit Application data"

apps/admin-gui/src/app/vos/components/application-form-list/application-form-list.component.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,6 @@
7575
<input type="text" />
7676
</form>
7777
</div>
78-
<div
79-
*ngIf="applicationFormItem.type === 'FROM_FEDERATION_HIDDEN'"
80-
class="font-italic disabled">
81-
{{'VO_DETAIL.SETTINGS.APPLICATION_FORM.HIDDEN_VALUE' | translate}}
82-
</div>
83-
<div *ngIf="applicationFormItem.type === 'FROM_FEDERATION_SHOW'">
84-
<form>
85-
<input disabled />
86-
</form>
87-
</div>
8878
<div *ngIf="applicationFormItem.type === 'PASSWORD'">
8979
<form>
9080
<input class="mb-1" type="text" /><br />

apps/admin-gui/src/app/vos/components/application-form-preview/application-form-preview.component.html

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,6 @@ <h1 class="page-subtitle">
5757
</div>
5858
</div>
5959

60-
<div
61-
class="d-flex"
62-
*ngIf="applicationFormItem.type === 'FROM_FEDERATION_SHOW' &&
63-
applicationFormItem.hidden !== 'ALWAYS'">
64-
<div class="w-50 d-flex">
65-
<span class="w-50">{{getLocalizedLabel(applicationFormItem)}}</span>
66-
<div class="w-50">
67-
<input type="text" class="w-100" disabled />
68-
</div>
69-
</div>
70-
<div class="w-50 d-flex left">
71-
<mat-icon
72-
class="pointer"
73-
*ngIf="applicationFormItem.disabled !== 'NEVER'"
74-
[matTooltip]="disabledTooltip(applicationFormItem)"
75-
>lock</mat-icon
76-
>
77-
<mat-icon
78-
class="pointer"
79-
*ngIf="applicationFormItem.hidden !== 'NEVER'"
80-
[matTooltip]="hiddenTooltip(applicationFormItem)"
81-
>visibility_off</mat-icon
82-
>
83-
<span class="ml-2">{{getLocalizedHint(applicationFormItem)}}</span>
84-
</div>
85-
</div>
86-
8760
<div
8861
class="d-flex"
8962
*ngIf="applicationFormItem.type === 'PASSWORD' &&

apps/admin-gui/src/assets/i18n/en.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,6 @@
377377
"SUBMIT_BUTTON": "Submit button",
378378
"HTML_COMMENT": "Custom HTML text",
379379
"TEXTFIELD": "Input text field",
380-
"FROM_FEDERATION_SHOW": "Input text field pre-filled from external source",
381-
"FROM_FEDERATION_HIDDEN": "Hidden input text pre-filled from external source",
382380
"VALIDATED_EMAIL": "Input text field for email",
383381
"SELECTIONBOX": "Single value selection from list",
384382
"USERNAME": "Input text field for username",
@@ -408,8 +406,6 @@
408406
"SUBMIT_BUTTON": "Button used to submit the form with a custom label. All other form items are checked on valid input before submission. If it fails, form is not sent.",
409407
"HTML_COMMENT": "Item is used to display custom HTML content anywhere on the form. Useful for explanation descriptions, dividing parts of form, etc.",
410408
"TEXTFIELD": "Editable text field useful to gather short text input, e.g. name, phone.",
411-
"FROM_FEDERATION_SHOW": "Non-editable and visible form item. The form is submitted even on invalid input! Useful to automatically gather information provided by AUTH mechanism (IdP federation, certificate).",
412-
"FROM_FEDERATION_HIDDEN": "Non-editable and hidden form item. The form is submitted even on invalid input! Useful to automatically gather information provided by AUTH mechanism (IdP federation, certificate).",
413409
"VALIDATED_EMAIL": "Special text field to gather and verify user`s email address. Input is checked on email address format. If a user enters a new value, then a validation email is sent. The application then can't be approved unless the provided email address is validated.",
414410
"SELECTIONBOX": "Simple selection box with defined custom values that user can choose.",
415411
"USERNAME": "Special text field to gather user`s login. It checks login availability on user input.",

libs/perun/openapi/src/lib/model/type.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ export type Type =
1717
| 'HTML_COMMENT'
1818
| 'SUBMIT_BUTTON'
1919
| 'AUTO_SUBMIT_BUTTON'
20-
| 'FROM_FEDERATION_SHOW'
21-
| 'FROM_FEDERATION_HIDDEN'
2220
| 'PASSWORD'
2321
| 'VALIDATED_EMAIL'
2422
| 'TEXTFIELD'
@@ -36,8 +34,6 @@ export const Type = {
3634
HTMLCOMMENT: 'HTML_COMMENT' as Type,
3735
SUBMITBUTTON: 'SUBMIT_BUTTON' as Type,
3836
AUTOSUBMITBUTTON: 'AUTO_SUBMIT_BUTTON' as Type,
39-
FROMFEDERATIONSHOW: 'FROM_FEDERATION_SHOW' as Type,
40-
FROMFEDERATIONHIDDEN: 'FROM_FEDERATION_HIDDEN' as Type,
4137
PASSWORD: 'PASSWORD' as Type,
4238
VALIDATEDEMAIL: 'VALIDATED_EMAIL' as Type,
4339
TEXTFIELD: 'TEXTFIELD' as Type,

0 commit comments

Comments
 (0)