File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
resources/views/livewire/project/service Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,15 @@ public function mount()
34
34
$ value = data_get ($ field , 'value ' );
35
35
$ rules = data_get ($ field , 'rules ' , 'nullable ' );
36
36
$ isPassword = data_get ($ field , 'isPassword ' , false );
37
+ $ customHelper = data_get ($ field , 'customHelper ' , false );
37
38
$ this ->fields ->put ($ key , [
38
39
'serviceName ' => $ serviceName ,
39
40
'key ' => $ key ,
40
41
'name ' => $ fieldKey ,
41
42
'value ' => $ value ,
42
43
'isPassword ' => $ isPassword ,
43
44
'rules ' => $ rules ,
45
+ 'customHelper ' => $ customHelper ,
44
46
]);
45
47
46
48
$ this ->rules ["fields. $ key.value " ] = $ rules ;
Original file line number Diff line number Diff line change @@ -288,6 +288,21 @@ public function extraFields()
288
288
continue ;
289
289
}
290
290
switch ($ image ) {
291
+ case $ image ->contains ('castopod ' ):
292
+ $ data = collect ([]);
293
+ $ disable_https = $ this ->environment_variables ()->where ('key ' , 'CP_DISABLE_HTTPS ' )->first ();
294
+ if ($ disable_https ) {
295
+ $ data = $ data ->merge ([
296
+ 'Disable HTTPS ' => [
297
+ 'key ' => 'CP_DISABLE_HTTPS ' ,
298
+ 'value ' => data_get ($ disable_https , 'value ' ),
299
+ 'rules ' => 'required ' ,
300
+ 'customHelper ' => "If you want to use https, set this to 0. Variable name: CP_DISABLE_HTTPS " ,
301
+ ],
302
+ ]);
303
+ }
304
+ $ fields ->put ('Castopod ' , $ data ->toArray ());
305
+ break ;
291
306
case $ image ->contains ('label-studio ' ):
292
307
$ data = collect ([]);
293
308
$ username = $ this ->environment_variables ()->where ('key ' , 'LABEL_STUDIO_USERNAME ' )->first ();
@@ -1093,6 +1108,7 @@ public function saveExtraFields($fields)
1093
1108
foreach ($ fields as $ field ) {
1094
1109
$ key = data_get ($ field , 'key ' );
1095
1110
$ value = data_get ($ field , 'value ' );
1111
+ ray ($ key , $ value );
1096
1112
$ found = $ this ->environment_variables ()->where ('key ' , $ key )->first ();
1097
1113
if ($ found ) {
1098
1114
$ found ->value = $ value ;
Original file line number Diff line number Diff line change 24
24
<div class =" grid grid-cols-2 gap-2" >
25
25
@foreach ($fields as $serviceName => $field )
26
26
<div class =" flex items-center gap-2" ><span
27
- class =" font-bold" >{{ data_get ($field , ' serviceName' ) } } </span >{{ data_get ($field , ' name' ) } } <x-helper
28
- helper =" Variable name: {{ $serviceName } }" /></div >
27
+ class =" font-bold" >{{ data_get ($field , ' serviceName' ) } } </span >{{ data_get ($field , ' name' ) } }
28
+ @if (data_get ($field , ' customHelper' ) )
29
+ <x-helper helper =" {{ data_get ($field , ' customHelper' ) } }" />
30
+ @else
31
+ <x-helper helper =" Variable name: {{ $serviceName } }" />
32
+ @endif
33
+ </div >
29
34
<x-forms .input type =" {{ data_get ($field , ' isPassword' ) ? ' password' : ' text' } }"
30
35
required =" {{ str (data_get ($field , ' rules' ))?-> contains (' required' ) } }"
31
36
id =" fields.{{ $serviceName } } .value" ></x-forms .input >
You can’t perform that action at this time.
0 commit comments