platformx 0.0.8.9.5 → 0.0.8.9.6
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/lib/platformx/form.rb +7 -6
- data/lib/platformx/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2c3776d8a65465fe2b29b24ee0e02b7bf1b8b86
|
4
|
+
data.tar.gz: 187168bfa7f72b5b2344db86a4783ef712ec4b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd099e7e298cd6e81130e7bb476102dcd6cfdd643f390ad86534de9468821bc6d08f885021aa18545b7c8d4b63a84a77ef41772f7c92b66bf78999dd7587b086
|
7
|
+
data.tar.gz: a3f14a1fde1492fe3cc32d8a19b60645abecc91a2baa5b81d8b499b8011006d1cbfb6d78c9dc92ece301f3907cb7561fe2dbe4dcaa7141c1f0df41100cfe865b
|
data/lib/platformx/form.rb
CHANGED
@@ -103,13 +103,14 @@ EOS
|
|
103
103
|
# @param inline [Boolean] if the radio is inline or not
|
104
104
|
# @param form_group [Boolean] if the radio is of form group
|
105
105
|
# @return [String] the compiled radio
|
106
|
-
def x_radio(id: "", name: "", value: "", label: "", checked: false, align: false, inline: false, form_group: true)
|
106
|
+
def x_radio(id: "", name: "", value: "", label: "", checked: false, align: false, inline: false, include_false_as_hidden: false ,form_group: true)
|
107
107
|
|
108
108
|
checked_output = ""
|
109
109
|
align_class = ""
|
110
110
|
inline_class = ""
|
111
111
|
form_group_start = ""
|
112
112
|
form_group_end = ""
|
113
|
+
include_false_as_hidden_element = ""
|
113
114
|
|
114
115
|
if checked == true then checked_output='checked="checked"' end
|
115
116
|
if align == "left" then align_class='pull-left' end
|
@@ -117,18 +118,18 @@ EOS
|
|
117
118
|
if inline == true then inline_class ='inline' end
|
118
119
|
if form_group == true then form_group_start = '<div class="form-group">' end
|
119
120
|
if form_group == true then form_group_end = '</div>' end
|
120
|
-
|
121
|
-
|
121
|
+
if include_false_as_hidden == true then include_false_as_hidden_element = '<input type="hidden" id="#{id}" name="post[#{name}]" value="0">' end
|
122
|
+
radio_btn = <<EOS
|
122
123
|
#{form_group_start}
|
123
124
|
<div class="radio">
|
124
125
|
<label class="#{align_class} #{inline_class}">
|
125
|
-
|
126
|
+
#{include_false_as_hidden}
|
126
127
|
<input type="radio" id="#{id}" name="post[#{name}]" value="1" #{checked_output} data-toggle="radio"/>
|
127
128
|
#{label} </label>
|
128
129
|
</div>
|
129
130
|
#{form_group_end}
|
130
131
|
EOS
|
131
|
-
return
|
132
|
+
return radio_btn
|
132
133
|
end
|
133
134
|
|
134
135
|
# Hidden input helper
|
@@ -567,7 +568,7 @@ EOS
|
|
567
568
|
tb = <<EOS
|
568
569
|
<div class="form-group">
|
569
570
|
#{label}
|
570
|
-
<input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} data-parsley-
|
571
|
+
<input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} minlength="5" data-parsley-minlegnth="5" maxlength="5" data-parsley-maxlength="5" data-parsley-length="[5,5]" />
|
571
572
|
</div>
|
572
573
|
EOS
|
573
574
|
return tb
|
data/lib/platformx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: platformx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.8.9.
|
4
|
+
version: 0.0.8.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- timmushen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -453,7 +453,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
453
453
|
version: '0'
|
454
454
|
requirements: []
|
455
455
|
rubyforge_project:
|
456
|
-
rubygems_version: 2.6.
|
456
|
+
rubygems_version: 2.6.12
|
457
457
|
signing_key:
|
458
458
|
specification_version: 4
|
459
459
|
summary: PlatformX Gem
|