cm-admin 2.4.5 → 2.4.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
  SHA256:
3
- metadata.gz: eca7a51066874791c62583654eea82878e1b84fefaca0ac6893972573fa21bdc
4
- data.tar.gz: eb36d11d0a1d47f8c854fd79b19621148ef84ed45d2afcb72609441761c47f0b
3
+ metadata.gz: 73688c5bd0feeb5e298c38aff4f27bfd25713415fe1966e3ceb4aa0904d0626d
4
+ data.tar.gz: 1e8159e651b679a797a8b22c7041ca042290b19f9e8bee708e123b57cde0734b
5
5
  SHA512:
6
- metadata.gz: 9c0596af7a585db67aa2f16a902f7765f94b6419fdff631efff2cdad9f6f9d885d61fe2ce55c783704c91b575919253b6cc3b504bfc4cba02fe945dbec139030
7
- data.tar.gz: b1228ab04a4664b6b0452b83667e5bef30591e5787775002a66897db3b1a1145ebc00360abbffa9bd659f508b6fc99c1f4a96b364601564f038afcf7ad3cb0e7
6
+ metadata.gz: f83a656a89400a1cf26767d3eccdc79fc7f19af1c88cdcc24b408a9e8be33e0e66580594361a4bbee5009f2b56e717e250efcef813b3ddc24a7c961c6226633e
7
+ data.tar.gz: e0c9ebf9c99e8fee1524dc580eda47073c75e17dedb6620fe24d26ae11c86cef424501d57645fbf363ce8bc9947e64d97f45a9c530232743fa78e8e75fe449ff
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (2.4.5)
4
+ cm-admin (2.4.6)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '2.4.5'
2
+ VERSION = '2.4.6'
3
3
  end
@@ -111,9 +111,9 @@ module CmAdmin
111
111
  def set_form_field(resource, form_obj, field)
112
112
  return unless field.display_if.call(form_obj.object)
113
113
  return create_alert(field, form_obj.object) if field.is_a?(CmAdmin::Models::Alert)
114
-
114
+
115
115
  is_required = is_field_presence_validated?(form_obj, field)
116
-
116
+
117
117
  content_tag(:div, class: field.col_size ? "col-#{field.col_size}" : 'col') do
118
118
  if field.input_type.eql?(:hidden)
119
119
  concat input_field_for_column(form_obj, field, is_required:)
@@ -122,7 +122,10 @@ module CmAdmin
122
122
  concat set_form_label(field, form_obj, is_required)
123
123
  concat input_field_for_column(form_obj, field, is_required:)
124
124
  concat tag.small field.helper_text, class: 'form-text text-muted' if field.helper_text.present?
125
- concat tag.p resource.errors[field.field_name].first if resource.errors[field.field_name].present?
125
+ if resource.errors[field.field_name].present?
126
+ error_message = resource.errors[field.field_name].first
127
+ concat(tag.p("#{field.label} #{error_message}".html_safe))
128
+ end
126
129
  end)
127
130
  end
128
131
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cm-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael