kaui 3.0.9 → 4.0.0
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/app/assets/images/kaui/account/authorize.svg +4 -0
- data/app/assets/images/kaui/account/credit.svg +4 -0
- data/app/assets/images/kaui/account/down-arrow.svg +3 -0
- data/app/assets/images/kaui/account/edit.svg +4 -0
- data/app/assets/images/kaui/account/pay-all.svg +5 -0
- data/app/assets/images/kaui/account/plus.svg +3 -0
- data/app/assets/images/kaui/account/purchase.svg +5 -0
- data/app/assets/images/kaui/account/refresh.svg +5 -0
- data/app/assets/images/kaui/arrow.svg +3 -0
- data/app/assets/images/kaui/card.svg +5 -0
- data/app/assets/images/kaui/copy.svg +12 -0
- data/app/assets/images/kaui/dashboard/aviate.svg +6 -0
- data/app/assets/images/kaui/dashboard/custom-field.svg +5 -0
- data/app/assets/images/kaui/dashboard/kaui-doc-img.png +0 -0
- data/app/assets/images/kaui/dashboard/plugins.svg +7 -0
- data/app/assets/images/kaui/dashboard/tags.svg +4 -0
- data/app/assets/images/kaui/dashboard/users.svg +6 -0
- data/app/assets/images/kaui/delete.svg +6 -0
- data/app/assets/images/kaui/dots.svg +5 -0
- data/app/assets/images/kaui/download-csv.svg +5 -0
- data/app/assets/images/kaui/download.svg +4 -0
- data/app/assets/images/kaui/eye-off.svg +9 -0
- data/app/assets/images/kaui/eye.svg +7 -0
- data/app/assets/images/kaui/file-upload.svg +34 -0
- data/app/assets/images/kaui/generate.svg +5 -0
- data/app/assets/images/kaui/header/account.svg +4 -0
- data/app/assets/images/kaui/header/cog_icon.svg +4 -0
- data/app/assets/images/kaui/header/invoice.svg +5 -0
- data/app/assets/images/kaui/header/payment.svg +5 -0
- data/app/assets/images/kaui/header/search_icon.svg +4 -0
- data/app/assets/images/kaui/header/subscription.svg +6 -0
- data/app/assets/images/kaui/logout.svg +4 -0
- data/app/assets/images/kaui/modal/close.svg +3 -0
- data/app/assets/images/kaui/modal/plus.svg +3 -0
- data/app/assets/images/kaui/modal/red-close.svg +10 -0
- data/app/assets/images/kaui/modal/search.svg +4 -0
- data/app/assets/images/kaui/payment/payment.svg +4 -0
- data/app/assets/images/kaui/payment/refund.svg +4 -0
- data/app/assets/images/kaui/plus.svg +3 -0
- data/app/assets/images/kaui/search.svg +4 -0
- data/app/assets/images/kaui/setting/account.svg +10 -0
- data/app/assets/images/kaui/setting/analytics.svg +7 -0
- data/app/assets/images/kaui/setting/custom-field.svg +5 -0
- data/app/assets/images/kaui/setting/e-notifications.svg +6 -0
- data/app/assets/images/kaui/setting/plugins.svg +7 -0
- data/app/assets/images/kaui/setting/plus.svg +3 -0
- data/app/assets/images/kaui/setting/reset.svg +4 -0
- data/app/assets/images/kaui/setting/tag-definitions.svg +5 -0
- data/app/assets/images/kaui/setting/tags.svg +4 -0
- data/app/assets/images/kaui/setting/tenants.svg +6 -0
- data/app/assets/images/kaui/setting/users.svg +6 -0
- data/app/assets/images/kaui/setting.svg +4 -0
- data/app/assets/images/kaui/sidebar/account.svg +4 -0
- data/app/assets/images/kaui/sidebar/audit.svg +5 -0
- data/app/assets/images/kaui/sidebar/custom-fields.svg +5 -0
- data/app/assets/images/kaui/sidebar/invoices.svg +5 -0
- data/app/assets/images/kaui/sidebar/payments.svg +5 -0
- data/app/assets/images/kaui/sidebar/queues.svg +5 -0
- data/app/assets/images/kaui/sidebar/subscriptions.svg +6 -0
- data/app/assets/images/kaui/sidebar/tags.svg +5 -0
- data/app/assets/images/kaui/sidebar/timeline.svg +5 -0
- data/app/assets/images/kaui/sign_in_background.svg +57 -0
- data/app/assets/images/kaui/sort-down.svg +3 -0
- data/app/assets/images/kaui/sort-up.svg +3 -0
- data/app/assets/images/kaui/subscription/add-on.svg +7 -0
- data/app/assets/images/kaui/subscription/cancel.svg +6 -0
- data/app/assets/images/kaui/subscription/change.svg +6 -0
- data/app/assets/images/kaui/subscription/date.svg +6 -0
- data/app/assets/images/kaui/subscription/pause.svg +4 -0
- data/app/assets/images/kaui/timeline/authorize.svg +5 -0
- data/app/assets/images/kaui/timeline/capture.svg +5 -0
- data/app/assets/images/kaui/timeline/chargeback.svg +3 -0
- data/app/assets/images/kaui/timeline/credit.svg +6 -0
- data/app/assets/images/kaui/timeline/invoice.svg +5 -0
- data/app/assets/images/kaui/timeline/purchase.svg +5 -0
- data/app/assets/images/kaui/timeline/refund.svg +4 -0
- data/app/assets/images/kaui/timeline/void.svg +4 -0
- data/app/assets/images/kaui/view-doc.svg +6 -0
- data/app/assets/images/kaui/warning.png +0 -0
- data/app/assets/javascripts/application.js +2 -2
- data/app/assets/javascripts/kaui/kaui_override.js +232 -0
- data/app/assets/javascripts/kaui/multi_functions_bar_utils.js +125 -24
- data/app/assets/stylesheets/application.css +13 -1
- data/app/assets/stylesheets/kaui/account.css +2028 -14
- data/app/assets/stylesheets/kaui/account_timeline.css +183 -0
- data/app/assets/stylesheets/kaui/admin_allowed_users.css +260 -0
- data/app/assets/stylesheets/kaui/audit.css +26 -16
- data/app/assets/stylesheets/kaui/audit_logs.css +443 -0
- data/app/assets/stylesheets/kaui/auth_pages.css +72 -0
- data/app/assets/stylesheets/kaui/breadcrumb.css +38 -0
- data/app/assets/stylesheets/kaui/chargebacks.css +118 -0
- data/app/assets/stylesheets/kaui/clock.css +103 -0
- data/app/assets/stylesheets/kaui/common.css +1744 -401
- data/app/assets/stylesheets/kaui/custom_fields.css +546 -0
- data/app/assets/stylesheets/kaui/dashboard.css +26 -0
- data/app/assets/stylesheets/kaui/datatable.css +114 -56
- data/app/assets/stylesheets/kaui/header.css +221 -114
- data/app/assets/stylesheets/kaui/home.css +89 -62
- data/app/assets/stylesheets/kaui/invoice.css +1061 -27
- data/app/assets/stylesheets/kaui/kaui.css +217 -145
- data/app/assets/stylesheets/kaui/overdue.css +5 -3
- data/app/assets/stylesheets/kaui/payment.css +1102 -13
- data/app/assets/stylesheets/kaui/queues.css +269 -0
- data/app/assets/stylesheets/kaui/refunds.css +185 -0
- data/app/assets/stylesheets/kaui/role_definitions.css +111 -0
- data/app/assets/stylesheets/kaui/sidebar.css +122 -0
- data/app/assets/stylesheets/kaui/subscription.css +677 -0
- data/app/assets/stylesheets/kaui/tag_definitions.css +524 -0
- data/app/assets/stylesheets/kaui/tags.css +592 -121
- data/app/assets/stylesheets/kaui/tenants.css +1478 -0
- data/app/assets/stylesheets/kaui/tooltip.css +9 -5
- data/app/assets/stylesheets/kaui/wallets.css +121 -0
- data/app/controllers/kaui/accounts_controller.rb +3 -2
- data/app/controllers/kaui/admin_tenants_controller.rb +33 -0
- data/app/controllers/kaui/custom_fields_controller.rb +1 -1
- data/app/controllers/kaui/engine_controller.rb +1 -2
- data/app/controllers/kaui/engine_controller_util.rb +5 -7
- data/app/controllers/kaui/home_controller.rb +24 -17
- data/app/controllers/kaui/invoices_controller.rb +4 -15
- data/app/controllers/kaui/payments_controller.rb +1 -1
- data/app/controllers/kaui/sessions_controller.rb +1 -0
- data/app/controllers/kaui/tag_definitions_controller.rb +1 -0
- data/app/helpers/kaui/account_helper.rb +13 -0
- data/app/helpers/kaui/plugin_helper.rb +27 -0
- data/app/views/kaui/account_custom_fields/index.html.erb +95 -29
- data/app/views/kaui/account_emails/_account_emails_table.html.erb +13 -3
- data/app/views/kaui/account_emails/_form.html.erb +23 -6
- data/app/views/kaui/account_emails/new.html.erb +12 -6
- data/app/views/kaui/account_tags/_form_bar.html.erb +10 -1
- data/app/views/kaui/account_tags/index.html.erb +103 -24
- data/app/views/kaui/account_timelines/_multi_functions_bar.html.erb +302 -69
- data/app/views/kaui/account_timelines/show.html.erb +360 -254
- data/app/views/kaui/accounts/_account_details.html.erb +165 -0
- data/app/views/kaui/accounts/_account_filterbar.html.erb +70 -80
- data/app/views/kaui/accounts/_add_parent.html.erb +26 -0
- data/app/views/kaui/accounts/_billing_details.html.erb +196 -0
- data/app/views/kaui/accounts/_close_account_modal.html.erb +62 -40
- data/app/views/kaui/accounts/_form_account.html.erb +157 -0
- data/app/views/kaui/accounts/_functions_bar.html.erb +606 -0
- data/app/views/kaui/accounts/_link_parent_modal.html.erb +1 -1
- data/app/views/kaui/accounts/_link_parent_to_modal.html.erb +62 -0
- data/app/views/kaui/accounts/_multi_functions_bar.html.erb +67 -28
- data/app/views/kaui/accounts/_payment_gateways.html.erb +43 -0
- data/app/views/kaui/accounts/_personal_details.html.erb +67 -0
- data/app/views/kaui/accounts/edit.html.erb +15 -9
- data/app/views/kaui/accounts/index.html.erb +77 -27
- data/app/views/kaui/accounts/new.html.erb +14 -8
- data/app/views/kaui/accounts/show.html.erb +17 -11
- data/app/views/kaui/admin/index.html.erb +44 -19
- data/app/views/kaui/admin_allowed_users/_form.html.erb +123 -31
- data/app/views/kaui/admin_allowed_users/edit.html.erb +15 -9
- data/app/views/kaui/admin_allowed_users/index.html.erb +150 -30
- data/app/views/kaui/admin_allowed_users/new.html.erb +14 -8
- data/app/views/kaui/admin_allowed_users/show.html.erb +137 -32
- data/app/views/kaui/admin_tenants/_add_allowed_user_modal.html.erb +42 -15
- data/app/views/kaui/admin_tenants/_clock.html.erb +72 -0
- data/app/views/kaui/admin_tenants/_form.html.erb +32 -20
- data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +21 -8
- data/app/views/kaui/admin_tenants/_form_invoice_template.erb +25 -9
- data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +36 -20
- data/app/views/kaui/admin_tenants/_form_plugin_config.erb +16 -20
- data/app/views/kaui/admin_tenants/_show_catalog.erb +13 -6
- data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +95 -46
- data/app/views/kaui/admin_tenants/_show_catalog_xml.erb +62 -37
- data/app/views/kaui/admin_tenants/_show_overdue.erb +91 -75
- data/app/views/kaui/admin_tenants/_tenant_details.html.erb +106 -17
- data/app/views/kaui/admin_tenants/_tenants_table.html.erb +67 -6
- data/app/views/kaui/admin_tenants/_useful_links.html.erb +21 -16
- data/app/views/kaui/admin_tenants/index.html.erb +35 -11
- data/app/views/kaui/admin_tenants/index.js.erb +3 -0
- data/app/views/kaui/admin_tenants/new.html.erb +19 -13
- data/app/views/kaui/admin_tenants/new_catalog.html.erb +230 -98
- data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +152 -80
- data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +44 -30
- data/app/views/kaui/admin_tenants/show.html.erb +211 -78
- data/app/views/kaui/admin_tenants/show.js.erb +3 -0
- data/app/views/kaui/audit_logs/_multi_functions_bar.html.erb +298 -101
- data/app/views/kaui/audit_logs/index.html.erb +137 -38
- data/app/views/kaui/bundle_tags/_form_bar.html.erb +11 -4
- data/app/views/kaui/bundles/_bundle_details.html.erb +24 -12
- data/app/views/kaui/bundles/index.html.erb +79 -104
- data/app/views/kaui/bundles/pause_resume.html.erb +73 -38
- data/app/views/kaui/chargebacks/_form.html.erb +35 -18
- data/app/views/kaui/chargebacks/new.html.erb +16 -9
- data/app/views/kaui/charges/_form.html.erb +54 -42
- data/app/views/kaui/charges/new.html.erb +15 -8
- data/app/views/kaui/components/breadcrumb/_breadcrumb.html.erb +146 -0
- data/app/views/kaui/components/button/_button.html.erb +16 -0
- data/app/views/kaui/components/dashboard/_card.html.erb +15 -0
- data/app/views/kaui/components/dashboard/_setting.html.erb +15 -0
- data/app/views/kaui/components/form_input/_form_input.html.erb +4 -0
- data/app/views/kaui/components/form_password/_form_password.html.erb +6 -0
- data/app/views/kaui/components/logo/_logo.html.erb +1 -0
- data/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb +59 -0
- data/app/views/kaui/components/search_input/_search_input.html.erb +81 -0
- data/app/views/kaui/credits/_form.html.erb +42 -25
- data/app/views/kaui/credits/new.html.erb +15 -8
- data/app/views/kaui/custom_fields/_form.html.erb +37 -25
- data/app/views/kaui/custom_fields/_list_bar.html.erb +11 -10
- data/app/views/kaui/custom_fields/index.html.erb +121 -27
- data/app/views/kaui/custom_fields/new.html.erb +19 -8
- data/app/views/kaui/errors/500.html.erb +1 -1
- data/app/views/kaui/home/index.html.erb +77 -30
- data/app/views/kaui/invoice_items/_edit_form.html.erb +30 -14
- data/app/views/kaui/invoice_items/edit.html.erb +15 -7
- data/app/views/kaui/invoice_tags/_form_bar.html.erb +13 -3
- data/app/views/kaui/invoices/_invoice_filterbar.html.erb +53 -69
- data/app/views/kaui/invoices/_invoice_table.html.erb +77 -92
- data/app/views/kaui/invoices/_multi_functions_bar.html.erb +351 -140
- data/app/views/kaui/invoices/index.html.erb +89 -27
- data/app/views/kaui/invoices/show.html.erb +392 -80
- data/app/views/kaui/layouts/kaui_account_sidebar.html.erb +42 -0
- data/app/views/kaui/layouts/kaui_application.html.erb +29 -15
- data/app/views/kaui/layouts/kaui_flash.html.erb +82 -31
- data/app/views/kaui/layouts/kaui_navbar.html.erb +109 -82
- data/app/views/kaui/layouts/kaui_setting_sidebar.html.erb +36 -0
- data/app/views/kaui/payment_methods/_form.html.erb +32 -11
- data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +35 -34
- data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +27 -29
- data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +116 -38
- data/app/views/kaui/payment_methods/_plugin_properties.html.erb +19 -9
- data/app/views/kaui/payment_methods/new.html.erb +14 -8
- data/app/views/kaui/payments/_form.html.erb +30 -13
- data/app/views/kaui/payments/_multi_functions_bar.html.erb +351 -141
- data/app/views/kaui/payments/_payment_filterbar.html.erb +63 -79
- data/app/views/kaui/payments/_payment_invoice_table.html.erb +105 -0
- data/app/views/kaui/payments/_payment_table.html.erb +4 -67
- data/app/views/kaui/payments/index.html.erb +90 -26
- data/app/views/kaui/payments/new.html.erb +15 -8
- data/app/views/kaui/payments/show.html.erb +222 -28
- data/app/views/kaui/queues/index.html.erb +329 -111
- data/app/views/kaui/refunds/_form.html.erb +68 -45
- data/app/views/kaui/refunds/new.html.erb +15 -8
- data/app/views/kaui/role_definitions/_form.html.erb +104 -17
- data/app/views/kaui/role_definitions/new.html.erb +15 -8
- data/app/views/kaui/sessions/_form.html.erb +9 -19
- data/app/views/kaui/sessions/new.html.erb +10 -9
- data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +65 -35
- data/app/views/kaui/subscriptions/_edit_form.html.erb +66 -35
- data/app/views/kaui/subscriptions/_form.html.erb +63 -32
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +215 -57
- data/app/views/kaui/subscriptions/edit.html.erb +19 -8
- data/app/views/kaui/subscriptions/edit_bcd.erb +46 -16
- data/app/views/kaui/subscriptions/new.html.erb +22 -15
- data/app/views/kaui/tag_definitions/_form.html.erb +51 -30
- data/app/views/kaui/tag_definitions/index.html.erb +151 -40
- data/app/views/kaui/tag_definitions/new.html.erb +15 -8
- data/app/views/kaui/tags/index.html.erb +136 -47
- data/app/views/kaui/tenants/_form.html.erb +8 -5
- data/app/views/kaui/tenants/index.html.erb +15 -9
- data/app/views/kaui/transactions/_control_plugin_names.html.erb +18 -10
- data/app/views/kaui/transactions/_form.html.erb +86 -25
- data/app/views/kaui/transactions/new.html.erb +15 -9
- data/config/routes.rb +1 -0
- data/lib/kaui/engine.rb +11 -0
- data/lib/kaui/version.rb +1 -1
- data/lib/kaui.rb +0 -1
- metadata +120 -2
|
@@ -1,86 +1,193 @@
|
|
|
1
|
-
<table id="subscriptions_<%= bundle.bundle_id %>" class="table
|
|
1
|
+
<table id="subscriptions_<%= bundle.bundle_id %>" class="subscriptions-table">
|
|
2
2
|
<thead>
|
|
3
3
|
<tr>
|
|
4
4
|
<% unless @available_subscription_tags.blank? && @custom_fields_per_subscription.blank? %>
|
|
5
5
|
<th></th>
|
|
6
|
-
<% end %>
|
|
7
|
-
<th>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
<% end %>
|
|
7
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 0 : 1 %>">
|
|
8
|
+
<div class="header-content">
|
|
9
|
+
<span class="header-text">Name</span>
|
|
10
|
+
<div class="sort-icons">
|
|
11
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
12
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</th>
|
|
16
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 1 : 2 %>">
|
|
17
|
+
<div class="header-content">
|
|
18
|
+
<span class="header-text">Category</span>
|
|
19
|
+
<div class="sort-icons">
|
|
20
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
21
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</th>
|
|
25
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 2 : 3 %>">
|
|
26
|
+
<div class="header-content">
|
|
27
|
+
<span class="header-text">Phase type</span>
|
|
28
|
+
<div class="sort-icons">
|
|
29
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
30
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</th>
|
|
34
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 3 : 4 %>">
|
|
35
|
+
<div class="header-content">
|
|
36
|
+
<span class="header-text">Start date</span>
|
|
37
|
+
<div class="sort-icons">
|
|
38
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
39
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</th>
|
|
43
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 4 : 5 %>">
|
|
44
|
+
<div class="header-content">
|
|
45
|
+
<span class="header-text">Cancel information</span>
|
|
46
|
+
<div class="sort-icons">
|
|
47
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
48
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</th>
|
|
52
|
+
<th class="sortable-header" data-column="<%= (@available_subscription_tags.blank? && @custom_fields_per_subscription.blank?) ? 5 : 6 %>">
|
|
53
|
+
<div class="header-content">
|
|
54
|
+
<span class="header-text">Charged Upto Date</span>
|
|
55
|
+
<div class="sort-icons">
|
|
56
|
+
<%= image_tag "kaui/sort-up.svg", class: "sort-icon sort-asc" %>
|
|
57
|
+
<%= image_tag "kaui/sort-down.svg", class: "sort-icon sort-desc" %>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</th>
|
|
61
|
+
<th></th>
|
|
14
62
|
</tr>
|
|
15
63
|
</thead>
|
|
16
64
|
<tbody>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<span><i class="fa fa-tag"></i><i class="fa fa-caret-down"></i></span>
|
|
65
|
+
<% (bundle.subscriptions || []).each do |sub| %>
|
|
66
|
+
<% dropdown_id = "cancelDropdown-#{sub.subscription_id}" %>
|
|
67
|
+
<tr class="<%= subscription_cancelled?(sub) ? 'expired expired-row' : 'non-expired' %>">
|
|
68
|
+
<% unless @available_subscription_tags.blank? && @custom_fields_per_subscription.blank? %>
|
|
69
|
+
<td class="full-visible">
|
|
70
|
+
<div class="tag-bar tag-bar-no-border children-tag-bar">
|
|
71
|
+
<% unless @available_subscription_tags.blank? %>
|
|
25
72
|
|
|
26
|
-
|
|
27
|
-
|
|
73
|
+
<div class="tag-select" onclick="void(0)">
|
|
74
|
+
<%= render "kaui/components/button/button", {
|
|
75
|
+
label: "",
|
|
76
|
+
trailing_icon: "kaui/sidebar/tags.svg",
|
|
77
|
+
variant: "",
|
|
78
|
+
type: "button",
|
|
79
|
+
html_class: "kaui-button custom-hover dots-menu me-2",
|
|
80
|
+
} %>
|
|
28
81
|
|
|
82
|
+
<div class="tag-select-box tag-as-select-box d-flex flex-column align-items-start children-tag-select-box" style="opacity: 1;">
|
|
83
|
+
<strong>Tag As:</strong>
|
|
29
84
|
<%= render :partial => 'kaui/bundle_tags/form_bar',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
85
|
+
:locals => {:params => { :bundle_id => bundle.bundle_id},
|
|
86
|
+
:tag_names => (@tags_per_subscription[sub.subscription_id] || []).map { |tag| tag.tag_definition_name },
|
|
87
|
+
:available_tags => @available_subscription_tags,
|
|
88
|
+
:update_tags_path => update_subscriptions_tags_path(sub.subscription_id)
|
|
89
|
+
} %>
|
|
35
90
|
</div>
|
|
36
91
|
</div>
|
|
37
|
-
<% end %>
|
|
92
|
+
<% end %>
|
|
38
93
|
|
|
39
|
-
<%= render :partial => 'kaui/custom_fields/list_bar',
|
|
40
|
-
:locals => {:custom_fields => @custom_fields_per_subscription[sub.subscription_id] || []} %>
|
|
94
|
+
<%= render :partial => 'kaui/custom_fields/list_bar', :locals => {:custom_fields => @custom_fields_per_subscription[sub.subscription_id] || []} %>
|
|
41
95
|
</div>
|
|
42
|
-
|
|
43
96
|
</td>
|
|
44
97
|
<% end %>
|
|
98
|
+
<td><%= humanized_subscription_plan_or_product_name(sub, catalog) %></td>
|
|
45
99
|
<td>
|
|
46
|
-
<span id="<%= sub.subscription_id %>-popover" class="object-id-popover
|
|
100
|
+
<span id="<%= sub.subscription_id %>-popover" class="object-id-popover category-bedge" data-id="<%= sub.subscription_id %>">
|
|
47
101
|
<%= humanized_subscription_product_category(sub) %>
|
|
48
102
|
</span>
|
|
49
103
|
</td>
|
|
50
|
-
<td><%=
|
|
51
|
-
<td><%= humanized_subscription_phase_type(sub) %></td>
|
|
104
|
+
<td><span class="phase-type"><%= humanized_subscription_phase_type(sub).downcase %></span></td>
|
|
52
105
|
<td><%= humanized_subscription_start_date(sub, account) %></td>
|
|
53
|
-
<td><%= humanized_subscription_charged_through_date(sub, account) %></td>
|
|
54
106
|
<td><%= humanized_subscription_cancelled_information(sub, account) %></td>
|
|
107
|
+
<td><%= humanized_subscription_charged_through_date(sub, account) %></td>
|
|
55
108
|
<td class="text-center">
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
109
|
+
<% if subscription_future_cancelled?(sub, account) %>
|
|
110
|
+
<%= link_to 'Reinstate', kaui_engine.reinstate_path(:id => sub.subscription_id), :method => :put, :class => 'btn btn-xs' %>
|
|
111
|
+
<% elsif !subscription_cancelled?(sub) %>
|
|
112
|
+
<div class="d-flex justify-content-end align-items-center">
|
|
113
|
+
<% if can? :cancel, Kaui::Subscription %>
|
|
114
|
+
<div class="btn-group cancel-menu position-relative" id="<%= dropdown_id %>Wrapper">
|
|
115
|
+
<button id="<%= dropdown_id %>Btn" class="cancel-button">
|
|
116
|
+
Cancel
|
|
117
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
118
|
+
<path d="M4 6.00003L8.00002 10L12 6" stroke="#D92D20" stroke-width="1.5" stroke-miterlimit="16" stroke-linecap="round" stroke-linejoin="round"/>
|
|
119
|
+
</svg>
|
|
120
|
+
</button>
|
|
121
|
+
|
|
122
|
+
<ul class="dropdown-menu"
|
|
123
|
+
id="<%= dropdown_id %>Menu"
|
|
124
|
+
style="display: none;">
|
|
125
|
+
<li><%= link_to 'Cancel (default policy)', kaui_engine.subscription_path(id: sub.subscription_id), method: :delete %></li>
|
|
126
|
+
<li><%= link_to 'Cancel start of term (full credit)', kaui_engine.subscription_path(id: sub.subscription_id, policy: 'START_OF_TERM'), method: :delete %></li>
|
|
127
|
+
<li><%= link_to 'Cancel immediately (partial credit)', kaui_engine.subscription_path(id: sub.subscription_id, policy: 'IMMEDIATE'), method: :delete %></li>
|
|
128
|
+
<li><%= link_to 'Cancel end of term (no credit)', kaui_engine.subscription_path(id: sub.subscription_id, policy: 'END_OF_TERM'), method: :delete %></li>
|
|
129
|
+
<li><%= link_to 'Cancel a subscription given a date', '#cancel_subscription_by_date_modal', data: { bs_toggle: 'modal', id: sub.subscription_id } %></li>
|
|
130
|
+
</ul>
|
|
131
|
+
</div>
|
|
132
|
+
<% end %>
|
|
133
|
+
|
|
134
|
+
<% if can?(:create, Kaui::Subscription) || can?(:pause_resume, Kaui::Subscription) || can?(:change_plan, Kaui::Subscription) %>
|
|
135
|
+
<% menu_items = [] %>
|
|
136
|
+
|
|
137
|
+
<% if can?(:change_plan, Kaui::Subscription) %>
|
|
138
|
+
<% menu_items << {
|
|
139
|
+
label: "Change Plan",
|
|
140
|
+
path: kaui_engine.edit_subscription_path(sub.subscription_id),
|
|
141
|
+
icon: "kaui/subscription/change.svg"
|
|
142
|
+
} %>
|
|
61
143
|
<% end %>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
144
|
+
|
|
145
|
+
<% if can?(:create, Kaui::Subscription) && @subscription[bundle.bundle_id].present? %>
|
|
146
|
+
<% menu_items << {
|
|
147
|
+
label: @subscription[bundle.bundle_id].product_category == 'BASE' ? 'Add add-on' : 'Add standalone subscription',
|
|
148
|
+
path: kaui_engine.new_subscription_path(
|
|
149
|
+
params: {
|
|
150
|
+
account_id: bundle.account_id,
|
|
151
|
+
bundle_id: bundle.bundle_id,
|
|
152
|
+
base_product_name: @subscription[bundle.bundle_id].product_name,
|
|
153
|
+
product_category: @subscription[bundle.bundle_id].product_category == 'BASE' ? 'ADD_ON' : 'STANDALONE'
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
icon: "kaui/subscription/add-on.svg"
|
|
157
|
+
} %>
|
|
76
158
|
<% end %>
|
|
77
|
-
|
|
78
|
-
|
|
159
|
+
|
|
160
|
+
<% if can?(:pause_resume, Kaui::Subscription) %>
|
|
161
|
+
<% menu_items << {
|
|
162
|
+
label: "Pause / resume",
|
|
163
|
+
path: kaui_engine.pause_resume_bundle_path(account_id: bundle.account_id, id: bundle.bundle_id),
|
|
164
|
+
icon: "kaui/subscription/pause.svg"
|
|
165
|
+
} %>
|
|
79
166
|
<% end %>
|
|
80
|
-
|
|
167
|
+
|
|
168
|
+
<% if can?(:create, Kaui::Subscription) %>
|
|
169
|
+
<% menu_items << {
|
|
170
|
+
label: "Update BCD",
|
|
171
|
+
path: kaui_engine.edit_bcd_path(id: sub.subscription_id),
|
|
172
|
+
icon: "kaui/subscription/date.svg"
|
|
173
|
+
} %>
|
|
174
|
+
<% end %>
|
|
175
|
+
|
|
176
|
+
<%= render partial: "kaui/components/menu_dropdown/menu_dropdown", locals: {
|
|
177
|
+
variant: "btn-light",
|
|
178
|
+
label: "",
|
|
179
|
+
icon: "kaui/dots.svg",
|
|
180
|
+
html_class: "dots-menu",
|
|
181
|
+
menu_items: menu_items,
|
|
182
|
+
dropdown_id: "dotsDropdown-#{sub.subscription_id}",
|
|
183
|
+
} %>
|
|
184
|
+
<% end %>
|
|
185
|
+
</div>
|
|
186
|
+
<% end %>
|
|
187
|
+
|
|
81
188
|
</td>
|
|
82
189
|
</tr>
|
|
83
|
-
|
|
190
|
+
<% end %>
|
|
84
191
|
</tbody>
|
|
85
192
|
</table>
|
|
86
193
|
|
|
@@ -90,7 +197,7 @@
|
|
|
90
197
|
$(document).ready(function() {
|
|
91
198
|
$('.subscription-id-popover').popover();
|
|
92
199
|
|
|
93
|
-
$('#subscriptions_<%= bundle.bundle_id %>').
|
|
200
|
+
var table = $('#subscriptions_<%= bundle.bundle_id %>').DataTable({
|
|
94
201
|
"dom": "t",
|
|
95
202
|
"paging": false,
|
|
96
203
|
"order": [[ <%= @available_subscription_tags.blank? && @custom_fields_per_subscription.blank? ? 3 : 4 %>, "asc" ]],
|
|
@@ -103,12 +210,63 @@
|
|
|
103
210
|
null,
|
|
104
211
|
null,
|
|
105
212
|
{ "orderable": false }
|
|
106
|
-
]
|
|
213
|
+
],
|
|
214
|
+
"drawCallback": function() {
|
|
215
|
+
setObjectIdTooltip();
|
|
216
|
+
}
|
|
107
217
|
});
|
|
108
218
|
|
|
219
|
+
// Custom sorting functionality for this table
|
|
220
|
+
(function() {
|
|
221
|
+
var currentSortColumn = <%= @available_subscription_tags.blank? && @custom_fields_per_subscription.blank? ? 3 : 4 %>;
|
|
222
|
+
var currentSortDirection = 'asc';
|
|
223
|
+
updateSortIndicators($('#subscriptions_<%= bundle.bundle_id %>'), currentSortColumn, currentSortDirection);
|
|
224
|
+
|
|
225
|
+
$('#subscriptions_<%= bundle.bundle_id %> thead .sortable-header').on('click', function() {
|
|
226
|
+
var columnIndex = parseInt($(this).data('column'));
|
|
227
|
+
var newDirection = (currentSortColumn === columnIndex && currentSortDirection === 'asc') ? 'desc' : 'asc';
|
|
228
|
+
currentSortColumn = columnIndex;
|
|
229
|
+
currentSortDirection = newDirection;
|
|
230
|
+
updateSortIndicators($('#subscriptions_<%= bundle.bundle_id %>'), columnIndex, newDirection);
|
|
231
|
+
table.order([columnIndex, newDirection]).draw();
|
|
232
|
+
});
|
|
233
|
+
})();
|
|
234
|
+
|
|
109
235
|
$(".price-override-popover").popover({
|
|
110
236
|
container: 'body',
|
|
111
237
|
trigger: 'hover'
|
|
112
238
|
});
|
|
239
|
+
|
|
240
|
+
document.querySelectorAll('.cancel-button').forEach(function(button) {
|
|
241
|
+
const idPrefix = button.id.replace('Btn', '');
|
|
242
|
+
const menu = document.getElementById(idPrefix + 'Menu');
|
|
243
|
+
const wrapper = document.getElementById(idPrefix + 'Wrapper');
|
|
244
|
+
|
|
245
|
+
button.addEventListener('click', function (e) {
|
|
246
|
+
e.stopPropagation();
|
|
247
|
+
|
|
248
|
+
// Close all open dropdowns first
|
|
249
|
+
document.querySelectorAll('.dropdown-menu').forEach(m => m.style.display = 'none');
|
|
250
|
+
|
|
251
|
+
// Toggle this one
|
|
252
|
+
const isOpen = menu.style.display === 'block';
|
|
253
|
+
menu.style.display = isOpen ? 'none' : 'block';
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
// Close dropdown on outside click
|
|
257
|
+
document.addEventListener('click', function (e) {
|
|
258
|
+
if (!wrapper.contains(e.target)) {
|
|
259
|
+
menu.style.display = 'none';
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
113
263
|
});
|
|
264
|
+
|
|
265
|
+
function updateSortIndicators($table, columnIndex, direction) {
|
|
266
|
+
$table.find('.sortable-header').removeClass('sort-asc-active sort-desc-active');
|
|
267
|
+
$table.find('.sort-icon').removeClass('active');
|
|
268
|
+
var $header = $table.find('.sortable-header[data-column="' + columnIndex + '"]');
|
|
269
|
+
$header.addClass(direction + '-active');
|
|
270
|
+
$header.find('.sort-' + direction).addClass('active');
|
|
271
|
+
}
|
|
114
272
|
<% end %>
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
<div class="register">
|
|
2
|
-
<div class="
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<div class="register kaui-subscription-new">
|
|
2
|
+
<div class="">
|
|
3
|
+
<div class="mx-auto" style="max-width: 37.5rem;">
|
|
4
|
+
<h5 class="add-account-title border-bottom pb-3 mb-3">
|
|
5
|
+
<span class="icon-container">
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<path d="M9.16675 11.6665H13.3334M6.66675 11.6665H6.67423M10.8334 14.9998H6.66675M13.3334 14.9998H13.3259" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M13.75 1.6665V4.99984M6.25 1.6665V4.99984" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
<path d="M15.8333 3.3335H4.16667C3.24619 3.3335 2.5 4.07969 2.5 5.00016V16.6668C2.5 17.5873 3.24619 18.3335 4.16667 18.3335H15.8333C16.7538 18.3335 17.5 17.5873 17.5 16.6668V5.00016C17.5 4.07969 16.7538 3.3335 15.8333 3.3335Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
|
+
<path d="M2.5 8.3335H17.5" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
|
+
</svg>
|
|
12
|
+
</span>
|
|
13
|
+
Change subscription
|
|
14
|
+
</h5>
|
|
15
|
+
<%= render 'edit_form' %>
|
|
16
|
+
</div>
|
|
7
17
|
</div>
|
|
8
|
-
|
|
9
|
-
</div>
|
|
10
18
|
</div>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
@@ -1,27 +1,57 @@
|
|
|
1
|
-
<div class="register">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div class="register kaui-subscription-new">
|
|
2
|
+
<div class="">
|
|
3
|
+
<div class="mx-auto" style="max-width: 37.5rem;">
|
|
4
|
+
<h5 class="add-account-title border-bottom pb-3 mb-3">
|
|
5
|
+
<span class="icon-container">
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<path d="M9.16675 11.6665H13.3334M6.66675 11.6665H6.67423M10.8334 14.9998H6.66675M13.3334 14.9998H13.3259" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M13.75 1.6665V4.99984M6.25 1.6665V4.99984" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
<path d="M15.8333 3.3335H4.16667C3.24619 3.3335 2.5 4.07969 2.5 5.00016V16.6668C2.5 17.5873 3.24619 18.3335 4.16667 18.3335H15.8333C16.7538 18.3335 17.5 17.5873 17.5 16.6668V5.00016C17.5 4.07969 16.7538 3.3335 15.8333 3.3335Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
|
+
<path d="M2.5 8.3335H17.5" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
|
+
</svg>
|
|
12
|
+
</span>
|
|
13
|
+
Update Subscription BCD
|
|
14
|
+
</h5>
|
|
6
15
|
<%= form_for @subscription, :as => :subscription, :url => update_bcd_path(@subscription.subscription_id), :html => {:method => :put, :class => 'form-horizontal'} do |f| %>
|
|
7
16
|
<%= f.hidden_field :account_id %>
|
|
8
17
|
|
|
9
|
-
<div class="form-group">
|
|
10
|
-
<%= f.label :bill_cycle_day_local, 'Bill Cycle Day', :class => 'col-sm-
|
|
11
|
-
<div class="col-sm-
|
|
18
|
+
<div class="form-group d-flex pb-3">
|
|
19
|
+
<%= f.label :bill_cycle_day_local, 'Bill Cycle Day', :class => 'col-sm-3 control-label' %>
|
|
20
|
+
<div class="col-sm-9">
|
|
12
21
|
<%= f.number_field :bill_cycle_day_local, { :min => 1, :max => 31, :class => 'form-control'} %>
|
|
13
22
|
</div>
|
|
14
23
|
</div>
|
|
15
|
-
<div class="form-group"
|
|
16
|
-
<%= label_tag :effective_from_date, 'Effective Date', :class => 'col-sm-
|
|
17
|
-
<div class="col-sm-
|
|
18
|
-
<
|
|
24
|
+
<div class="form-group d-flex pb-3 border-bottom mb-3" id="form_effective_from_date">
|
|
25
|
+
<%= label_tag :effective_from_date, 'Effective Date', :class => 'col-sm-3 control-label' %>
|
|
26
|
+
<div class="col-sm-9">
|
|
27
|
+
<div class="custom-date-input-wrapper kaui-button custom-hover">
|
|
28
|
+
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
29
|
+
<path d="M14.9167 12.5V18.3333M17.8333 15.4167H12" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
30
|
+
<path d="M14.0833 1.66675V5.00008M6.58325 1.66675V5.00008" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
31
|
+
<path d="M17.8333 10.8333V4.99992C17.8333 4.07944 17.0871 3.33325 16.1666 3.33325H4.49992C3.57944 3.33325 2.83325 4.07944 2.83325 4.99992V16.6666C2.83325 17.5871 3.57944 18.3333 4.49992 18.3333H10.3333" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
32
|
+
<path d="M2.83325 8.33325H17.8333" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
33
|
+
</svg>
|
|
34
|
+
<input class="form-control" value="<%=Date.parse(Time.now.to_s).to_s%>" id="effective_from_date" name="effective_from_date" type="text" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-highlight="true">
|
|
35
|
+
</div>
|
|
19
36
|
</div>
|
|
20
37
|
</div>
|
|
21
|
-
<div class="form-group">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
38
|
+
<div class="form-group d-flex justify-content-end pb-3">
|
|
39
|
+
<%= render "kaui/components/button/button", {
|
|
40
|
+
label: 'Close',
|
|
41
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
42
|
+
type: "button",
|
|
43
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
44
|
+
html_options: {
|
|
45
|
+
id: "closeButton",
|
|
46
|
+
onclick: "window.history.back();"
|
|
47
|
+
}
|
|
48
|
+
} %>
|
|
49
|
+
<%= render "kaui/components/button/button", {
|
|
50
|
+
label: 'Save Subscription',
|
|
51
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
52
|
+
type: "submit",
|
|
53
|
+
html_class: "kaui-dropdown custom-hover"
|
|
54
|
+
} %>
|
|
25
55
|
</div>
|
|
26
56
|
<% end %>
|
|
27
57
|
</div>
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
<div class="register">
|
|
2
|
-
<div class="
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
<div class="register kaui-subscription-new">
|
|
2
|
+
<div class="">
|
|
3
|
+
<div class="mx-auto" style="max-width: 37.5rem;">
|
|
4
|
+
<h5 class="add-account-title border-bottom pb-3 mb-3">
|
|
5
|
+
<span class="icon-container">
|
|
6
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
+
<path d="M9.16675 11.6665H13.3334M6.66675 11.6665H6.67423M10.8334 14.9998H6.66675M13.3334 14.9998H13.3259" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M13.75 1.6665V4.99984M6.25 1.6665V4.99984" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
<path d="M15.8333 3.3335H4.16667C3.24619 3.3335 2.5 4.07969 2.5 5.00016V16.6668C2.5 17.5873 3.24619 18.3335 4.16667 18.3335H15.8333C16.7538 18.3335 17.5 17.5873 17.5 16.6668V5.00016C17.5 4.07969 16.7538 3.3335 15.8333 3.3335Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
|
+
<path d="M2.5 8.3335H17.5" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
|
+
</svg>
|
|
12
|
+
</span>
|
|
13
|
+
<% if @subscription.product_category == 'ADD_ON' %>
|
|
14
|
+
Add new add-on
|
|
15
|
+
<% elsif @subscription.product_category == 'STANDALONE' %>
|
|
16
|
+
Add new standalone subscription
|
|
17
|
+
<% else %>
|
|
18
|
+
Add new subscription
|
|
19
|
+
<% end %>
|
|
20
|
+
</h5>
|
|
21
|
+
<%= render 'form' %>
|
|
22
|
+
</div>
|
|
14
23
|
</div>
|
|
15
|
-
|
|
16
|
-
</div>
|
|
17
24
|
</div>
|
|
@@ -1,40 +1,61 @@
|
|
|
1
1
|
<%= form_for @tag_definition, :html => {:class => 'form-horizontal'} do |f| %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<div class="col-sm-10" id="object_types">
|
|
2
|
+
<%= f.hidden_field :id %>
|
|
3
|
+
|
|
4
|
+
<div class="form-group d-flex">
|
|
5
|
+
<%= f.label :object_type, :class => 'col-sm-3 control-label' do %>
|
|
6
|
+
Object Type
|
|
7
|
+
<% end %>
|
|
8
|
+
<div class="col-sm-9 d-flex" >
|
|
9
|
+
<div class="w-100 col-sm-6" id="object_types">
|
|
11
10
|
<% (@tag_definition.applicable_object_types || [:account]).each_with_index do |object_type, index| %>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
<div class="d-flex" id="object_type_line_<%= index %>">
|
|
12
|
+
<%= select_tag "tag_definition[applicable_object_types][#{index}]", options_for_select(object_types), {:selected => object_type, :id => "object_type_#{index}", :class => 'form-control tag-definition-select'} %>
|
|
13
|
+
<a class='' href="javascript:void(0);" onclick="delete_object_type(this);" id="delete_object_type_<%= index %>" <%= "style='display: none;'".html_safe if index == 0 %>>
|
|
14
|
+
<button type="button" class="button custom-hover">
|
|
15
|
+
<%= image_tag("kaui/modal/red-close.svg", width: 16, height: 16) %>
|
|
16
|
+
</button>
|
|
17
|
+
</a>
|
|
18
|
+
<a class='d-none' href="javascript:void(0);" onclick="new_object_type();" id="new_object_type" <%= "style='display: block !important;'".html_safe if index == 0 %>>
|
|
19
|
+
<button type="button" class="border-button custom-hover">
|
|
20
|
+
<%= image_tag("kaui/modal/plus.svg", width: 16, height: 16) %>
|
|
21
|
+
</button>
|
|
22
|
+
</a>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
18
25
|
<% end %>
|
|
19
26
|
</div>
|
|
27
|
+
|
|
20
28
|
</div>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
</div>
|
|
30
|
+
<div class='form-group d-flex pb-3'>
|
|
31
|
+
<%= f.label :name, 'Name', :class => 'col-sm-3 control-label' %>
|
|
32
|
+
<div class='col-sm-9'>
|
|
33
|
+
<%= f.text_field :name, :class => 'form-control' %>
|
|
26
34
|
</div>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</div>
|
|
33
|
-
<div class="form-group">
|
|
34
|
-
<div class="col-sm-offset-2 col-sm-10">
|
|
35
|
-
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
|
36
|
-
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class='form-group d-flex pb-3'>
|
|
37
|
+
<%= f.label :description, 'Description', :class => 'col-sm-3 control-label' %>
|
|
38
|
+
<div class='col-sm-9'>
|
|
39
|
+
<%= f.text_field :description, :class => 'form-control' %>
|
|
37
40
|
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="form-group d-flex justify-content-end pt-3 border-top">
|
|
43
|
+
<%= render "kaui/components/button/button", {
|
|
44
|
+
label: 'Close',
|
|
45
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
46
|
+
type: "button",
|
|
47
|
+
html_class: "kaui-button custom-hover mx-2",
|
|
48
|
+
html_options: {
|
|
49
|
+
onclick: "window.history.back();"
|
|
50
|
+
}
|
|
51
|
+
} %>
|
|
52
|
+
<%= render "kaui/components/button/button", {
|
|
53
|
+
label: 'Save Definition',
|
|
54
|
+
variant: "outline-secondary d-inline-flex align-items-center gap-1",
|
|
55
|
+
type: "submit",
|
|
56
|
+
html_class: "kaui-dropdown custom-hover"
|
|
57
|
+
} %>
|
|
58
|
+
</div>
|
|
38
59
|
<% end %>
|
|
39
60
|
|
|
40
61
|
<%= javascript_tag do %>
|