@@ -39,7 +39,49 @@ defmodule ValentineWeb.WorkspaceLive.FormComponent do
39
39
label: gettext ( "Name" )
40
40
}
41
41
}
42
- class = "mt-2 "
42
+ class = "my-2 "
43
+ is_full_width
44
+ is_form_control
45
+ />
46
+
47
+ < . select
48
+ form = { f }
49
+ name = "cloud_profile "
50
+ options = { [
51
+ [ key: gettext ( "None selected" ) , value: "None selected" ] ,
52
+ [ key: gettext ( "CCCS Low Profile for Cloud" ) , value: "CCCS Low Profile for Cloud" ] ,
53
+ [
54
+ key: gettext ( "CCCS Medium Profile for Cloud" ) ,
55
+ value: "CCCS Medium Profile for Cloud"
56
+ ]
57
+ ] }
58
+ selected = { @ changeset . changes [ :cloud_profile ] || @ workspace . cloud_profile }
59
+ is_form_control
60
+ />
61
+
62
+ < . select
63
+ form = { f }
64
+ name = "cloud_profile_type "
65
+ options = { [
66
+ [ key: gettext ( "None selected" ) , value: "None selected" ] ,
67
+ [ key: gettext ( "CSP Full Stack" ) , value: "CSP Full Stack" ] ,
68
+ [ key: gettext ( "CSP Stacked PaaS" ) , value: "CSP Stacked PaaS" ] ,
69
+ [ key: gettext ( "CSP Stacked SaaS" ) , value: "CSP Stacked SaaS" ] ,
70
+ [ key: gettext ( "Client IaaS / PaaS" ) , value: "Client IaaS / PaaS" ] ,
71
+ [ key: gettext ( "Client SaaS" ) , value: "Client SaaS" ]
72
+ ] }
73
+ selected = { @ changeset . changes [ :cloud_profile_type ] || @ workspace . cloud_profile_type }
74
+ is_form_control
75
+ />
76
+
77
+ < . text_input
78
+ form = { f }
79
+ field = { :url }
80
+ form_control = {
81
+ % {
82
+ label: gettext ( "URL" )
83
+ }
84
+ }
43
85
is_full_width
44
86
is_form_control
45
87
/>
@@ -66,7 +108,9 @@ defmodule ValentineWeb.WorkspaceLive.FormComponent do
66
108
67
109
@ impl true
68
110
def handle_event ( "validate" , % { "workspace" => workspace_params } , socket ) do
69
- changeset = Composer . change_workspace ( socket . assigns . workspace , workspace_params )
111
+ changeset =
112
+ Composer . change_workspace ( socket . assigns . workspace , workspace_params )
113
+
70
114
{ :noreply , assign ( socket , :changeset , changeset ) }
71
115
end
72
116
0 commit comments