From 2cb6cc55cb7bcf00f11e006d86995c27d68d68fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Mon, 25 Aug 2025 14:08:35 +0000 Subject: [PATCH] [mod] invitation_handle --- source/data/localization/deu.loc.json | 7 +++++-- source/data/localization/eng.loc.json | 7 +++++-- source/pages/group_create/logic.ts | 3 ++- source/pages/invitation_create/logic.ts | 5 ----- source/pages/invitation_handle/logic.ts | 16 ++++------------ source/pages/invitation_list/logic.ts | 11 ++++++----- source/pages/invitation_view/logic.ts | 11 +++-------- source/pages/member_view/logic.ts | 5 ----- 8 files changed, 25 insertions(+), 40 deletions(-) diff --git a/source/data/localization/deu.loc.json b/source/data/localization/deu.loc.json index a380e32..3273870 100644 --- a/source/data/localization/deu.loc.json +++ b/source/data/localization/deu.loc.json @@ -12,12 +12,15 @@ "domain.group.name.label": "Name", "domain.group.label.label": "Beschriftung", "domain.member.member": "Mitglied", - "domain.member.name.label": "Name", - "domain.member.label.label": "Beschriftung", + "domain.member.name.label": "Anmeldename", + "domain.member.name.help": "der Name für die Anmeldung bei den Netz-Diensten.\n\nkann später NICHT mehr geändert werden", + "domain.member.label.label": "Anzeigename", + "domain.member.label.help": "wie du angezeigt wirst\n\nkann später geändert werden", "domain.member.groups.label": "Gruppen", "domain.member.registered.label": "registriert", "domain.member.enabled.label": "aktiviert", "domain.member.email_address.label": "E-Mail-Adresse", + "domain.member.email_address.help": "für Benachrichtigungen von Diensten", "domain.member.password_set.label": "Passwort gesetzt", "domain.invitation.key.label": "Schlüssel", "domain.invitation.expiry.label": "Ablaufzeitpunkt", diff --git a/source/data/localization/eng.loc.json b/source/data/localization/eng.loc.json index e9d8bb9..39cce10 100644 --- a/source/data/localization/eng.loc.json +++ b/source/data/localization/eng.loc.json @@ -12,12 +12,15 @@ "domain.group.name.label": "name", "domain.group.label.label": "label", "domain.member.member": "member", - "domain.member.name.label": "name", - "domain.member.label.label": "label", + "domain.member.name.label": "login name", + "domain.member.name.help": "the name for logging in to the online services\n\ncan NOT be changed later on", + "domain.member.label.label": "display name", + "domain.member.label.help": "how you are displayed\n\ncan be changed later on", "domain.member.groups.label": "groups", "domain.member.registered.label": "registered", "domain.member.enabled.label": "enabled", "domain.member.email_address.label": "e-mail address", + "domain.member.email_address.help": "for notifications from services", "domain.member.password_set.label": "password set", "domain.invitation.key.label": "key", "domain.invitation.expiry.label": "expiration", diff --git a/source/pages/group_create/logic.ts b/source/pages/group_create/logic.ts index 79a69d1..d7db1f0 100644 --- a/source/pages/group_create/logic.ts +++ b/source/pages/group_create/logic.ts @@ -52,7 +52,8 @@ lib_plankton.zoo_page.register( "procedure": async (get_value, get_representation) => { const value = await get_value(); const id : int = await _espe.backend.group_add(value); - lib_plankton.zoo_page.set({"name": "group_view", "parameters": {"id": id}}); + // lib_plankton.zoo_page.set({"name": "group_view", "parameters": {"id": id}}); + lib_plankton.zoo_page.set({"name": "group_list", "parameters": {}}); }, } ] diff --git a/source/pages/invitation_create/logic.ts b/source/pages/invitation_create/logic.ts index 83d4ada..7206797 100644 --- a/source/pages/invitation_create/logic.ts +++ b/source/pages/invitation_create/logic.ts @@ -171,11 +171,6 @@ lib_plankton.zoo_page.register( [ { "name": "value", - /* - "input": new lib_plankton.zoo_input.class_input_list( - () => new lib_plankton.zoo_input.class_input_text() - ), - */ "input": new lib_plankton.zoo_input.class_input_wrapped, Array>( new lib_plankton.zoo_input.class_input_set( group_data.order.map( diff --git a/source/pages/invitation_handle/logic.ts b/source/pages/invitation_handle/logic.ts index 0a1dd9c..f8f5226 100644 --- a/source/pages/invitation_handle/logic.ts +++ b/source/pages/invitation_handle/logic.ts @@ -124,9 +124,11 @@ lib_plankton.zoo_page.register( "input": new lib_plankton.zoo_input.class_input_text( { "read_only": (! data.name_changeable), + "pattern": "^[a-z0-9_\.]+$", } ), "label": lib_plankton.translate.get("domain.member.name.label"), + "help": lib_plankton.translate.get("domain.member.name.help"), }, { "name": "label", @@ -136,6 +138,7 @@ lib_plankton.zoo_page.register( } ), "label": lib_plankton.translate.get("domain.member.label.label"), + "help": lib_plankton.translate.get("domain.member.label.help"), }, { "name": "email_address", @@ -145,21 +148,10 @@ lib_plankton.zoo_page.register( } ), "label": lib_plankton.translate.get("domain.member.email_address.label"), + "help": lib_plankton.translate.get("domain.member.email_address.help"), }, { "name": "groups", - /* - "input": new lib_plankton.zoo_input.class_input_list( - () => new lib_plankton.zoo_input.class_input_text( - { - "read_only": (! data.groups_changeable), - } - ), - { - "read_only": (! data.groups_changeable), - } - ), - */ "input": new lib_plankton.zoo_input.class_input_wrapped, Array>( new lib_plankton.zoo_input.class_input_set( group_data.order.map( diff --git a/source/pages/invitation_list/logic.ts b/source/pages/invitation_list/logic.ts index 5abcd26..b57342e 100644 --- a/source/pages/invitation_list/logic.ts +++ b/source/pages/invitation_list/logic.ts @@ -54,11 +54,12 @@ lib_plankton.zoo_page.register( const search : lib_plankton.zoo_search.type_search = lib_plankton.zoo_search.make( (term) => _espe.backend.invitation_list(), { - "encode_item": (item) => lib_plankton.string.coin( - "{{label}}", - { - "label": item.preview.label_value, - } + "encode_item": (item) => ( + item.preview.label_value + ?? + item.preview.name_value + ?? + lib_plankton.string.coin("[{{id}}]", {"id": item.id.toFixed(0)}) ), "hooks_begin": [ (term) => { diff --git a/source/pages/invitation_view/logic.ts b/source/pages/invitation_view/logic.ts index af4c1c2..02b364b 100644 --- a/source/pages/invitation_view/logic.ts +++ b/source/pages/invitation_view/logic.ts @@ -193,7 +193,7 @@ lib_plankton.zoo_page.register( [ { "name": "value", - "input": new lib_plankton.zoo_input.class_input_text(), + "input": new lib_plankton.zoo_input.class_input_text({"read_only": true}), "label": indent(lib_plankton.translate.get("common.initial_value")), }, { @@ -229,18 +229,13 @@ lib_plankton.zoo_page.register( [ { "name": "value", - /* - "input": new lib_plankton.zoo_input.class_input_list( - () => new lib_plankton.zoo_input.class_input_text(), - {"read_only": true} - ), - */ "input": new lib_plankton.zoo_input.class_input_wrapped, Array>( new lib_plankton.zoo_input.class_input_set( groups_as_array.map( group_thingy => group_thingy.id.toFixed(0) ), - group_id_encoded => groups_as_map.get(parseInt(group_id_encoded)).label + group_id_encoded => groups_as_map.get(parseInt(group_id_encoded)).label, + {"read_only": true} ), (value_inner) => { const array : Array = []; diff --git a/source/pages/member_view/logic.ts b/source/pages/member_view/logic.ts index c7021dd..b238ab6 100644 --- a/source/pages/member_view/logic.ts +++ b/source/pages/member_view/logic.ts @@ -89,11 +89,6 @@ lib_plankton.zoo_page.register( }, { "name": "groups", - /* - "input": new lib_plankton.zoo_input.class_input_list( - () => new lib_plankton.zoo_input.class_input_number() - ), - */ "input": new lib_plankton.zoo_input.class_input_wrapped, Array>( new lib_plankton.zoo_input.class_input_set( group_data.order.map(