glib-web 4.44.2 → 4.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/glib/json_ui/view_builder/fields.rb +11 -0
- data/app/views/json_ui/garage/test_page/_header.json.jbuilder +2 -0
- data/app/views/json_ui/garage/test_page/fields_captcha.json.jbuilder +57 -0
- data/app/views/json_ui/garage/test_page/fields_url_fragment.json.jbuilder +57 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac13a479857fd72d51190659b4f9a8e6442840bcb5fb520eee655ea6809301d8
|
|
4
|
+
data.tar.gz: a17e25ee78ec83afa0ec95b0ddc3a80d1b6363e2d38737b6d99b671e127d78d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5fbfb6676e34e686462955e5efa163ba68b674a01dfa60ec56d6dabb7576a944a1570f0ac41dfecdc404e4bfd49025bd4974444a4a52e52172b77424dd81dbf
|
|
7
|
+
data.tar.gz: 35a49867e493a4136c3661aa39f0fe41bb96ce8d19264cd110e4af4a58569088abf49bebc0213e5a80c350928c95848f1df661593f8e8059d34d09a59628bff5
|
|
@@ -1137,6 +1137,17 @@ class Glib::JsonUi::ViewBuilder
|
|
|
1137
1137
|
# size: 35
|
|
1138
1138
|
#
|
|
1139
1139
|
# @see app/views/json_ui/garage/forms/ratings.json.jbuilder Garage example
|
|
1140
|
+
class Captcha < AbstractField
|
|
1141
|
+
string :siteKey
|
|
1142
|
+
action :onSolve
|
|
1143
|
+
|
|
1144
|
+
def created
|
|
1145
|
+
@label = ''
|
|
1146
|
+
@placeholder = ''
|
|
1147
|
+
super
|
|
1148
|
+
end
|
|
1149
|
+
end
|
|
1150
|
+
|
|
1140
1151
|
class Rating < AbstractField
|
|
1141
1152
|
# Allows selecting half-star values (e.g., 3.5 stars).
|
|
1142
1153
|
bool :halfIncrements
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
json.title 'Test Page (Fields Captcha)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body(
|
|
6
|
+
childViews: ->(body) do
|
|
7
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
8
|
+
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.panels_form(
|
|
13
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
14
|
+
method: 'post',
|
|
15
|
+
childViews: ->(form) do
|
|
16
|
+
form.h2 text: 'Overview'
|
|
17
|
+
form.label text: 'reCAPTCHA Enterprise field that auto-verifies and populates a token.'
|
|
18
|
+
form.spacer height: 12
|
|
19
|
+
form.hr width: 'matchParent'
|
|
20
|
+
form.spacer height: 12
|
|
21
|
+
|
|
22
|
+
form.h2 text: 'Basic example'
|
|
23
|
+
form.spacer height: 8
|
|
24
|
+
form.fields_captcha \
|
|
25
|
+
id: 'captcha_main',
|
|
26
|
+
name: 'user[captcha_token]',
|
|
27
|
+
siteKey: 'test-site-key',
|
|
28
|
+
onSolve: ->(action) do
|
|
29
|
+
action.logics_set targetId: 'captcha_status', data: { text: 'Status: solved' }
|
|
30
|
+
end
|
|
31
|
+
form.spacer height: 8
|
|
32
|
+
form.label id: 'captcha_status', text: 'Status: waiting'
|
|
33
|
+
|
|
34
|
+
form.spacer height: 12
|
|
35
|
+
form.hr width: 'matchParent'
|
|
36
|
+
form.spacer height: 12
|
|
37
|
+
|
|
38
|
+
form.h2 text: 'Actions/events'
|
|
39
|
+
form.spacer height: 8
|
|
40
|
+
form.panels_flow(
|
|
41
|
+
innerPadding: { bottom: 0 },
|
|
42
|
+
width: 'matchParent',
|
|
43
|
+
childViews: ->(flow) do
|
|
44
|
+
flow.button(
|
|
45
|
+
text: 'Submit form',
|
|
46
|
+
onClick: ->(action) do
|
|
47
|
+
action.forms_submit
|
|
48
|
+
end
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
json.title 'Test Page (Fields URL Fragment)'
|
|
2
|
+
|
|
3
|
+
page = json_ui_page json
|
|
4
|
+
|
|
5
|
+
page.body(
|
|
6
|
+
childViews: ->(body) do
|
|
7
|
+
render 'json_ui/garage/test_page/header', view: body
|
|
8
|
+
|
|
9
|
+
body.panels_responsive(
|
|
10
|
+
padding: glib_json_padding_body,
|
|
11
|
+
childViews: ->(res) do
|
|
12
|
+
res.panels_form(
|
|
13
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
14
|
+
method: 'post',
|
|
15
|
+
childViews: ->(form) do
|
|
16
|
+
form.h2 text: 'Overview'
|
|
17
|
+
form.label text: 'Captures the URL fragment (hash) and populates it as a hidden field value.'
|
|
18
|
+
form.spacer height: 12
|
|
19
|
+
form.hr width: 'matchParent'
|
|
20
|
+
form.spacer height: 12
|
|
21
|
+
|
|
22
|
+
form.h2 text: 'Basic example'
|
|
23
|
+
form.spacer height: 8
|
|
24
|
+
form.label text: 'The hidden field below captures the URL hash. Add #something to the URL to test.'
|
|
25
|
+
form.spacer height: 8
|
|
26
|
+
form.fields_urlFragment \
|
|
27
|
+
name: 'user[fragment]',
|
|
28
|
+
onResolveValue: ->(action) do
|
|
29
|
+
action.logics_set targetId: 'fragment_status', data: { text: 'Status: resolved' }
|
|
30
|
+
end
|
|
31
|
+
form.spacer height: 8
|
|
32
|
+
form.label id: 'fragment_status', text: 'Status: waiting'
|
|
33
|
+
|
|
34
|
+
form.spacer height: 12
|
|
35
|
+
form.hr width: 'matchParent'
|
|
36
|
+
form.spacer height: 12
|
|
37
|
+
|
|
38
|
+
form.h2 text: 'Actions/events'
|
|
39
|
+
form.spacer height: 8
|
|
40
|
+
form.panels_flow(
|
|
41
|
+
innerPadding: { bottom: 0 },
|
|
42
|
+
width: 'matchParent',
|
|
43
|
+
childViews: ->(flow) do
|
|
44
|
+
flow.button(
|
|
45
|
+
text: 'Submit form',
|
|
46
|
+
onClick: ->(action) do
|
|
47
|
+
action.forms_submit
|
|
48
|
+
end
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glib-web
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.44.
|
|
4
|
+
version: 4.44.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -388,11 +388,13 @@ files:
|
|
|
388
388
|
- app/views/json_ui/garage/test_page/dialog_open.json.jbuilder
|
|
389
389
|
- app/views/json_ui/garage/test_page/dirty_state.json.jbuilder
|
|
390
390
|
- app/views/json_ui/garage/test_page/fields.json.jbuilder
|
|
391
|
+
- app/views/json_ui/garage/test_page/fields_captcha.json.jbuilder
|
|
391
392
|
- app/views/json_ui/garage/test_page/fields_dynamicSelect.json.jbuilder
|
|
392
393
|
- app/views/json_ui/garage/test_page/fields_select.json.jbuilder
|
|
393
394
|
- app/views/json_ui/garage/test_page/fields_sign.json.jbuilder
|
|
394
395
|
- app/views/json_ui/garage/test_page/fields_timer.json.jbuilder
|
|
395
396
|
- app/views/json_ui/garage/test_page/fields_upload.json.jbuilder
|
|
397
|
+
- app/views/json_ui/garage/test_page/fields_url_fragment.json.jbuilder
|
|
396
398
|
- app/views/json_ui/garage/test_page/flow.json.jbuilder
|
|
397
399
|
- app/views/json_ui/garage/test_page/form.json.jbuilder
|
|
398
400
|
- app/views/json_ui/garage/test_page/form_dynamic.json.jbuilder
|