common_core_js 0.4.0 → 0.4.1

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
  SHA256:
3
- metadata.gz: 8699f24eede0a2539e630e702f2d7c4178469f7849230be39c45390fced41422
4
- data.tar.gz: 7f8ff26faefb13a84915a079d3626896cbaafaf49e130f6663cdae531e2ddc36
3
+ metadata.gz: 5b509c4f6a9d3e9948e5a49a3ea649cb693e75ac47ff43f40cc7bf90e3c96590
4
+ data.tar.gz: d8336db5c37a0db6d82cd7c926d9d6bd9f1b5cdd97c46e18d35ce30a0126dc77
5
5
  SHA512:
6
- metadata.gz: 9e7292726dd52a803b2b7d2fd68cf9381dbfb99fc899a24adc3cf01290ac8f41cf792906536e7a667e80ad94e8301760b1810088631ba0f5ecaeb8738f97a397
7
- data.tar.gz: 0c2f2cdfd04ea586fa5ab1a6adc2483a0efc72ae240ffd2761e187ca34b63dac80a21af661410892b6d80a5f8df86ee41906e460121a9594ce79f0d1d8ce05e1
6
+ metadata.gz: a49c509c20a0e82c30dbadd3ea700a8eb341e943f6d3347898d09ff3bd0ca29e656302265d9c02784ef0948e7a10bf9a1fd0e31b35dfec52704ea73325bfa30e
7
+ data.tar.gz: 2d882167e819535280cc20a4bb7ba47c3c35c2a179f4e2ac0170f36f8547a78b364d3cccb8a303a72b117ddc3ee4d06d4f0f08a17eb59b3009917035b4e0dbf8
@@ -1,3 +1,3 @@
1
1
  module CommonCoreJs
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
@@ -475,16 +475,27 @@ module CommonCore
475
475
  when :datetime
476
476
  ".row
477
477
  %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
478
- = datetime_field_localized(f, :#{col.to_s}, @#{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
478
+ = datetime_field_localized(f, :#{col.to_s}, #{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
479
479
  when :date
480
480
  ".row
481
481
  %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
482
- = date_field_localized(f, :#{col.to_s}, @#{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
482
+ = date_field_localized(f, :#{col.to_s}, #{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
483
483
  when :time
484
484
  ".row
485
485
  %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
486
- = time_field_localized(f, :#{col.to_s}, @#{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
486
+ = time_field_localized(f, :#{col.to_s}, #{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth ? @auth+'.timezone' : 'nil'})"
487
+ when :boolean
488
+ ".row
489
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
490
+ %span
491
+ #{col.to_s.humanize}
492
+ = f.radio_button(:#{col.to_s}, '0', checked: #{singular}.#{col.to_s} ? '' : 'checked')
493
+ = f.label(:#{col.to_s}, value: 'No', for: '#{singular}_#{col.to_s}_0')
494
+
495
+ = f.radio_button(:#{col.to_s}, '1', checked: #{singular}.#{col.to_s} ? 'checked' : '')
496
+ = f.label(:#{col.to_s}, value: 'Yes', for: '#{singular}_#{col.to_s}_1')
487
497
 
498
+ "
488
499
  end
489
500
 
490
501
  }.join("\n")
@@ -567,7 +578,16 @@ module CommonCore
567
578
  %span.alert-danger
568
579
  MISSING
569
580
  "
570
-
581
+ when :boolean
582
+ " %td
583
+ - if #{singular}.#{col}.nil?
584
+ %span.alert-danger
585
+ MISSING
586
+ - elsif #{singular}.#{col}
587
+ YES
588
+ - else
589
+ NO
590
+ "
571
591
  end
572
592
  }.join("\n")
573
593
  return res
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: common_core_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt