cm-admin 2.1.0 → 2.1.2
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/.github/workflows/release-gem.yml +1 -1
- data/.yardopts +2 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/app/assets/javascripts/cm_admin/form_validation.js +8 -0
- data/app/assets/stylesheets/cm_admin/base/form.scss +4 -0
- data/app/views/cm_admin/roles/permissions.html.slim +1 -1
- data/lib/cm_admin/version.rb +1 -1
- data/lib/cm_admin/view_helpers/form_helper.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bf108bd43b406a281c6ed12ad91abf98ac9c9036b65016e0290f439f6a3f4fe
|
4
|
+
data.tar.gz: 9a6ef986cf196dc7ed52479a0f5e7f325d6c51ff0b2442fed231cc39be8cae63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e62aeebf8d5554baee3efc5535cb9b63347d6de55f8a725a03f639da53db436bbba6674aa693dbb9f93a9fc69dae23bcc3e751c8adce507045115bccc9f58f
|
7
|
+
data.tar.gz: 56875e172f79dd906e4ce20f78c7621ebd4f696b7f5c582003db2e33f37ba043a3c99fbd3d14c230f5e3b8a1171ee13610fc934e40d452ac5773e17e6043d90f
|
@@ -46,7 +46,7 @@ jobs:
|
|
46
46
|
run: gem install gem-release
|
47
47
|
|
48
48
|
- name: Bump the gem
|
49
|
-
run: gem bump --version ${{ github.event.inputs.bump_type }}
|
49
|
+
run: gem bump --version ${{ github.event.inputs.bump_type }} -p
|
50
50
|
|
51
51
|
- name: Remove lock on bundle
|
52
52
|
run: bundle config set frozen false
|
data/.yardopts
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -39,6 +39,8 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
39
39
|
|
40
40
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
41
41
|
|
42
|
+
Any markdown and ruby file added in `docs/` folder will be auto added in yard docs.
|
43
|
+
|
42
44
|
## Deployment
|
43
45
|
|
44
46
|
To release a new version of the Gem you can use Github Actions.
|
@@ -16,6 +16,7 @@ $(document).on("click", '[data-behaviour="form_submit"]', function (e) {
|
|
16
16
|
submit.push(true);
|
17
17
|
}
|
18
18
|
});
|
19
|
+
|
19
20
|
$("." + form_class + " select.required").each(function () {
|
20
21
|
$(this).removeClass("is-invalid");
|
21
22
|
let selected_value = $(this).val();
|
@@ -49,3 +50,10 @@ $(document).on("click", '[data-behaviour="form_submit"]', function (e) {
|
|
49
50
|
return $('[data-behaviour="form_submit"]').button("loading");
|
50
51
|
}
|
51
52
|
});
|
53
|
+
|
54
|
+
$(document).on("click", '[data-behaviour="discard_form"]', function (e) {
|
55
|
+
e.preventDefault();
|
56
|
+
const form = $(this).closest("form");
|
57
|
+
form[0].reset();
|
58
|
+
window.history.back();
|
59
|
+
});
|
@@ -34,4 +34,4 @@
|
|
34
34
|
= select_tag(:policy_scope_name, options_for_select(model.policy_scopes.map{|policy_hash| [policy_hash[:display_name], policy_hash[:scope_name]]}, permission&.scope_name), {name: "role_permission[#{model.name}][#{action.name}][scope_name]", class: 'select-2', id: "policy-scope-#{model.name}-#{action.name}"})
|
35
35
|
div
|
36
36
|
= f.submit 'Save Changes', class: "btn-cta"
|
37
|
-
= link_to 'Discard', cm_admin.send('cm_role_index_path'), class: "btn
|
37
|
+
= link_to 'Discard', cm_admin.send('cm_role_index_path'), class: "btn-secondary ml-10"
|
data/lib/cm_admin/version.rb
CHANGED
@@ -161,6 +161,7 @@ module CmAdmin
|
|
161
161
|
concat split_form_into_section(resource, form_obj, entities)
|
162
162
|
concat tag.br
|
163
163
|
concat form_obj.submit 'Save', class: 'btn-cta', data: { behaviour: 'form_submit', form_class: "cm_#{form_obj.object.class.name.downcase}_form" }
|
164
|
+
concat button_tag 'Discard', class: 'btn-secondary discard-form', data: { behaviour: 'discard_form' }
|
164
165
|
end
|
165
166
|
end
|
166
167
|
|
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.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: exe
|
16
16
|
cert_chain: []
|
17
|
-
date: 2024-09-
|
17
|
+
date: 2024-09-17 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: caxlsx_rails
|