mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Added sandbox to settings
This commit is contained in:
@@ -72,6 +72,10 @@ module QuickbooksOauth
|
|||||||
oauth_consumer_key = Setting.plugin_redmine_qbo['settingsOAuthConsumerKey']
|
oauth_consumer_key = Setting.plugin_redmine_qbo['settingsOAuthConsumerKey']
|
||||||
oauth_consumer_secret = Setting.plugin_redmine_qbo['settingsOAuthConsumerSecret']
|
oauth_consumer_secret = Setting.plugin_redmine_qbo['settingsOAuthConsumerSecret']
|
||||||
|
|
||||||
|
# Are we are playing in the sandbox?
|
||||||
|
Quickbooks.sandbox_mode = Setting.plugin_redmine_qbo['sandbox'] ? true : false
|
||||||
|
logger.info "Sandbox mode: #{Quickbooks.sandbox_mode}"
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
site: "https://appcenter.intuit.com/connect/oauth2",
|
site: "https://appcenter.intuit.com/connect/oauth2",
|
||||||
authorize_url: "https://appcenter.intuit.com/connect/oauth2",
|
authorize_url: "https://appcenter.intuit.com/connect/oauth2",
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><%=t(:label_sandbox)%></th>
|
||||||
|
<td>
|
||||||
|
<%= check_box_tag 'settings[sandbox]', @settings['sandbox'], @settings['sandbox'] %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><%=t(:label_oauth_expires)%></th>
|
<th><%=t(:label_oauth_expires)%></th>
|
||||||
<td><%= if Qbo.exists? then Qbo.first.oauth2_access_token_expires_at end %>
|
<td><%= if Qbo.exists? then Qbo.first.oauth2_access_token_expires_at end %>
|
||||||
|
|||||||
@@ -93,3 +93,4 @@ en:
|
|||||||
label_actions: "Actions"
|
label_actions: "Actions"
|
||||||
label_create_estimate: "Create Estimate"
|
label_create_estimate: "Create Estimate"
|
||||||
label_syncing: "Syncing Quickbooks"
|
label_syncing: "Syncing Quickbooks"
|
||||||
|
label_sandbox: "Sandbox"
|
||||||
|
|||||||
3
init.rb
3
init.rb
@@ -39,9 +39,6 @@ Redmine::Plugin.register :redmine_qbo do
|
|||||||
Project.safe_attributes 'customer_id'
|
Project.safe_attributes 'customer_id'
|
||||||
Project.safe_attributes 'vehicle_id'
|
Project.safe_attributes 'vehicle_id'
|
||||||
|
|
||||||
# We are playing in the sandbox
|
|
||||||
#Quickbooks.sandbox_mode = true
|
|
||||||
|
|
||||||
# set per_page globally
|
# set per_page globally
|
||||||
WillPaginate.per_page = 20
|
WillPaginate.per_page = 20
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user