Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions app/assets/javascripts/app/activity/cashOuts/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<ul class="breadcrumb">
<li><a href="/">Home</a></li>
<li><a href="/activity">Activity</a></li>
<li class="active"><a href="/activity/account">Account</a></li>
<li><a href="/activity/account">Account</a></li>
</ul>

<ng-include src="'app/activity/templates/navTabs.html'"></ng-include>

<div ng-show="sources.length == 0">
<div>
<div class="alert alert-danger">
<h3 style="margin-top: 0">Invalid Cash Out Request</h3>
<p>You do not have any eligible cash outs. If you think this is a mistake, please email <a href="mailto:support@bountysource.com">support@bountysource.com</a></p>
</div>
Expand Down Expand Up @@ -137,7 +137,7 @@ <h3 style="margin-top: 0">Invalid Cash Out Request</h3>
</div>

<!-- Payment method -->
<div class="form-group" ng-controller="NewCashOutPaymentMethodController" ng-if=false>
<div class="form-group" ng-controller="NewCashOutPaymentMethodController">
<label class="control-label col-sm-3">Payment Method</label>
<div class="col-sm-9">

Expand All @@ -158,9 +158,7 @@ <h3 style="margin-top: 0">Invalid Cash Out Request</h3>
<div class="col-sm-12">
<div class="radio">
<label>
<input type="radio" ng-model="cashOut.type" ng-value="'bitcoin'" ng-disabled="!BS_ENV.coinbase_enabled" />
<span ng-if="BS_ENV.coinbase_enabled">Bitcoin</span>
<span ng-if="!BS_ENV.coinbase_enabled" style="color: #888">Bitcoin (temporarily disabled)</span>
<input type="radio" ng-model="cashOut.type" ng-value="'bitcoin'" /> Bitcoin
</label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/app/activity/cashOuts/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ angular.module('activity').
$scope.activeTemplate = $scope.templates[$scope.activeTemplateIndex];

$scope.cashOut = {
type: 'paypal',
type: undefined,
amount: undefined,
paypal_address: undefined,
bitcoin_address: undefined,
Expand Down
211 changes: 100 additions & 111 deletions app/assets/javascripts/app/cart/cart.html.erb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions app/assets/javascripts/salt/teams/admin/updates/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2>Community Updates</h2>

<div>
<div class="alert alert-info">
<p>We recommend sending an update once a month. Include any accomplishments from the previous month as well as goals for the coming month.</p>
<p><button class="btn btn-light-blue btn-rounded btn-lg btn-long mt-3" ui-sref="root.teams.admin.updates.new({ slug: team.slug })">Email Your Community</button></p>
<p><button class="btn btn-primary" ui-sref="root.teams.admin.updates.new({ slug: team.slug })">Email Your Community</button></p>
</div>

<table ng-show="updates.length > 0" class="table mt-5">
<table ng-show="updates.length > 0" class="table">
<thead>
<tr>
<th>Published</th>
Expand Down
24 changes: 12 additions & 12 deletions app/assets/javascripts/salt/teams/admin/updates/new.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<h3>Email Your Community</h3>
<h2>Email Your Community</h2>
<p>Sending updates on a monthly basis is a great way to keep your community engaged.</p>

<form name="form" style="margin-top:30px">
<div class="alert alert-danger" ng-show="error">{{error}}</div>

<p>Email Lists</p>
<div><strong>Email Lists</strong></div>
<div class="checkbox">
<label class="control-label">
<label>
<input type="checkbox" name="mailing_lists[]" ng-checked="form_data.mailing_lists.indexOf('bountysource') > -1" ng-click="toggle_mailing_list(form, 'bountysource')">
{{team.name}} users on Bountysource <span ng-show="mailing_lists.bountysource_users > 0">({{mailing_lists.bountysource_users | number}})</span>
</label>
</div>
<div class="checkbox" ng-show="team.can_email_stargazers">
<label class="control-label">
<label>
<input type="checkbox" name="mailing_lists[]" ng-checked="form_data.mailing_lists.indexOf('github') > -1" ng-click="toggle_mailing_list(form, 'github')">
{{team.name}} users on GitHub <span ng-show="mailing_lists.github_users > 0">({{mailing_lists.github_users | number}})</span>
</label>
Expand All @@ -27,23 +27,23 @@ <h4>Emailing Users on GitHub</h4>
<div class="form-group">
<div class="row">
<div class="col-md-6">
<label class="control-label" for="title">Subject</label>
<input type="text" class="form-control input-medium" id="title" ng-model="form_data.title" placeholder="Title (also used for email subject)" />
<label for="title">Subject</label>
<input type="text" class="form-control" id="title" ng-model="form_data.title" placeholder="Title (also used for email subject)" />
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div ng-class="{ 'col-md-12': !markdown_side_by_side, 'col-md-6': markdown_side_by_side }">
<label class="control-label" for="body_markdown">Body Markdown</label>
<textarea msd-elastic class="form-control input-medium" id="body_markdown" ng-model="form_data.body" placeholder="In June, we accomplished... In July, we hope to accompish..." style="min-height:100px"></textarea>
<label for="body_markdown">Body Markdown</label>
<textarea msd-elastic class="form-control" id="body_markdown" ng-model="form_data.body" placeholder="In June, we accomplished... In July, we hope to accompish..." style="min-height:100px"></textarea>
</div>
<div ng-class="{ 'col-md-12': !markdown_side_by_side, 'col-md-6': markdown_side_by_side, 'markdown-top-margin': !markdown_side_by_side }">
<a class="pull-right" ng-click="markdown_side_by_side=!markdown_side_by_side">
<span class="glyphicon glyphicon-resize-small" ng-show="!markdown_side_by_side"></span>
<span class="glyphicon glyphicon-resize-full" ng-show="markdown_side_by_side"></span>
</a>
<label class="control-label">Preview</label>
<label>Preview</label>
<target-blank model="markdown_preview">
<div btf-markdown="markdown_preview" class="well markdown markdown-small-headers" style="min-height:100px; margin-bottom: 0"></div>
</target-blank>
Expand All @@ -52,13 +52,13 @@ <h4>Emailing Users on GitHub</h4>
</div>

<div class="form-group">
<button type="submit" class="btn btn-success btn-rounded btn-long" ng-disabled="saving_form || form.$pristine || !form_data.title || !form_data.body" ng-click="submit_form(form, {})">
<button type="submit" class="btn btn-success" ng-disabled="saving_form || form.$pristine || !form_data.title || !form_data.body" ng-click="submit_form(form, {})">
<span ng-show="saving_form">Saving...</span>
<span ng-show="!saving_form && form.$pristine">Saved</span>
<span ng-show="!saving_form && !form.$pristine">Save Draft</span>
</button>
<button type="submit" class="btn btn-light-blue btn-rounded btn-long" ng-disabled="saving_form || !form_data.title || !form_data.body" ng-click="submit_form(form, { email_me: true })">Test Email to Just Me</button>
<button type="submit" class="btn btn-danger btn-rounded btn-long" ng-disabled="saving_form || !form_data.title || !form_data.body" ng-click="submit_form(form, { publish: true })">Publish to Everyone</button>
<button type="submit" class="btn btn-primary" ng-disabled="saving_form || !form_data.title || !form_data.body" ng-click="submit_form(form, { email_me: true })">Test Email to Just Me</button>
<button type="submit" class="btn btn-danger" ng-disabled="saving_form || !form_data.title || !form_data.body" ng-click="submit_form(form, { publish: true })">Publish to Everyone</button>

</div>

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/api/v2/cart_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def checkout

# Render the JSON to trigger a Coinbase payment modal
elsif @checkout_method.is_a?(Account::Coinbase)
raise "Coinbase is disabled" if ENV['COINBASE_DISABLED']

options = {
cancel_url: params[:cancel_url],
currency: params[:currency] || 'USD'
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/api/v2/cash_outs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ def show
end

def create
raise "Coinbase is disabled" if params[:bitcoin_address] && ENV['COINBASE_DISABLED']
raise "Checks are disabled" if params[:mailing_address_id]

if team_id = params[:source].try(:match, /\Ateam(\d+)\Z/).try(:[], 1)
account = current_user.team_member_relations.where(admin: true, team_id: team_id).first.try(:team).try(:account)
else
Expand Down
3 changes: 1 addition & 2 deletions app/views/layouts/_env.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
stripe_key: '<%=ENV['STRIPE_PUBLIC_KEY']%>',
stripe_image: 'https://s3.amazonaws.com/stripe-uploads/acct_15jcQ4LM04M7PZLcmerchant-icon-1427143578024-Bountysource-square-100.png',
bountysource_grey_image: '<%=asset_path("bountysource-grey.png")%>',
bountysource_anon_image: '<%=asset_path("anon.jpg")%>',
coinbase_enabled: <%=!ENV['COINBASE_DISABLED']%>
bountysource_anon_image: '<%=asset_path("anon.jpg")%>'
};
</script>
5 changes: 4 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
module Api
class Application < Rails::Application


# All times should be in UTC
ENV['TZ'] = 'UTC'
config.time_zone = 'UTC'
Expand Down Expand Up @@ -124,7 +125,9 @@ class Application < Rails::Application
api_key: ENV['COINBASE_API_KEY'],
api_secret: ENV['COINBASE_API_SECRET'],
callback_url: "#{config.api_url}payments/coinbase/callback"
}
}
ENV['COINBASE_DISABLED'] = 'true'
config.coinbase_enabled = !ENV['COINBASE_DISABLED']

# GitHub App
config.github_api = {
Expand Down