platformx 0.0.8.5 → 0.0.8.6

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: 70d83812a435628748e05280473295b7e5feb8e1
4
- data.tar.gz: ac1bf08817bd6f69e9c9413c3dd669da98603cc6
3
+ metadata.gz: 70f80a17839d323151215df9d59918a47bee1c0b
4
+ data.tar.gz: 2f243f9f6b8807631c4b7c08e400305d8cfa20d4
5
5
  SHA512:
6
- metadata.gz: 23ddcb22a29aa52448dd6f37333838defd891da174130ac8860a4057bacf3d36cfca2b59be207bd0ba53e83bb8555a6035082a2c7a27850b73c9d6e21c308462
7
- data.tar.gz: 5b79133b4200e52f8504f1c9870b83e60028c70b6e73675b909b8d2c3d9c94e9cd4ff4c97c26fdee2610f998ae0dcfc952ea14a0fca22eb367833de714fca883
6
+ metadata.gz: e1bd9b4ee229ac6776ca16bb15a998e55f2c51133da3863c87f6c01b6b31d7873d9393cac16bc71d3762115b89c09fb531d9bbf8015bc6724bcc14cbf0834e49
7
+ data.tar.gz: 4d52a9f5352a8b07fd2973d9a990f3cff9ae7a3a7fa3c31edc6e7ee1f7e9b7ae5ba8f7af5b132b1ed64d39c378b7888e6d24dbb1eac84dafb2d4d7ff8f8b2d12
@@ -295,6 +295,56 @@ EOS
295
295
  return tb
296
296
  end
297
297
 
298
+ # Sq Ft input helper
299
+ # @param id [String] percentage input id
300
+ # @param name [String] percentage input name
301
+ # @param value [String] percentage input value
302
+ # @param label [String] percentage input label
303
+ # @param required [Boolean] if percentage input is required
304
+ # @param placeholder [String] percentage input placeholder
305
+ # @param mask [String] percentage input mask
306
+ # @param maxlength [String] percentage input maxlength
307
+ def x_sqft(id: "", name: "", value: "", label: "", required: false, placeholder: "", mask: "", maxlength: "")
308
+
309
+ id = name unless id != ""
310
+ if required
311
+ if label != ""
312
+ required_output = '<sup class="text-danger">*</sup>'
313
+ else
314
+ required_output = ''
315
+ end
316
+ required_tag = 'required="required"'
317
+ else
318
+ required_output = ""
319
+ required_tag = ""
320
+ end
321
+
322
+ if label != ""
323
+ label = "<label>#{label}</label>"
324
+ end
325
+
326
+ if maxlength != ""
327
+ maxlength = "maxlength='#{maxlength}'"
328
+ end
329
+
330
+ if mask != ""
331
+ mask = "data-masked-input='#{mask}'"
332
+ end
333
+
334
+ tb = <<EOS
335
+ <div class="form-group">
336
+ #{label}#{required_output}
337
+ <div class="input-group">
338
+ <input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" placeholder="#{placeholder}" data-parsley-type="number" #{required_tag} #{mask} #{maxlength} />
339
+ <span class="input-group-addon">ft<sup>2</sup></span>
340
+ </div>
341
+ </div>
342
+ EOS
343
+
344
+ return tb
345
+ end
346
+
347
+
298
348
  # Number input helper
299
349
  # @param id [String] number input id
300
350
  # @param name [String] number input name
@@ -1,3 +1,3 @@
1
1
  module Platformx
2
- VERSION = "0.0.8.5"
2
+ VERSION = "0.0.8.6"
3
3
  end
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.5
4
+ version: 0.0.8.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-04-11 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler