bulma_form_rails 0.9.1 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/bulma_form_rails.iml +10 -10
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/doc/BulmaFormRails/{Helpers.html → FieldHelpers.html} +15 -242
- data/doc/BulmaFormRails/FormPageHelpers.html +172 -0
- data/doc/BulmaFormRails/HeaderAndFooterHelpers.html +178 -0
- data/doc/BulmaFormRails/MessageBoxHelpers.html +159 -0
- data/doc/BulmaFormRails/SubformHelpers.html +168 -0
- data/doc/BulmaFormRails.html +2 -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 +4 -1
- data/lib/bulma_form_rails/form_page_helpers.rb +3 -8
- data/lib/bulma_form_rails/header_and_footer_helpers.rb +3 -3
- data/lib/bulma_form_rails/message_box_helpers.rb +3 -3
- data/lib/bulma_form_rails/subform_helpers.rb +3 -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: e342535404707ecefeee46908295f6a06e31c6adefc865b211964525ac1190eb
|
4
|
+
data.tar.gz: 3cbdfe9be4a70262bd46ac8e09b69508ab7b2f5fe63999c64b72c38be68b7482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0cf4dd9cd34cd25ef4f3427863d8e512514eaba9b45ccfb0199624404a8ac6b88224cb109a27a7ba62d5d0767768af33dcfc7bf0299fbf59de9adc976baabb2
|
7
|
+
data.tar.gz: 3a78e7a49b4df1406ee2278c0ab60daf47c99613c64d5eeb1eebac6f4e9187339f504194680f67ba1953055fa2e80aa162a9cdc2a3daae9cd835530562a1fe32
|
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
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
![Modern geoSystems logo](https://github.com/modgeosys/bulma_form_rails/blob/8fde36bf59e86254cfe9e792f395caba6f60a2a4/doc/images/moderngeosystems_logo.png?raw=true)
|
2
|
+
|
3
|
+
https://moderngeosystems.com
|
2
4
|
# bulma_form_rails
|
3
5
|
`bulma_form_rails` provides Rails helpers for efficiently building forms using the Bulma CSS library.
|
4
6
|
|
@@ -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,31 @@
|
|
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
|
92
|
+
<p><a href="https://moderngeosystems.com">moderngeosystems.com</a></p>
|
93
|
+
|
94
|
+
<p>This Ruby on Rails Helper module allows easy and efficient web form construction with labeled fields of different types.</p>
|
100
95
|
|
101
96
|
</section>
|
102
97
|
|
@@ -143,7 +138,7 @@
|
|
143
138
|
</li></ul>
|
144
139
|
|
145
140
|
<div class="method-source-code" id="bulma_check_box-source">
|
146
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
141
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 84</span>
|
147
142
|
<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
143
|
<span class="ruby-comment"># Prepare parameters.</span>
|
149
144
|
<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 +153,6 @@
|
|
158
153
|
</div>
|
159
154
|
|
160
155
|
|
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
156
|
</div>
|
217
157
|
|
218
158
|
<div id="method-i-bulma_custom_field" class="method-detail ">
|
@@ -238,7 +178,7 @@
|
|
238
178
|
</li></ul>
|
239
179
|
|
240
180
|
<div class="method-source-code" id="bulma_custom_field-source">
|
241
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
181
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 21</span>
|
242
182
|
<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
183
|
<span class="ruby-comment"># Prepare parameters.</span>
|
244
184
|
<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 +219,7 @@
|
|
279
219
|
</li></ul>
|
280
220
|
|
281
221
|
<div class="method-source-code" id="bulma_datetime_select-source">
|
282
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
222
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 139</span>
|
283
223
|
<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
224
|
<span class="ruby-comment"># Prepare parameters.</span>
|
285
225
|
<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 +234,6 @@
|
|
294
234
|
</div>
|
295
235
|
|
296
236
|
|
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
237
|
</div>
|
392
238
|
|
393
239
|
<div id="method-i-bulma_input" class="method-detail ">
|
@@ -415,7 +261,7 @@
|
|
415
261
|
</li></ul>
|
416
262
|
|
417
263
|
<div class="method-source-code" id="bulma_input-source">
|
418
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
264
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 41</span>
|
419
265
|
<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
266
|
<span class="ruby-comment"># Convert type to form method.</span>
|
421
267
|
<span class="ruby-identifier">type</span> = <span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_s</span>
|
@@ -437,55 +283,6 @@
|
|
437
283
|
</div>
|
438
284
|
|
439
285
|
|
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
286
|
</div>
|
490
287
|
|
491
288
|
<div id="method-i-bulma_radio_group" class="method-detail ">
|
@@ -513,7 +310,7 @@
|
|
513
310
|
</li></ul>
|
514
311
|
|
515
312
|
<div class="method-source-code" id="bulma_radio_group-source">
|
516
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
313
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 102</span>
|
517
314
|
<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
315
|
<span class="ruby-comment"># Prepare parameters.</span>
|
519
316
|
<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 +354,7 @@
|
|
557
354
|
</li></ul>
|
558
355
|
|
559
356
|
<div class="method-source-code" id="bulma_select-source">
|
560
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
357
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 121</span>
|
561
358
|
<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
359
|
<span class="ruby-comment"># Prepare parameters.</span>
|
563
360
|
<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 +398,7 @@
|
|
601
398
|
</li></ul>
|
602
399
|
|
603
400
|
<div class="method-source-code" id="bulma_text_area-source">
|
604
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
401
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 67</span>
|
605
402
|
<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
403
|
<span class="ruby-comment"># Prepare parameters.</span>
|
607
404
|
<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 +440,7 @@
|
|
643
440
|
</li></ul>
|
644
441
|
|
645
442
|
<div class="method-source-code" id="bulma_time_select-source">
|
646
|
-
<pre><span class="ruby-comment"># File lib/bulma_form_rails/
|
443
|
+
<pre><span class="ruby-comment"># File lib/bulma_form_rails/field_helpers.rb, line 157</span>
|
647
444
|
<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
445
|
<span class="ruby-comment"># Prepare parameters.</span>
|
649
446
|
<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 +457,6 @@
|
|
660
457
|
|
661
458
|
</div>
|
662
459
|
|
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
460
|
</section>
|
688
461
|
|
689
462
|
</section>
|