bulma_form_rails 0.9.1 → 0.9.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/.idea/bulma_form_rails.iml +10 -10
- data/Gemfile.lock +1 -1
- data/doc/BulmaFormRails/{Helpers.html → FieldHelpers.html} +13 -242
- data/doc/BulmaFormRails/FormPageHelpers.html +170 -0
- data/doc/BulmaFormRails/HeaderAndFooterHelpers.html +176 -0
- data/doc/BulmaFormRails/MessageBoxHelpers.html +157 -0
- data/doc/BulmaFormRails/SubformHelpers.html +166 -0
- data/doc/created.rid +6 -2
- data/doc/index.html +5 -1
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/table_of_contents.html +43 -31
- data/lib/bulma_form_rails/field_helpers.rb +0 -2
- data/lib/bulma_form_rails/form_page_helpers.rb +1 -8
- data/lib/bulma_form_rails/header_and_footer_helpers.rb +1 -3
- data/lib/bulma_form_rails/message_box_helpers.rb +1 -2
- data/lib/bulma_form_rails/subform_helpers.rb +1 -3
- data/lib/bulma_form_rails/version.rb +1 -1
- data/package.json +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e2d849ceee48e5a9a9a8f5d0ce56e0e829a376bff03250d4f3dfc3d01b8d458
|
4
|
+
data.tar.gz: 49ea144f8a5d97456be0df009c7393286d0134934b562a27fee15567352fd994
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d24ddd00b54245511aae81845d490f56f24ef3689a428559e1fbe559a33e4ca2a9a3a3000dd817ff83e6b79ee3c8dba59ec71dcce415c77cf780fe9bf78ac17d
|
7
|
+
data.tar.gz: 11bcb55d3cce4a6a629f37e5f7462bd3c1bdaab952f9f6e9d50606fb9174e4567fdeb2de836b7d60c0aa0c1b4bfdea279b15c6cb59b893357caae1ac844a7541
|
data/.idea/bulma_form_rails.iml
CHANGED
@@ -11,30 +11,30 @@
|
|
11
11
|
</content>
|
12
12
|
<orderEntry type="jdk" jdkName="rbenv: 3.1.2" jdkType="RUBY_SDK" />
|
13
13
|
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="actioncable (v7.0.4, rbenv: 3.1.2
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="actioncable (v7.0.4, rbenv: 3.1.2) [gem]" level="application" />
|
15
15
|
<orderEntry type="library" scope="PROVIDED" name="actionmailbox (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
16
16
|
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="actionpack (v7.0.4, rbenv: 3.1.2
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="actionpack (v7.0.4, rbenv: 3.1.2) [gem]" level="application" />
|
18
18
|
<orderEntry type="library" scope="PROVIDED" name="actiontext (v7.0.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="actionview (v7.0.4, rbenv: 3.1.2
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="actionview (v7.0.4, rbenv: 3.1.2) [gem]" level="application" />
|
20
20
|
<orderEntry type="library" scope="PROVIDED" name="activejob (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
21
21
|
<orderEntry type="library" scope="PROVIDED" name="activemodel (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="activerecord (v7.0.4, rbenv: 3.1.2
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="activerecord (v7.0.4, rbenv: 3.1.2) [gem]" level="application" />
|
23
23
|
<orderEntry type="library" scope="PROVIDED" name="activestorage (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
24
24
|
<orderEntry type="library" scope="PROVIDED" name="activesupport (v7.0.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
25
25
|
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
26
26
|
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
27
27
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.13, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.10, rbenv: 3.1.2
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.10, rbenv: 3.1.2) [gem]" level="application" />
|
29
29
|
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
30
30
|
<orderEntry type="library" scope="PROVIDED" name="debug (v1.6.2, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
31
31
|
<orderEntry type="library" scope="PROVIDED" name="digest (v3.1.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
32
32
|
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.11.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
33
33
|
<orderEntry type="library" scope="PROVIDED" name="globalid (v1.0.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.12.0, rbenv: 3.1.2
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.12.0, rbenv: 3.1.2) [gem]" level="application" />
|
35
35
|
<orderEntry type="library" scope="PROVIDED" name="io-console (v0.5.11, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
36
36
|
<orderEntry type="library" scope="PROVIDED" name="irb (v1.4.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="jsbundling-rails (v1.0.3, rbenv: 3.1.2
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="jsbundling-rails (v1.0.3, rbenv: 3.1.2) [gem]" level="application" />
|
38
38
|
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.18.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
39
39
|
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
40
40
|
<orderEntry type="library" scope="PROVIDED" name="marcel (v1.0.2, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
@@ -44,8 +44,8 @@
|
|
44
44
|
<orderEntry type="library" scope="PROVIDED" name="net-imap (v0.2.3, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
45
45
|
<orderEntry type="library" scope="PROVIDED" name="net-pop (v0.1.1, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
46
46
|
<orderEntry type="library" scope="PROVIDED" name="net-protocol (v0.1.3, rbenv: 3.1.2, lgd2) [gem]" level="application" />
|
47
|
-
<orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.3.1, rbenv: 3.1.2
|
48
|
-
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.8, rbenv: 3.1.2
|
47
|
+
<orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.3.1, rbenv: 3.1.2) [gem]" level="application" />
|
48
|
+
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.8, rbenv: 3.1.2) [gem]" level="application" />
|
49
49
|
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.13.8, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
50
50
|
<orderEntry type="library" scope="PROVIDED" name="pagy (v5.10.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
51
51
|
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<orderEntry type="library" scope="PROVIDED" name="stimulus-rails (v1.1.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
67
67
|
<orderEntry type="library" scope="PROVIDED" name="stringio (v3.0.2, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
68
68
|
<orderEntry type="library" scope="PROVIDED" name="strscan (v3.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
69
|
-
<orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, rbenv: 3.1.2
|
69
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, rbenv: 3.1.2) [gem]" level="application" />
|
70
70
|
<orderEntry type="library" scope="PROVIDED" name="timeout (v0.3.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
|
71
71
|
<orderEntry type="library" scope="PROVIDED" name="turbo-rails (v1.1.1, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
72
72
|
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.5, rbenv: 3.1.2, bfr) [gem]" level="application" />
|
data/Gemfile.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module BulmaFormRails::
|
7
|
+
<title>module BulmaFormRails::FieldHelpers - RDoc Documentation</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
@@ -67,36 +67,29 @@
|
|
67
67
|
|
68
68
|
<ul class="link-list" role="directory">
|
69
69
|
<li ><a href="#method-i-bulma_check_box">#bulma_check_box</a>
|
70
|
-
<li ><a href="#method-i-bulma_child_objects">#bulma_child_objects</a>
|
71
70
|
<li ><a href="#method-i-bulma_custom_field">#bulma_custom_field</a>
|
72
71
|
<li ><a href="#method-i-bulma_datetime_select">#bulma_datetime_select</a>
|
73
|
-
<li ><a href="#method-i-bulma_edit_form_page">#bulma_edit_form_page</a>
|
74
|
-
<li ><a href="#method-i-bulma_form_footer">#bulma_form_footer</a>
|
75
|
-
<li ><a href="#method-i-bulma_index_header">#bulma_index_header</a>
|
76
72
|
<li ><a href="#method-i-bulma_input">#bulma_input</a>
|
77
|
-
<li ><a href="#method-i-bulma_message_box">#bulma_message_box</a>
|
78
|
-
<li ><a href="#method-i-bulma_new_form_page">#bulma_new_form_page</a>
|
79
73
|
<li ><a href="#method-i-bulma_radio_group">#bulma_radio_group</a>
|
80
74
|
<li ><a href="#method-i-bulma_select">#bulma_select</a>
|
81
75
|
<li ><a href="#method-i-bulma_text_area">#bulma_text_area</a>
|
82
76
|
<li ><a href="#method-i-bulma_time_select">#bulma_time_select</a>
|
83
|
-
<li ><a href="#method-i-bulma_validation_box">#bulma_validation_box</a>
|
84
77
|
</ul>
|
85
78
|
</div>
|
86
79
|
|
87
80
|
</div>
|
88
81
|
</nav>
|
89
82
|
|
90
|
-
<main role="main" aria-labelledby="module-BulmaFormRails::
|
91
|
-
<h1 id="module-BulmaFormRails::
|
92
|
-
module BulmaFormRails::
|
83
|
+
<main role="main" aria-labelledby="module-BulmaFormRails::FieldHelpers">
|
84
|
+
<h1 id="module-BulmaFormRails::FieldHelpers" class="module">
|
85
|
+
module BulmaFormRails::FieldHelpers
|
93
86
|
</h1>
|
94
87
|
|
95
88
|
<section class="description">
|
96
89
|
|
97
90
|
<p><img src="../images/moderngeosystems_logo.png"></p>
|
98
91
|
|
99
|
-
<p>This Ruby on Rails Helper module allows easy and efficient web form construction with labeled fields of different types
|
92
|
+
<p>This Ruby on Rails Helper module allows easy and efficient web form construction with labeled fields of different types.</p>
|
100
93
|
|
101
94
|
</section>
|
102
95
|
|
@@ -143,7 +136,7 @@
|
|
143
136
|
</li></ul>
|
144
137
|
|
145
138
|
<div class="method-source-code" id="bulma_check_box-source">
|
146
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
139
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 79</span>
|
147
140
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_check_box</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">options</span> = {})
|
148
141
|
<span class="ruby-comment"># Prepare parameters.</span>
|
149
142
|
<span class="ruby-identifier">prepare_value_class!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value">base_class:</span> <span class="ruby-string">'checkbox'</span>)
|
@@ -158,61 +151,6 @@
|
|
158
151
|
</div>
|
159
152
|
|
160
153
|
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<div id="method-i-bulma_child_objects" class="method-detail ">
|
164
|
-
<div class="method-heading">
|
165
|
-
<span class="method-name">bulma_child_objects</span><span
|
166
|
-
class="method-args">(collection, name, attributes_key, add_child_path, options = {})</span>
|
167
|
-
<span class="method-click-advice">click to toggle source</span>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
<div class="method-description">
|
171
|
-
<p>Renders a child objects collection management UI subform, including row addition and deletion buttons by default.</p>
|
172
|
-
<ul><li>
|
173
|
-
<p><code>collection</code> - an array of serializable objects</p>
|
174
|
-
</li><li>
|
175
|
-
<p><code>name</code> - the lower-case singular name of the object for display purposes</p>
|
176
|
-
</li><li>
|
177
|
-
<p><code>attributes_key</code> - a symbolic key into the attribute reference hash retrievable via the <code>lookup_attributes(key)</code> method defined on the controller as a <code>helper_method</code>, eg <code>:object</code> for:</p>
|
178
|
-
|
179
|
-
<pre class="ruby">{<span class="ruby-value">object:</span> [<span class="ruby-string">"attribute_1"</span>, <span class="ruby-string">"attribute_2"</span>]}
|
180
|
-
</pre>
|
181
|
-
</li><li>
|
182
|
-
<p><code>add_child_path</code> - the controller URL path for the action to add a child object to the collection</p>
|
183
|
-
</li><li>
|
184
|
-
<p><code>options</code> - a hash of additional options to pass to the partials</p>
|
185
|
-
<ul><li>
|
186
|
-
<p><code>system_controlled</code> - <code>true</code> if you want no row add or delete buttons, <code>false</code> or unspecified if you do want add and delete buttons</p>
|
187
|
-
</li><li>
|
188
|
-
<p><code>total_columns</code> - an array of integers representing column numbers requiring arithmetic totals at the bottom of the subform, eg:</p>
|
189
|
-
|
190
|
-
<pre class="ruby">[<span class="ruby-value">3</span>, <span class="ruby-value">4</span>]
|
191
|
-
</pre>
|
192
|
-
</li><li>
|
193
|
-
<p><code>container</code> - a string representing an array index expression for a row if not a single index, eg:</p>
|
194
|
-
|
195
|
-
<pre class="ruby"><span class="ruby-node">"[related_reservations][#{related_reservation_counter}]"</span>
|
196
|
-
</pre>
|
197
|
-
</li></ul>
|
198
|
-
</li></ul>
|
199
|
-
|
200
|
-
<p>To use this helper method, you will first need to do the following:</p>
|
201
|
-
<ol><li>
|
202
|
-
<p>Call <code>bulma_child_forms</code> from the specific controller (but outside any existing method definitions) for your view, passing in a hash of the object collections to be managed along with their attributes, for example, <code>{object1: %w[attr1 attr2], object2: %w[attr3 attr4]}</code>.</p>
|
203
|
-
</li><li>
|
204
|
-
<p>Add a route to the <code>add_child</code> action for the same controller, for example, <code>put 'users/add_child', to: 'users#add_child'</code>.</p>
|
205
|
-
</li></ol>
|
206
|
-
|
207
|
-
<div class="method-source-code" id="bulma_child_objects-source">
|
208
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 27</span>
|
209
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_child_objects</span>(<span class="ruby-identifier">collection</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">attributes_key</span>, <span class="ruby-identifier">add_child_path</span>, <span class="ruby-identifier">options</span> = {})
|
210
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/children'</span>, <span class="ruby-value">object:</span> <span class="ruby-identifier">collection</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">url:</span> <span class="ruby-identifier">add_child_path</span>, <span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">attributes_key:</span> <span class="ruby-identifier">attributes_key</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
|
211
|
-
<span class="ruby-keyword">end</span></pre>
|
212
|
-
</div>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
|
216
154
|
</div>
|
217
155
|
|
218
156
|
<div id="method-i-bulma_custom_field" class="method-detail ">
|
@@ -238,7 +176,7 @@
|
|
238
176
|
</li></ul>
|
239
177
|
|
240
178
|
<div class="method-source-code" id="bulma_custom_field-source">
|
241
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
179
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 16</span>
|
242
180
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_custom_field</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
243
181
|
<span class="ruby-comment"># Prepare parameters.</span>
|
244
182
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'No block given for custom field'</span>) <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">block_given?</span>
|
@@ -279,7 +217,7 @@
|
|
279
217
|
</li></ul>
|
280
218
|
|
281
219
|
<div class="method-source-code" id="bulma_datetime_select-source">
|
282
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
220
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 134</span>
|
283
221
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_datetime_select</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
|
284
222
|
<span class="ruby-comment"># Prepare parameters.</span>
|
285
223
|
<span class="ruby-identifier">prepare_value_class!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value">base_class:</span> <span class="ruby-string">'select is-fullwidth'</span>)
|
@@ -294,100 +232,6 @@
|
|
294
232
|
</div>
|
295
233
|
|
296
234
|
|
297
|
-
</div>
|
298
|
-
|
299
|
-
<div id="method-i-bulma_edit_form_page" class="method-detail ">
|
300
|
-
<div class="method-heading">
|
301
|
-
<span class="method-name">bulma_edit_form_page</span><span
|
302
|
-
class="method-args">(name, model, models_path, model_path)</span>
|
303
|
-
<span class="method-click-advice">click to toggle source</span>
|
304
|
-
</div>
|
305
|
-
|
306
|
-
<div class="method-description">
|
307
|
-
<p>Render a standard model edit form page.</p>
|
308
|
-
<ul><li>
|
309
|
-
<p><code>name</code> - a symbol representing the model name</p>
|
310
|
-
</li><li>
|
311
|
-
<p><code>model</code> - the model object</p>
|
312
|
-
</li><li>
|
313
|
-
<p><code>models_path</code> - the controller URL path for the action that renders the model collection</p>
|
314
|
-
</li><li>
|
315
|
-
<p><code>model_path</code> - the controller URL path for the action that renders this individual model</p>
|
316
|
-
</li></ul>
|
317
|
-
|
318
|
-
<div class="method-source-code" id="bulma_edit_form_page-source">
|
319
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 51</span>
|
320
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_edit_form_page</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">model</span>, <span class="ruby-identifier">models_path</span>, <span class="ruby-identifier">model_path</span>)
|
321
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/edit_form_page'</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">model:</span> <span class="ruby-identifier">model</span>, <span class="ruby-value">models_path:</span> <span class="ruby-identifier">models_path</span>, <span class="ruby-value">model_path:</span> <span class="ruby-identifier">model_path</span>}
|
322
|
-
<span class="ruby-keyword">end</span></pre>
|
323
|
-
</div>
|
324
|
-
</div>
|
325
|
-
|
326
|
-
|
327
|
-
</div>
|
328
|
-
|
329
|
-
<div id="method-i-bulma_form_footer" class="method-detail ">
|
330
|
-
<div class="method-heading">
|
331
|
-
<span class="method-name">bulma_form_footer</span><span
|
332
|
-
class="method-args">(form, models_path, options = {}, &block)</span>
|
333
|
-
<span class="method-click-advice">click to toggle source</span>
|
334
|
-
</div>
|
335
|
-
|
336
|
-
<div class="method-description">
|
337
|
-
<p>Render a standard model form page footer.</p>
|
338
|
-
<ul><li>
|
339
|
-
<p><code>form</code> - the form object</p>
|
340
|
-
</li><li>
|
341
|
-
<p><code>models_path</code> - the controller URL path for the action that renders the model collection</p>
|
342
|
-
</li><li>
|
343
|
-
<p><code>options</code> - a hash of additional options:</p>
|
344
|
-
<ul><li>
|
345
|
-
<p><code>exclude_submit_button</code> - don’t include a submit button if true</p>
|
346
|
-
</li></ul>
|
347
|
-
</li><li>
|
348
|
-
<p><code>block</code> - optional ERb to render any additional content for the footer, such as additional buttons</p>
|
349
|
-
</li></ul>
|
350
|
-
|
351
|
-
<div class="method-source-code" id="bulma_form_footer-source">
|
352
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 72</span>
|
353
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_form_footer</span>(<span class="ruby-identifier">form</span>, <span class="ruby-identifier">models_path</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
354
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
|
355
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">layout:</span> <span class="ruby-string">'bulma_form_rails/form_footer'</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">form:</span> <span class="ruby-identifier">form</span>, <span class="ruby-value">url:</span> <span class="ruby-identifier">models_path</span>, <span class="ruby-value">options:</span> <span class="ruby-identifier">options</span>}, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
356
|
-
<span class="ruby-keyword">else</span>
|
357
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/form_footer'</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">form:</span> <span class="ruby-identifier">form</span>, <span class="ruby-value">url:</span> <span class="ruby-identifier">models_path</span>, <span class="ruby-value">options:</span> <span class="ruby-identifier">options</span>}
|
358
|
-
<span class="ruby-keyword">end</span>
|
359
|
-
|
360
|
-
<span class="ruby-keyword">end</span></pre>
|
361
|
-
</div>
|
362
|
-
</div>
|
363
|
-
|
364
|
-
|
365
|
-
</div>
|
366
|
-
|
367
|
-
<div id="method-i-bulma_index_header" class="method-detail ">
|
368
|
-
<div class="method-heading">
|
369
|
-
<span class="method-name">bulma_index_header</span><span
|
370
|
-
class="method-args">(name, models_path)</span>
|
371
|
-
<span class="method-click-advice">click to toggle source</span>
|
372
|
-
</div>
|
373
|
-
|
374
|
-
<div class="method-description">
|
375
|
-
<p>Render the header for a standard index page. Automatically calls <code>bulma_message_box</code>.</p>
|
376
|
-
<ul><li>
|
377
|
-
<p><code>name</code> - a symbol representing the model name</p>
|
378
|
-
</li><li>
|
379
|
-
<p><code>models_path</code> - the controller URL path for the action that renders the model collection</p>
|
380
|
-
</li></ul>
|
381
|
-
|
382
|
-
<div class="method-source-code" id="bulma_index_header-source">
|
383
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 34</span>
|
384
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_index_header</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">models_path</span>)
|
385
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/index_header'</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">models_path:</span> <span class="ruby-identifier">models_path</span>}
|
386
|
-
<span class="ruby-keyword">end</span></pre>
|
387
|
-
</div>
|
388
|
-
</div>
|
389
|
-
|
390
|
-
|
391
235
|
</div>
|
392
236
|
|
393
237
|
<div id="method-i-bulma_input" class="method-detail ">
|
@@ -415,7 +259,7 @@
|
|
415
259
|
</li></ul>
|
416
260
|
|
417
261
|
<div class="method-source-code" id="bulma_input-source">
|
418
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
262
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 36</span>
|
419
263
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_input</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">type</span> = <span class="ruby-value">:text</span>, <span class="ruby-identifier">options</span> = {})
|
420
264
|
<span class="ruby-comment"># Convert type to form method.</span>
|
421
265
|
<span class="ruby-identifier">type</span> = <span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_s</span>
|
@@ -437,55 +281,6 @@
|
|
437
281
|
</div>
|
438
282
|
|
439
283
|
|
440
|
-
</div>
|
441
|
-
|
442
|
-
<div id="method-i-bulma_message_box" class="method-detail ">
|
443
|
-
<div class="method-heading">
|
444
|
-
<span class="method-name">bulma_message_box</span><span
|
445
|
-
class="method-args">()</span>
|
446
|
-
<span class="method-click-advice">click to toggle source</span>
|
447
|
-
</div>
|
448
|
-
|
449
|
-
<div class="method-description">
|
450
|
-
<p>Render a standard flash messages box. Automatically included with <code>bulma_validation_box</code> and <code>bulma_index_header</code> output.</p>
|
451
|
-
|
452
|
-
<div class="method-source-code" id="bulma_message_box-source">
|
453
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 56</span>
|
454
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_message_box</span>
|
455
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/message_box'</span>
|
456
|
-
<span class="ruby-keyword">end</span></pre>
|
457
|
-
</div>
|
458
|
-
</div>
|
459
|
-
|
460
|
-
|
461
|
-
</div>
|
462
|
-
|
463
|
-
<div id="method-i-bulma_new_form_page" class="method-detail ">
|
464
|
-
<div class="method-heading">
|
465
|
-
<span class="method-name">bulma_new_form_page</span><span
|
466
|
-
class="method-args">(name, model, models_path)</span>
|
467
|
-
<span class="method-click-advice">click to toggle source</span>
|
468
|
-
</div>
|
469
|
-
|
470
|
-
<div class="method-description">
|
471
|
-
<p>Render a standard model creation form page.</p>
|
472
|
-
<ul><li>
|
473
|
-
<p><code>name</code> - a symbol representing the model name</p>
|
474
|
-
</li><li>
|
475
|
-
<p><code>model</code> - the model object</p>
|
476
|
-
</li><li>
|
477
|
-
<p><code>models_path</code> - the controller URL path for the action that renders the model collection</p>
|
478
|
-
</li></ul>
|
479
|
-
|
480
|
-
<div class="method-source-code" id="bulma_new_form_page-source">
|
481
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 42</span>
|
482
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_new_form_page</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">model</span>, <span class="ruby-identifier">models_path</span>)
|
483
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/new_form_page'</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">model:</span> <span class="ruby-identifier">model</span>, <span class="ruby-value">models_path:</span> <span class="ruby-identifier">models_path</span>}
|
484
|
-
<span class="ruby-keyword">end</span></pre>
|
485
|
-
</div>
|
486
|
-
</div>
|
487
|
-
|
488
|
-
|
489
284
|
</div>
|
490
285
|
|
491
286
|
<div id="method-i-bulma_radio_group" class="method-detail ">
|
@@ -513,7 +308,7 @@
|
|
513
308
|
</li></ul>
|
514
309
|
|
515
310
|
<div class="method-source-code" id="bulma_radio_group-source">
|
516
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
311
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 97</span>
|
517
312
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_radio_group</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">choices</span>, <span class="ruby-identifier">options</span> = {})
|
518
313
|
<span class="ruby-comment"># Prepare parameters.</span>
|
519
314
|
<span class="ruby-identifier">prepare_value_class!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value">base_class:</span> <span class="ruby-string">'radio'</span>)
|
@@ -557,7 +352,7 @@
|
|
557
352
|
</li></ul>
|
558
353
|
|
559
354
|
<div class="method-source-code" id="bulma_select-source">
|
560
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
355
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 116</span>
|
561
356
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_select</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">choices</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
|
562
357
|
<span class="ruby-comment"># Prepare parameters.</span>
|
563
358
|
<span class="ruby-identifier">prepare_value_class!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value">base_class:</span> <span class="ruby-string">'select is-fullwidth'</span>)
|
@@ -601,7 +396,7 @@
|
|
601
396
|
</li></ul>
|
602
397
|
|
603
398
|
<div class="method-source-code" id="bulma_text_area-source">
|
604
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
399
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 62</span>
|
605
400
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_text_area</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">options</span> = {})
|
606
401
|
<span class="ruby-comment"># Prepare parameters.</span>
|
607
402
|
<span class="ruby-identifier">prepare_value_class!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value">base_class:</span> <span class="ruby-string">'textarea'</span>)
|
@@ -643,7 +438,7 @@
|
|
643
438
|
</li></ul>
|
644
439
|
|
645
440
|
<div class="method-source-code" id="bulma_time_select-source">
|
646
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
441
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 152</span>
|
647
442
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_time_select</span>(<span class="ruby-identifier">form_or_object</span>, <span class="ruby-identifier">field_name</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
|
648
443
|
<span class="ruby-comment"># Prepare parameters.</span>
|
649
444
|
<span class="ruby-identifier">prepare_value_class!</span>(<span class="ruby-identifier">options</span>, <span class="ruby-value">base_class:</span> <span class="ruby-string">'select is-fullwidth'</span>)
|
@@ -660,30 +455,6 @@
|
|
660
455
|
|
661
456
|
</div>
|
662
457
|
|
663
|
-
<div id="method-i-bulma_validation_box" class="method-detail ">
|
664
|
-
<div class="method-heading">
|
665
|
-
<span class="method-name">bulma_validation_box</span><span
|
666
|
-
class="method-args">(model)</span>
|
667
|
-
<span class="method-click-advice">click to toggle source</span>
|
668
|
-
</div>
|
669
|
-
|
670
|
-
<div class="method-description">
|
671
|
-
<p>Render a standard model validation messages box. Automatically calls <code>bulma_message_box</code>.</p>
|
672
|
-
<ul><li>
|
673
|
-
<p><code>model</code> - the model object</p>
|
674
|
-
</li></ul>
|
675
|
-
|
676
|
-
<div class="method-source-code" id="bulma_validation_box-source">
|
677
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/helpers.rb, line 62</span>
|
678
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bulma_validation_box</span>(<span class="ruby-identifier">model</span>)
|
679
|
-
<span class="ruby-identifier">render</span> <span class="ruby-value">partial:</span> <span class="ruby-string">'bulma_form_rails/validation_box'</span>, <span class="ruby-value">locals:</span> {<span class="ruby-value">model:</span> <span class="ruby-identifier">model</span>}
|
680
|
-
<span class="ruby-keyword">end</span></pre>
|
681
|
-
</div>
|
682
|
-
</div>
|
683
|
-
|
684
|
-
|
685
|
-
</div>
|
686
|
-
|
687
458
|
</section>
|
688
459
|
|
689
460
|
</section>
|