From c389c8fe66d6e163341bf6c98fb09ed5bce7e8df Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Tue, 24 Nov 2020 21:29:36 +0100 Subject: [PATCH] Change field-type into field-format in ui --- .../src/main/elm/Comp/CustomFieldForm.elm | 27 ++++++++++--------- .../src/main/elm/Comp/CustomFieldTable.elm | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm b/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm index 2945f054..d9ac3c61 100644 --- a/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm +++ b/modules/webapp/src/main/elm/Comp/CustomFieldForm.elm @@ -212,7 +212,8 @@ view viewSettings model = else div [] - [ text "Modify this custom field. Note that changing the type may result in data loss!" + [ text "Modify this custom field. Note that changing the format may " + , text "result in invisible values in the ui, if they don't comply to the new format!" ] , div [ classList @@ -241,6 +242,18 @@ view viewSettings model = , text "identifier, not contain spaces or weird characters." ] ] + , div [ class "required field" ] + [ label [] [ text "Field Format" ] + , Html.map FTypeMsg + (Comp.FixedDropdown.view + (Maybe.map mkItem model.ftype) + model.ftypeModel + ) + , div [ class "small-info" ] + [ text "A field must have a format. Values are validated " + , text "according to this format." + ] + ] , div [ class "field" ] [ label [] [ text "Label" ] , input @@ -256,18 +269,6 @@ view viewSettings model = , text "this field in the ui. If not present, the name is used." ] ] - , div [ class "required field" ] - [ label [] [ text "Field Type" ] - , Html.map FTypeMsg - (Comp.FixedDropdown.view - (Maybe.map mkItem model.ftype) - model.ftypeModel - ) - , div [ class "small-info" ] - [ text "A field must have a type. This defines how to input values and " - , text "the server validates it according to this type." - ] - ] ] ++ (if viewSettings.showControls then viewButtons model diff --git a/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm b/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm index a0e5ef92..2dc28534 100644 --- a/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm +++ b/modules/webapp/src/main/elm/Comp/CustomFieldTable.elm @@ -49,7 +49,7 @@ view _ items = [ tr [] [ th [ class "collapsing" ] [] , th [] [ text "Name/Label" ] - , th [] [ text "Type" ] + , th [] [ text "Format" ] , th [] [ text "#Usage" ] , th [] [ text "Created" ] ]