Skip to content

Commit 840577b

Browse files
xflordHejdaJakub
authored andcommitted
refactor(admin): visually update edit form item dialog
* updated the dialog for editing application form items to match the vertical layout of other dialogs
1 parent 760f8df commit 840577b

File tree

13 files changed

+203
-195
lines changed

13 files changed

+203
-195
lines changed

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

Lines changed: 170 additions & 158 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class EditApplicationFormItemDialogComponent implements OnInit {
4040
itemType = ItemType;
4141
options: { [key: string]: [string, string][] };
4242
theme: string;
43-
loading = false;
43+
loading = true;
4444
hiddenValues: HiddenEnum[] = ['NEVER', 'ALWAYS', 'IF_EMPTY', 'IF_PREFILLED'];
4545
disabledValues: DisabledEnum[] = ['NEVER', 'ALWAYS', 'IF_EMPTY', 'IF_PREFILLED'];
4646
possibleDependencyItems: ApplicationFormItem[] = [];

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

Whitespace-only changes.

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

Lines changed: 0 additions & 12 deletions
This file was deleted.

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

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/admin-gui/src/app/shared/shared.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ import { StatisticsCardComponent } from './components/statistics-card/statistics
148148
import { ApplicationFormItemDisabledPipe } from './pipes/application-form-item-disabled.pipe';
149149
import { ApplicationFormItemHiddenPipe } from './pipes/application-form-item-hidden.pipe';
150150
import { MatListModule } from '@angular/material/list';
151-
import { EditApplicationFormItemLineComponent } from './components/dialogs/edit-application-form-item-dialog/edit-application-form-item-line/edit-application-form-item-line.component';
152151
import { AddGroupToRegistrationComponent } from './components/dialogs/add-group-to-registration/add-group-to-registration.component';
153152
import { OneEntityAttributePageComponent } from './components/one-entity-attribute-page/one-entity-attribute-page.component';
154153
import { PerunUtilsModule } from '@perun-web-apps/perun/utils';
@@ -437,7 +436,6 @@ import { ApplicationsBulkOperationDialogComponent } from './components/dialogs/a
437436
StatisticsCardComponent,
438437
ApplicationFormItemDisabledPipe,
439438
ApplicationFormItemHiddenPipe,
440-
EditApplicationFormItemLineComponent,
441439
AddGroupToRegistrationComponent,
442440
OneEntityAttributePageComponent,
443441
AddResourceTagToResourceDialogComponent,

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,8 @@
14231423
"DISPLAY_ON_APPLICATION": "Display on application",
14241424
"INITIAL": "Initial",
14251425
"EXTENSION": "Extension",
1426-
"DISPLAY_ON_APPLICATION_DESCRIPTION": "Define on which application types is this item displayed.",
1426+
"DISPLAY_ON_APPLICATION_INITIAL": "This item will be displayed on INITIAL applications",
1427+
"DISPLAY_ON_APPLICATION_EXTENSION": "This item will be displayed on EXTENSION applications",
14271428
"CONTENT": "Content",
14281429
"CONTENT_DESCRIPTION": "HTML formatted content of form item. It spans through all columns to full form width.",
14291430
"LABEL": "Label",
@@ -1448,6 +1449,10 @@
14481449
"NO_SELECTED_ITEM": "No item selected (empty value)",
14491450
"CUSTOM_VALUE": " -- custom value -- ",
14501451
"OPTIONS": "Options",
1452+
"USER_ACTION": "User action",
1453+
"ATTRIBUTES": "Attributes",
1454+
"INTERACTIVITY": "Interactivity",
1455+
"VALIDATION": "Validation",
14511456
"OPTIONS_DESCRIPTION": "Define possible options for selection in SELECTIONBOX, COMBOBOX, CHECKBOX, RADIO widgets. Empty options are not used.",
14521457
"ADD_OPTION": "Add option",
14531458
"REMOVE_OPTION": "Remove",

libs/perun/components/src/lib/app-form-item-search-select/app-form-item-search-select.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[entity]="item"
77
(entitySelected)="itemSelected.emit($event)"
88
[disableAutoSelect]="true"
9-
[selectPlaceholder]="'SHARED_LIB.PERUN.COMPONENTS.APP_FORM_ITEM_SEARCH_SELECT.SELECT_ITEM' | translate"
9+
[selectPlaceholder]="label ?? 'SHARED_LIB.PERUN.COMPONENTS.APP_FORM_ITEM_SEARCH_SELECT.SELECT_ITEM' | translate"
10+
[hint]="hint"
1011
[findPlaceholder]="'SHARED_LIB.PERUN.COMPONENTS.APP_FORM_ITEM_SEARCH_SELECT.FIND_ITEM' | translate"
1112
[noEntriesText]="'SHARED_LIB.PERUN.COMPONENTS.APP_FORM_ITEM_SEARCH_SELECT.NO_ITEM_FOUND' | translate">
1213
</perun-web-apps-entity-search-select>

libs/perun/components/src/lib/app-form-item-search-select/app-form-item-search-select.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export const NO_FORM_ITEM: ApplicationFormItem = {};
1212
export class AppFormItemSearchSelectComponent {
1313
@Input() items: ApplicationFormItem[];
1414
@Input() item: ApplicationFormItem = null;
15+
@Input() label: string;
16+
@Input() hint = '';
1517
@Output() itemSelected = new EventEmitter<ApplicationFormItem>();
1618
constructor(private translate: TranslateService) {}
1719

libs/perun/components/src/lib/entity-search-select/entity-search-select.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</mat-option>
5151
</cdk-virtual-scroll-viewport>
5252
</mat-select>
53-
<mat-hint *ngIf="warning?.length !== 0" class="warning">{{warning}}</mat-hint>
53+
<mat-hint *ngIf="hint?.length !== 0">{{hint}}</mat-hint>
5454
</mat-form-field>
5555

5656
<perun-web-apps-deselect-button

0 commit comments

Comments
 (0)