kaui 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -3
- data/Gemfile.lock +142 -89
- data/app/assets/javascripts/application.js +4 -1
- data/app/assets/javascripts/kaui/bootstrap-tweaks.js +1 -1
- data/app/assets/javascripts/kaui/datatables-tweaks.js +3 -0
- data/app/assets/stylesheets/application.css +2 -0
- data/app/assets/stylesheets/bootstrap_and_overrides.css +0 -41
- data/app/assets/stylesheets/datatables.scss +14 -0
- data/app/assets/stylesheets/layout.scss +19 -0
- data/app/controllers/kaui/account_timelines_controller.rb +6 -14
- data/app/controllers/kaui/sessions_controller.rb +3 -0
- data/app/controllers/kaui/subscriptions_controller.rb +8 -8
- data/app/models/kaui/ability.rb +1 -3
- data/app/models/kaui/allowed_user.rb +7 -2
- data/app/models/kaui/invoice.rb +21 -0
- data/app/views/kaui/account_emails/_account_emails_table.html.erb +1 -1
- data/app/views/kaui/account_timelines/show.html.erb +27 -27
- data/app/views/kaui/accounts/_form.html.erb +107 -111
- data/app/views/kaui/accounts/index.html.erb +1 -1
- data/app/views/kaui/accounts/show.html.erb +6 -6
- data/app/views/kaui/admin_allowed_users/new.html.erb +2 -2
- data/app/views/kaui/admin_tenants/new.html.erb +3 -3
- data/app/views/kaui/admin_tenants/show.html.erb +1 -1
- data/app/views/kaui/bundles/index.html.erb +1 -1
- data/app/views/kaui/bundles/show.html.erb +1 -1
- data/app/views/kaui/chargebacks/_form.html.erb +1 -1
- data/app/views/kaui/charges/_form.html.erb +2 -2
- data/app/views/kaui/credits/_form.html.erb +2 -2
- data/app/views/kaui/custom_fields/index.html.erb +1 -1
- data/app/views/kaui/home/index.html.erb +1 -1
- data/app/views/kaui/invoice_items/edit.html.erb +1 -1
- data/app/views/kaui/invoices/index.html.erb +1 -1
- data/app/views/kaui/invoices/show.html.erb +2 -2
- data/app/views/kaui/layouts/kaui_application.html.erb +14 -10
- data/app/views/kaui/payment_methods/_form.html.erb +3 -3
- data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +2 -2
- data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +5 -5
- data/app/views/kaui/payment_methods/index.html.erb +1 -1
- data/app/views/kaui/payments/index.html.erb +1 -1
- data/app/views/kaui/payments/new.html.erb +1 -1
- data/app/views/kaui/refunds/new.html.erb +2 -2
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +5 -5
- data/app/views/kaui/subscriptions/new.html.erb +1 -1
- data/app/views/kaui/subscriptions/show.html.erb +5 -5
- data/app/views/kaui/tags/_tags_table.html.erb +2 -2
- data/app/views/kaui/tags/index.html.erb +1 -1
- data/app/views/kaui/tenants/index.html.erb +1 -1
- data/app/views/kaui/transactions/_form.html.erb +2 -2
- data/config/initializers/devise.rb +28 -243
- data/config/routes.rb +1 -1
- data/db/migrate/20150112232813_create_kaui_allowed_users.rb +2 -2
- data/kaui.gemspec +11 -5
- data/lib/kaui/engine.rb +2 -0
- data/lib/kaui/version.rb +1 -1
- data/test/dummy/.gitignore +1 -0
- data/test/dummy/config/database.yml +6 -2
- data/test/dummy/config/environments/development.rb +3 -8
- data/test/dummy/config/environments/production.rb +2 -0
- data/test/dummy/config/environments/test.rb +5 -4
- data/test/dummy/config/initializers/killbill_client.rb +0 -1
- data/test/dummy/config/initializers/secret_token.rb +1 -1
- data/test/dummy/db/schema.rb +27 -27
- data/test/functional/kaui/subscriptions_controller_test.rb +2 -2
- data/test/functional/kaui/tenants_controller_test.rb +1 -7
- data/test/integration/kaui/integration_test_helper.rb +4 -4
- data/test/killbill_test_helper.rb +7 -8
- data/test/test_helper.rb +1 -0
- data/test/unit/kaui/money_helper_test.rb +7 -1
- data/vendor/assets/stylesheets/css/bootstrap-datepicker.cd46d38.css +2 -2
- metadata +63 -24
- data/test/dummy/db/migrate/20150116052157_devise_create_kaui_users.kaui.rb +0 -13
- data/test/dummy/db/migrate/20150116052158_create_kaui_tenants.kaui.rb +0 -13
- data/test/dummy/db/migrate/20150116052159_create_kaui_allowed_users.kaui.rb +0 -20
- data/vendor/assets/javascripts/jquery.dataTables.min.js +0 -155
- data/vendor/assets/stylesheets/css/bootstrap.v2.2.1.min.css +0 -9
@@ -103,14 +103,14 @@
|
|
103
103
|
<%= link_to 'Payment',
|
104
104
|
kaui_engine.new_payment_path(:params => {:account_id => invoice.account_id,
|
105
105
|
:invoice_id => invoice.invoice_id}),
|
106
|
-
:class => "btn btn-
|
106
|
+
:class => "btn btn-xs #{'disabled' unless invoice.balance > 0}" %>
|
107
107
|
</nobr>
|
108
108
|
<% if can? :credit, Kaui::Invoice %>
|
109
109
|
<nobr>
|
110
110
|
<%= link_to 'Credit',
|
111
111
|
kaui_engine.new_credit_path(:params => {:account_id => invoice.account_id,
|
112
112
|
:invoice_id => invoice.invoice_id}),
|
113
|
-
:class => 'btn btn-
|
113
|
+
:class => 'btn btn-xs' %>
|
114
114
|
</nobr>
|
115
115
|
<% end %>
|
116
116
|
<% if can? :charge, Kaui::Invoice %>
|
@@ -118,7 +118,7 @@
|
|
118
118
|
<%= link_to 'Charge',
|
119
119
|
kaui_engine.new_charge_path(:params => {:account_id => invoice.account_id,
|
120
120
|
:invoice_id => invoice.invoice_id}),
|
121
|
-
:class => 'btn btn-
|
121
|
+
:class => 'btn btn-xs' %>
|
122
122
|
</nobr>
|
123
123
|
<% end %>
|
124
124
|
</td>
|
@@ -187,7 +187,7 @@
|
|
187
187
|
<%= link_to 'Refund', kaui_engine.new_refund_path(:params => {:payment_id => payment.payment_id,
|
188
188
|
:account_id => @account.account_id,
|
189
189
|
:invoice_id => payment.target_invoice_id}),
|
190
|
-
:class => "btn btn-
|
190
|
+
:class => "btn btn-xs #{'disabled' unless payment.payment_id.present? and transaction.status == 'SUCCESS' }" %>
|
191
191
|
</nobr>
|
192
192
|
<% end %>
|
193
193
|
<% if can? :chargeback, Kaui::Payment %>
|
@@ -195,7 +195,7 @@
|
|
195
195
|
<%= link_to 'Chargeback', kaui_engine.new_chargeback_path(:params => {:payment_id => payment.payment_id,
|
196
196
|
:account_id => @account.account_id,
|
197
197
|
:invoice_id => payment.target_invoice_id}),
|
198
|
-
:class => "btn btn-
|
198
|
+
:class => "btn btn-xs #{'disabled' unless payment.payment_id.present? and transaction.status == 'SUCCESS'}" %>
|
199
199
|
</nobr>
|
200
200
|
<% end %>
|
201
201
|
<% elsif !invoice.present? %>
|
@@ -207,7 +207,7 @@
|
|
207
207
|
:payment_method_id => payment.payment_method_id,
|
208
208
|
:amount => transaction.amount,
|
209
209
|
:currency => transaction.currency,
|
210
|
-
:transaction_type => transaction_type), :class => 'btn btn-
|
210
|
+
:transaction_type => transaction_type), :class => 'btn btn-xs' %>
|
211
211
|
</nobr>
|
212
212
|
<% end %>
|
213
213
|
<% elsif %w(CAPTURE PURCHASE).include?(transaction.transaction_type) %>
|
@@ -218,7 +218,7 @@
|
|
218
218
|
:payment_method_id => payment.payment_method_id,
|
219
219
|
:amount => transaction.amount,
|
220
220
|
:currency => transaction.currency,
|
221
|
-
:transaction_type => transaction_type), :class => 'btn btn-
|
221
|
+
:transaction_type => transaction_type), :class => 'btn btn-xs' %>
|
222
222
|
</nobr>
|
223
223
|
<% end %>
|
224
224
|
<% end %>
|
@@ -318,26 +318,26 @@
|
|
318
318
|
};
|
319
319
|
|
320
320
|
function initTable() {
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
321
|
+
return $("#timeline-table").dataTable({
|
322
|
+
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
323
|
+
"sPaginationType": "bootstrap",
|
324
|
+
"oLanguage": {
|
325
|
+
"sLengthMenu": "_MENU_ records per page"
|
326
|
+
},
|
327
|
+
"iDisplayLength": 100,
|
328
|
+
"bRetrieve": true,
|
329
|
+
// Force a predictive order for event types, invoices and payments
|
330
|
+
"aaSorting": [[1, 'desc'], [4, 'asc'], [3, 'desc']],
|
331
|
+
"aoColumns": [
|
332
|
+
{ "sType": 'date' },
|
333
|
+
{ "sType": 'date' },
|
334
|
+
null,
|
335
|
+
{ "sType": 'timeline-event' },
|
336
|
+
{ "sType": 'timeline-details' },
|
337
|
+
null,
|
338
|
+
null
|
339
|
+
]
|
340
|
+
});
|
341
341
|
}
|
342
342
|
|
343
343
|
function filterEachNode(rows) {
|
@@ -1,115 +1,111 @@
|
|
1
1
|
<%= form_for @account, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
-
<fieldset
|
3
|
-
<div class="
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<%= f.label :is_notified_for_invoices, 'Notified for invoices?', :class => 'control-label' %>
|
110
|
-
<div class="controls">
|
111
|
-
<%= f.check_box :is_notified_for_invoices, :class => 'input-small' %>
|
112
|
-
</div>
|
2
|
+
<fieldset>
|
3
|
+
<div class="control-group">
|
4
|
+
<%= f.label :name, 'Name *', :class => 'control-label' %>
|
5
|
+
<div class="controls">
|
6
|
+
<%= f.text_field :name, :class => 'input-sm', :required => true %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<div class="control-group">
|
10
|
+
<%= f.label :first_name_length, 'First name length', :class => 'control-label' %>
|
11
|
+
<div class="controls">
|
12
|
+
<%= f.text_field :first_name_length, :class => 'input-sm' %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<div class="control-group">
|
16
|
+
<%= f.label :external_key, 'External key *', :class => 'control-label' %>
|
17
|
+
<div class="controls">
|
18
|
+
<%= f.text_field :external_key, :class => 'input-sm', :required => true %>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<div class="control-group">
|
22
|
+
<%= f.label :email, 'Email *', :class => 'control-label' %>
|
23
|
+
<div class="controls">
|
24
|
+
<%= f.text_field :email, :class => 'input-sm', :required => true %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="control-group">
|
28
|
+
<%= f.label :bill_cycle_day_local, 'Bill cycle day', :class => 'control-label' %>
|
29
|
+
<div class="controls">
|
30
|
+
<%= f.text_field :bill_cycle_day_local, :class => 'input-sm' %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<div class="control-group">
|
34
|
+
<%= f.label :currency, 'Currency', :class => 'control-label' %>
|
35
|
+
<div class="controls">
|
36
|
+
<%= f.select :currency, currencies, {}, :class => 'input-sm' %>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div class="control-group">
|
40
|
+
<%= f.label :time_zone, 'Timezone', :class => 'control-label' %>
|
41
|
+
<div class="controls">
|
42
|
+
<%= f.collection_select :time_zone, ActiveSupport::TimeZone.all, :formatted_offset, :to_s, :class => 'input-lg' %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<div class="control-group">
|
46
|
+
<%= f.label :address1, 'Address line 1', :class => 'control-label' %>
|
47
|
+
<div class="controls">
|
48
|
+
<%= f.text_field :address1, :class => 'input-sm' %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<div class="control-group">
|
52
|
+
<%= f.label :address2, 'Address line 2', :class => 'control-label' %>
|
53
|
+
<div class="controls">
|
54
|
+
<%= f.text_field :address2, :class => 'input-sm' %>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
<div class="control-group">
|
58
|
+
<%= f.label :postal_code, 'Zip code', :class => 'control-label' %>
|
59
|
+
<div class="controls">
|
60
|
+
<%= f.text_field :postal_code, :class => 'input-sm' %>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
<div class="control-group">
|
64
|
+
<%= f.label :company, 'Company', :class => 'control-label' %>
|
65
|
+
<div class="controls">
|
66
|
+
<%= f.text_field :company, :class => 'input-sm' %>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
<div class="control-group">
|
70
|
+
<%= f.label :city, 'City', :class => 'control-label' %>
|
71
|
+
<div class="controls">
|
72
|
+
<%= f.text_field :city, :class => 'input-sm' %>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
<div class="control-group">
|
76
|
+
<%= f.label :state, 'State', :class => 'control-label' %>
|
77
|
+
<div class="controls">
|
78
|
+
<%= f.text_field :state, :class => 'input-sm' %>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
<div class="control-group">
|
82
|
+
<%= f.label :country, 'Country', :class => 'control-label' %>
|
83
|
+
<div class="controls">
|
84
|
+
<%= f.country_select :country, {priority: %w(US CA), prompt: 'Please select a country'}, :class => 'input-lg' %>
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
<div class="control-group">
|
88
|
+
<%= f.label :locale, 'Locale', :class => 'control-label' %>
|
89
|
+
<div class="controls">
|
90
|
+
<%= f.text_field :locale, :class => 'input-sm' %>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div class="control-group">
|
94
|
+
<%= f.label :phone, 'Phone', :class => 'control-label' %>
|
95
|
+
<div class="controls">
|
96
|
+
<%= f.text_field :phone, :class => 'input-sm' %>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
<div class="control-group">
|
100
|
+
<%= f.label :is_migrated, 'Migrated?', :class => 'control-label' %>
|
101
|
+
<div class="controls">
|
102
|
+
<%= f.check_box :is_migrated, :class => 'input-sm' %>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
<div class="control-group">
|
106
|
+
<%= f.label :is_notified_for_invoices, 'Notified for invoices?', :class => 'control-label' %>
|
107
|
+
<div class="controls">
|
108
|
+
<%= f.check_box :is_notified_for_invoices, :class => 'input-sm' %>
|
113
109
|
</div>
|
114
110
|
</div>
|
115
111
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<%= javascript_tag do %>
|
22
22
|
$(document).ready(function() {
|
23
23
|
$('#accounts-table').dataTable({
|
24
|
-
"sDom": "<'row
|
24
|
+
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
25
25
|
"sPaginationType": "bootstrap",
|
26
26
|
"bProcessing": true,
|
27
27
|
"bServerSide": true,
|
@@ -57,20 +57,20 @@
|
|
57
57
|
<%= link_to 'Payment',
|
58
58
|
kaui_engine.pay_all_invoices_account_path(@account.account_id),
|
59
59
|
:method => :post,
|
60
|
-
:class => "btn btn-
|
60
|
+
:class => "btn btn-xs #{"disabled" if !@account.account_balance.nil? and @account.account_balance <= 0}" %>
|
61
61
|
</nobr>
|
62
62
|
<% if can? :credit, Kaui::Account %>
|
63
63
|
<nobr>
|
64
64
|
<%= link_to 'Credit',
|
65
65
|
kaui_engine.new_credit_path(:params => {:account_id => @account.account_id}),
|
66
|
-
:class => "btn btn-
|
66
|
+
:class => "btn btn-xs" %>
|
67
67
|
</nobr>
|
68
68
|
<% end %>
|
69
69
|
<% if can? :charge, Kaui::Account %>
|
70
70
|
<nobr>
|
71
71
|
<%= link_to 'Charge',
|
72
72
|
kaui_engine.new_charge_path(:params => {:account_id => @account.account_id}),
|
73
|
-
:class => "btn btn-
|
73
|
+
:class => "btn btn-xs" %>
|
74
74
|
</nobr>
|
75
75
|
<% end %>
|
76
76
|
</dd>
|
@@ -86,18 +86,18 @@
|
|
86
86
|
<% end %>
|
87
87
|
</dd>
|
88
88
|
<dt>Notified for inv?</dt>
|
89
|
-
<dd><%= @account.is_notified_for_invoices %> <%= link_to "Toggle", kaui_engine.toggle_email_notifications_account_path(@account.account_id, :is_notified => !@account.is_notified_for_invoices), :method => :post, :class => 'btn btn-
|
89
|
+
<dd><%= @account.is_notified_for_invoices %> <%= link_to "Toggle", kaui_engine.toggle_email_notifications_account_path(@account.account_id, :is_notified => !@account.is_notified_for_invoices), :method => :post, :class => 'btn btn-xs' %></dd>
|
90
90
|
<%= render :partial => "kaui/tags/tags_table",
|
91
91
|
:locals => {:tags => @tags, :tags_url_or_path => kaui_engine.edit_account_tags_path(:params => {:account_id => @account.account_id}), :tags_show_path => kaui_engine.account_tags_path(:account_id => @account.account_id)} %>
|
92
92
|
<%= render :partial => "kaui/account_emails/account_emails_table",
|
93
93
|
:locals => {:account_emails => @account_emails, :account_id => @account.account_id} %>
|
94
94
|
<dt>New base subscription:</dt>
|
95
|
-
<dd><%= link_to "Create", kaui_engine.new_subscription_path(:params => {:account_id => @account.account_id, :product_category => "BASE"}), :class => "btn btn-
|
95
|
+
<dd><%= link_to "Create", kaui_engine.new_subscription_path(:params => {:account_id => @account.account_id, :product_category => "BASE"}), :class => "btn btn-xs" %></dd>
|
96
96
|
</dl>
|
97
97
|
<% if @payment_methods.present? %>
|
98
98
|
<%= render :partial => "kaui/payment_methods/payment_methods_table", :locals => {:account_id => @account.account_id, :payment_methods => @payment_methods} %>
|
99
99
|
<% end %>
|
100
|
-
<%= link_to "Add payment method", kaui_engine.new_payment_method_path(:account_id => @account.account_id), :class => "btn btn-
|
100
|
+
<%= link_to "Add payment method", kaui_engine.new_payment_method_path(:account_id => @account.account_id), :class => "btn btn-xs" %>
|
101
101
|
<% @bundles.each do |bundle| %>
|
102
102
|
<% subs = @subscriptions_by_bundle_id[bundle.bundle_id] %>
|
103
103
|
<% if subs.present? %>
|
@@ -4,13 +4,13 @@
|
|
4
4
|
<div class="control-group">
|
5
5
|
<%= f.label :kb_username, 'Name', :class => 'control-label' %>
|
6
6
|
<div class="controls">
|
7
|
-
<%= f.text_field :kb_username, :class => 'input-
|
7
|
+
<%= f.text_field :kb_username, :class => 'input-sm', :required => true %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="control-group">
|
11
11
|
<%= f.label :description, 'Description', :class => 'control-label' %>
|
12
12
|
<div class="controls">
|
13
|
-
<%= f.text_field :description, :class => 'input-
|
13
|
+
<%= f.text_field :description, :class => 'input-sm', :required => false %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<div class="form-actions">
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="control-group">
|
6
6
|
<%= f.label :name, 'Name', :class => 'control-label' %>
|
7
7
|
<div class="controls">
|
8
|
-
<%= f.text_field :name, :class => 'input-
|
8
|
+
<%= f.text_field :name, :class => 'input-sm', :required => true %>
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
|
@@ -13,14 +13,14 @@
|
|
13
13
|
<div class="control-group">
|
14
14
|
<%= f.label :api_key, 'API Key', :class => 'control-label' %>
|
15
15
|
<div class="controls">
|
16
|
-
<%= f.text_field :api_key, :class => 'input-
|
16
|
+
<%= f.text_field :api_key, :class => 'input-sm', :required => true %>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
19
|
|
20
20
|
<div class="control-group">
|
21
21
|
<%= f.label :api_secret, 'API Secret', :class => 'control-label' %>
|
22
22
|
<div class="controls">
|
23
|
-
<%= f.password_field :api_secret, :class => 'input-
|
23
|
+
<%= f.password_field :api_secret, :class => 'input-sm', :required => true %>
|
24
24
|
</div>
|
25
25
|
</div>
|
26
26
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%= javascript_tag do %>
|
20
20
|
$(document).ready(function() {
|
21
21
|
$('#bundles-table').dataTable({
|
22
|
-
"sDom": "<'row
|
22
|
+
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
23
23
|
"sPaginationType": "bootstrap",
|
24
24
|
"bProcessing": true,
|
25
25
|
"bServerSide": true,
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<dt>Bundle key:</dt>
|
8
8
|
<dd>
|
9
9
|
<%= @bundle.external_key %>
|
10
|
-
<%= link_to 'Transfer Ownership', kaui_engine.transfer_bundle_path(@bundle.bundle_id), :class => 'btn btn-
|
10
|
+
<%= link_to 'Transfer Ownership', kaui_engine.transfer_bundle_path(@bundle.bundle_id), :class => 'btn btn-xs' %>
|
11
11
|
</dd>
|
12
12
|
<%= render :partial => 'kaui/tags/tags_table',
|
13
13
|
:locals => {:tags => @tags, :tags_url_or_path => kaui_engine.edit_bundle_tags_path(:params => {:bundle_id => @bundle.bundle_id}), :tags_show_path => kaui_engine.bundle_tags_path(:bundle_id => @bundle.bundle_id)} %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="control-group">
|
6
6
|
<%= f.label :amount, 'Chargeback amount', :class => 'control-label' %>
|
7
7
|
<div class="controls">
|
8
|
-
<%= f.text_field :amount, :id => 'chargeback_amount', :class => 'input-
|
8
|
+
<%= f.text_field :amount, :id => 'chargeback_amount', :class => 'input-sm' %>
|
9
9
|
<p class="help-inline"><%= @chargeback.currency %></p>
|
10
10
|
</div>
|
11
11
|
</div>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div class="control-group">
|
33
33
|
<%= f.label :amount, 'Charge amount', :class => 'control-label' %>
|
34
34
|
<div class="controls">
|
35
|
-
<%= f.text_field :amount, :id => 'charge_amount', :class => 'input-
|
35
|
+
<%= f.text_field :amount, :id => 'charge_amount', :class => 'input-sm' %>
|
36
36
|
<% if @invoice.present? %>
|
37
37
|
<p class="help-inline"><%= @invoice.currency %></p>
|
38
38
|
<% end %>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<div class="control-group">
|
43
43
|
<%= f.label :currency, 'Currency', :class => 'control-label' %>
|
44
44
|
<div class="controls">
|
45
|
-
<%= f.select :currency, currencies, {}, :class => 'input-
|
45
|
+
<%= f.select :currency, currencies, {}, :class => 'input-sm' %>
|
46
46
|
</div>
|
47
47
|
</div>
|
48
48
|
<% end %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div class="control-group">
|
33
33
|
<%= f.label :credit_amount, 'Credit amount', :class => 'control-label' %>
|
34
34
|
<div class="controls">
|
35
|
-
<%= f.text_field :credit_amount, :id => 'credit_amount', :class => 'input-
|
35
|
+
<%= f.text_field :credit_amount, :id => 'credit_amount', :class => 'input-sm' %>
|
36
36
|
<% if @invoice.present? %>
|
37
37
|
<p class="help-inline"><%= @invoice.currency %></p>
|
38
38
|
<% end %>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<div class="control-group">
|
43
43
|
<%= label_tag :currency, 'Currency', :class => 'control-label' %>
|
44
44
|
<div class="controls">
|
45
|
-
<%= select_tag :currency, options_for_select(currencies, :selected => 'USD'), :class => 'input-
|
45
|
+
<%= select_tag :currency, options_for_select(currencies, :selected => 'USD'), :class => 'input-sm' %>
|
46
46
|
</div>
|
47
47
|
</div>
|
48
48
|
<% end %>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<%= javascript_tag do %>
|
19
19
|
$(document).ready(function() {
|
20
20
|
$('#custom_fields-table').dataTable({
|
21
|
-
"sDom": "<'row
|
21
|
+
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
22
22
|
"sPaginationType": "bootstrap",
|
23
23
|
"bProcessing": true,
|
24
24
|
"bServerSide": true,
|
@@ -69,7 +69,7 @@
|
|
69
69
|
<div class="control-group">
|
70
70
|
<%= f.label :amount, 'Item amount', :class => 'control-label' %>
|
71
71
|
<div class="controls">
|
72
|
-
<%= f.text_field :amount, :class => 'input-
|
72
|
+
<%= f.text_field :amount, :class => 'input-sm' %>
|
73
73
|
<p class="help-inline"><%= @invoice_item.currency %></p>
|
74
74
|
</div>
|
75
75
|
</div>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<%= javascript_tag do %>
|
21
21
|
$(document).ready(function() {
|
22
22
|
$('#invoices-table').dataTable({
|
23
|
-
"sDom": "<'row
|
23
|
+
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
24
24
|
"sPaginationType": "bootstrap",
|
25
25
|
"bProcessing": true,
|
26
26
|
"bServerSide": true,
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<nobr>
|
67
67
|
<%= link_to "Adjust",
|
68
68
|
kaui_engine.edit_invoice_item_path(item.invoice_item_id, :invoice_id => @invoice.invoice_id),
|
69
|
-
:class => "btn btn-
|
69
|
+
:class => "btn btn-xs #{"disabled" unless item.amount > 0 and item.subscription_id.present?}" %>
|
70
70
|
</nobr>
|
71
71
|
<% end %>
|
72
72
|
<nobr>
|
@@ -74,7 +74,7 @@
|
|
74
74
|
kaui_engine.invoice_item_path(item.invoice_item_id, :account_id => @invoice.account_id, :invoice_id => @invoice.invoice_id),
|
75
75
|
:confirm => 'Are you sure?',
|
76
76
|
:method => :delete,
|
77
|
-
:class => "btn btn-
|
77
|
+
:class => "btn btn-xs #{"disabled" unless item.description =~ /account credit/ and item.amount > 0 and item.linked_invoice_item_id.nil? and !@cba_items_not_deleteable.include?(item.invoice_item_id) and @invoice.balance - item.amount >= 0}" %>
|
78
78
|
</nobr>
|
79
79
|
</td>
|
80
80
|
</tr>
|