Skip to content

Commit

Permalink
Merge pull request #1032 from ds-wizard/hotfix/4.1.1
Browse files Browse the repository at this point in the history
Hotfix 4.1.1
  • Loading branch information
janslifka committed Dec 18, 2023
2 parents 8220458 + 684acb0 commit 764d0f4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
6 changes: 6 additions & 0 deletions engine-wizard/elm/Wizard/Common/AppState.elm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Wizard.Common.AppState exposing
( AppState
, acceptCookies
, getClientUrlRoot
, getUserRole
, init
, isFullscreen
Expand Down Expand Up @@ -128,6 +129,11 @@ getUserRole =
Maybe.unwrap "" .role << .user << .config


getClientUrlRoot : AppState -> String
getClientUrlRoot appState =
String.replace "/wizard" "" appState.clientUrl


setCurrentTime : AppState -> Time.Posix -> AppState
setCurrentTime appState time =
{ appState | currentTime = time }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ update msg wrapMsg mbSetFullscreenMsg appState ctx model =
Routing.toUrl appState <|
Routes.projectsDetailQuestionnaire model.uuid (Just (String.join "." path))
in
( appState.seed, { model | recentlyCopied = True }, Copy.copyToClipboard (appState.clientUrl ++ route) )
( appState.seed, { model | recentlyCopied = True }, Copy.copyToClipboard (AppState.getClientUrlRoot appState ++ route) )

ClearRecentlyCopied ->
wrap { model | recentlyCopied = False }
Expand Down
27 changes: 19 additions & 8 deletions engine-wizard/elm/Wizard/Settings/Organization/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Wizard.Settings.Organization.View exposing (view)
import Form exposing (Form)
import Gettext exposing (gettext)
import Html exposing (Html, div)
import Shared.Data.BootstrapConfig.Admin as Admin
import Shared.Form.FormError exposing (FormError)
import Shared.Utils exposing (compose2)
import Wizard.Common.AppState exposing (AppState)
Expand Down Expand Up @@ -30,12 +31,22 @@ viewProps =

formView : AppState -> Form FormError OrganizationConfigForm -> Html Form.Msg
formView appState form =
let
affiliations =
if Admin.isEnabled appState.config.admin then
[]

else
[ FormGroup.resizableTextarea appState form "affiliations" (gettext "Affiliations" appState.locale)
, FormExtra.mdAfter (gettext "Affiliation options will be used to help users choose their affiliation while signing up or editing their profile. Write one affiliation option per line." appState.locale)
]
in
div []
[ FormGroup.input appState form "name" (gettext "Name" appState.locale)
, FormExtra.textAfter (gettext "Name of the organization running this instance." appState.locale)
, FormGroup.textarea appState form "description" (gettext "Description" appState.locale)
, FormGroup.input appState form "organizationId" (gettext "Organization ID" appState.locale)
, FormExtra.textAfter (gettext "Organization ID is used to identify Knowledge Models created in this instance. It can contain alphanumeric characters and dots but cannot start or end with a dot." appState.locale)
, FormGroup.resizableTextarea appState form "affiliations" (gettext "Affiliations" appState.locale)
, FormExtra.mdAfter (gettext "Affiliation options will be used to help users choose their affiliation while signing up or editing their profile. Write one affiliation option per line." appState.locale)
]
([ FormGroup.input appState form "name" (gettext "Name" appState.locale)
, FormExtra.textAfter (gettext "Name of the organization running this instance." appState.locale)
, FormGroup.textarea appState form "description" (gettext "Description" appState.locale)
, FormGroup.input appState form "organizationId" (gettext "Organization ID" appState.locale)
, FormExtra.textAfter (gettext "Organization ID is used to identify Knowledge Models created in this instance. It can contain alphanumeric characters and dots but cannot start or end with a dot." appState.locale)
]
++ affiliations
)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "engine-frontend",
"version": "4.1.0",
"version": "4.1.1",
"repository": "https://github.com/ds-wizard/engine-frontend",
"license": "Apache-2.0",
"scripts": {
Expand Down

0 comments on commit 764d0f4

Please sign in to comment.