vertform 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12fff43d0e32c9a2a82b0c98102815f18de4a3d9
4
- data.tar.gz: d315ff44cccf88e20177758666f9c14a4b9cf947
3
+ metadata.gz: 0db790126112c8e2b409c8ab017de5e1961670fb
4
+ data.tar.gz: d785537843b5a79bab39a8c781a98093bfa58fe1
5
5
  SHA512:
6
- metadata.gz: a0c8fe9098e7c87d3796515bee3eaf04a90e23e548788b7a01fabca422116682f5505cf67307f95d0f2df48438d5bb9e42c56f3d2368da53ae38f940d9e3693c
7
- data.tar.gz: 873f1fd15e1f6bcdea2c940ae15fc9ef57a7d7cf3c59befbc49381972faeb52c2dd0164f7be07dd1b38330630aa76a55592457dd6aaebaaf0ec989d72dd9ff54
6
+ metadata.gz: e6c92c4b9f15cfef27db84617ee93ed021dc7b39cb0162dd1a06db9ec46f3adb7214ed6dd40cc8efd9b91fd994b2dc4ced3eabefb9412eff465629ccce03de11
7
+ data.tar.gz: f2723b2133f97f9a70dacada4f3634a681fcff7eed9baf8658a662b8b46c59543cebe3b03b6fdfa9347ae17e8bf58c91722502badb2047cdc5189bed399d87f1
@@ -1,6 +1,6 @@
1
1
  class VertForm
2
2
  #:nodoc:
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
 
6
6
  # Version 0.0.1
data/lib/vertform.rb CHANGED
@@ -1,16 +1,22 @@
1
1
 
2
2
 
3
3
  class VertForm
4
- attr_accessor :table_style, :label_stlye, :form_fields
4
+ attr_accessor :table_params, :label_params, :form_fields
5
5
 
6
6
  def initialize(form_fields = {})
7
- @table_style = {
7
+ @table_params = {
8
8
  "class" => "table"
9
9
  }
10
- @label_stlye = {
10
+ @td_label_params = {
11
+ "style" => "width: 32%;"
12
+ }
13
+ @label_params = {
11
14
  "class" => "pull-right",
12
15
  "style" => "margin-top: 4px;"
13
16
  }
17
+ @td_input_params = {
18
+ "style" => "width: 68%;"
19
+ }
14
20
  @form_fields = form_fields
15
21
  end
16
22
 
@@ -18,16 +24,20 @@ class VertForm
18
24
  out_string = ""
19
25
  out_string .
20
26
  concat "<table " .
21
- concat pair_json(@table_style) .
27
+ concat pair_json(@table_params) .
22
28
  concat ">\n"
23
29
  form_fields.each { |label,field|
24
30
  out_string .
25
- concat " <tr>\n <td>\n " .
31
+ concat " <tr>\n <td " .
32
+ concat pair_json(@td_label_params) .
33
+ concat ">\n " .
26
34
  concat "<span " .
27
- concat pair_json(@label_stlye) .
35
+ concat pair_json(@label_params) .
28
36
  concat ">\n " .
29
37
  concat(label) .
30
- concat "\n </span>\n </td>\n <td>\n <%= " .
38
+ concat "\n </span>\n </td>\n <td " .
39
+ concat pair_json(@td_input_params) .
40
+ concat ">\n <%= " .
31
41
  concat(field) .
32
42
  concat " %>\n </td>\n </tr>\n"
33
43
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vertform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark / 6ftDan(TM)