motion-form 0.3.1 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 919547db55760a38adbc40d07c1a4f0776b1b14c
4
- data.tar.gz: e7813d726dde65c92ace9fb43c72498c2efdad9b
3
+ metadata.gz: ba1907aa4c09a83695a9b0a92c24dca85e46f35f
4
+ data.tar.gz: 0242c8d48deb053b54178ec5c38ccc2985f4642e
5
5
  SHA512:
6
- metadata.gz: 152fab1a7e307823a4345051bf33602651f873d424691097246c2d7e01a50db10a2389a6a751567711680009c7721c5e1fd6213c9f912205e39618cbd8ac3067
7
- data.tar.gz: 7ecd51b84b32927c75586008a87dbfc636b7d8f83c90ac9c3478795f7144f9adf4550df92cffbfbd1085635f040adf1a4f349bfc3d1268de3b864f20ba574c05
6
+ metadata.gz: 264b0177a1c541eaa1f478afdc979df956867fabb99a323cf9453b31fc273cecc26688e35bce9b5f5f73859a5c859f196bf2926c340f2a5a5b0fdd7016a50c1c
7
+ data.tar.gz: 8357c057a4be201fae2ccc34988a940f05d49cb512ce4fd6616e3540b4b455c793bf9d150c0219a89f7411366636d08cb459649f5b1714d045f53a7817d4157f
data/README.md CHANGED
@@ -27,7 +27,7 @@ form = MotionForm.form_for(view) do |form|
27
27
  section.input :pinterest, icon: :pinterest
28
28
  section.input :twitter, icon: :twitter
29
29
  section.input :website, icon: :website
30
- section.text :bio, icon: :info
30
+ section.text :bio, icon: :info
31
31
 
32
32
  section.button :submit, action: submit
33
33
  end
@@ -102,6 +102,12 @@ class TextFieldCell < BaseCell
102
102
  end
103
103
  end
104
104
 
105
+ def capitalize=(bool)
106
+ option = bool ? UITextAutocapitalizationTypeSentences : UITextAutocapitalizationTypeNone
107
+
108
+ text_view.autocapitalizationType = option
109
+ end
110
+
105
111
  def notification_payload
106
112
  { key: key, value: value, text_field: text_view }
107
113
  end
@@ -80,6 +80,12 @@ class TextInputCell < BaseCell
80
80
  true
81
81
  end
82
82
 
83
+ def capitalize=(bool)
84
+ option = bool ? UITextAutocapitalizationTypeSentences : UITextAutocapitalizationTypeNone
85
+
86
+ text_field.autocapitalizationType = option
87
+ end
88
+
83
89
  def notification_payload
84
90
  { key: key, value: value, text_field: text_field }
85
91
  end
@@ -60,8 +60,13 @@ class TextInputRow < BaseRow
60
60
  def update_cell(cell)
61
61
  super
62
62
 
63
- cell.secure = options[:secure]
64
- cell.value = options[:value]
63
+ cell.secure = options[:secure]
64
+ cell.value = options[:value]
65
+ cell.capitalize = capitalize?
66
+ end
67
+
68
+ def capitalize?
69
+ options[:capitalize] || !(options[:email] || options[:secure])
65
70
  end
66
71
 
67
72
  def cell_type
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Blandin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-15 00:00:00.000000000 Z
11
+ date: 2014-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-keyboard-avoiding