platformx 0.0.8.8 → 0.0.8.9

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: c8e7b124527ea631b3fb583ffd53e00d16d616bf
4
- data.tar.gz: e4010229a611597ae3d185a3336a4f16bd0239b4
3
+ metadata.gz: b08fcc1ee6d0d62b6721b0e8876139255a0803c5
4
+ data.tar.gz: 67ffce324e4c8bdcacb277b663650da5730fe2ae
5
5
  SHA512:
6
- metadata.gz: a514def6c7ce506a6a25eb2f01afbb169d8d17c46a02d8d02397a4bbe1ae2c7b4f48eef85973f47147e1b55aa0585748e41e61b5b04d0fd55b76a1b70e6ace8f
7
- data.tar.gz: c554c7d9cd9a9f5cbfe15cc628c690664a17724ea73f7f3e48441d40de4d83202893be87e8aeec1f7e07bde2bba05fae855c66976e27fddf75bdd4a7257a75aa
6
+ metadata.gz: 69c7b607d77bc1e587750ee39318de63fd9390a863e82a18333cd5820bd729fa9756da64aac76cdb4722c17cdc319238055004b66a051956c0f9a473b2245091
7
+ data.tar.gz: f26f72821fa5872c8203ad8b3bfce9961f1f44d2b2e95e05b7656b2b33dbc2092dc340d0a8abfa828bed305ffb87d287cc573aa6c05dd548d9c65a4d1dc7c4a3
@@ -483,6 +483,50 @@ EOS
483
483
  return tb
484
484
  end
485
485
 
486
+ # EIN input helper
487
+ # @param id [String] ein input id
488
+ # @param name [String] ein input name
489
+ # @param value [String] ein input value
490
+ # @param label [String] ein input label
491
+ # @param required [Boolean] if required or not
492
+ # @param placeholder [String] ein input placeholder text
493
+ # @param mask [String] ein input mask
494
+ # @param maxlength [String] nuber input max length
495
+ # @return [String] compiled html of ein input
496
+ def x_ein(id: "", name: "", value: "", label: "", required: false, placeholder: "", mask: "99-9999999", maxlength: "10")
497
+
498
+ if required
499
+ if label != ""
500
+ required_output = '<sup class="text-danger">*</sup>'
501
+ else
502
+ required_output = ''
503
+ end
504
+ required_tag = 'required="required"'
505
+ else
506
+ required_output = ""
507
+ required_tag = ""
508
+ end
509
+
510
+ if label != ""
511
+ label = "<label>#{label}#{required_output}</label>"
512
+ end
513
+
514
+ if mask != ""
515
+ mask = "data-masked-input='#{mask}'"
516
+ end
517
+
518
+ if maxlength != ""
519
+ maxlength = "maxlength='#{maxlength}'"
520
+ end
521
+
522
+ tb = <<EOS
523
+ <div class="form-group">
524
+ #{label}
525
+ <input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} #{maxlength} />
526
+ </div>
527
+ EOS
528
+ return tb
529
+ end
486
530
 
487
531
  # Zip input helper
488
532
  # @param id [String] zip input id
@@ -1,3 +1,3 @@
1
1
  module Platformx
2
- VERSION = "0.0.8.8"
2
+ VERSION = "0.0.8.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platformx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.8
4
+ version: 0.0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - timmushen