Initial Spark Install
This commit is contained in:
13
spark/resources/views/settings/api.blade.php
Normal file
13
spark/resources/views/settings/api.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<spark-api inline-template>
|
||||
<div>
|
||||
<!-- Create API Token -->
|
||||
<div>
|
||||
@include('spark::settings.api.create-token')
|
||||
</div>
|
||||
|
||||
<!-- API Tokens -->
|
||||
<div>
|
||||
@include('spark::settings.api.tokens')
|
||||
</div>
|
||||
</div>
|
||||
</spark-api>
|
112
spark/resources/views/settings/api/create-token.blade.php
Normal file
112
spark/resources/views/settings/api/create-token.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<spark-create-token :available-abilities="availableAbilities" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Create API Token
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Token Name -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('name')}">
|
||||
<label class="col-md-4 control-label">Token Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" v-model="form.name">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('name')">
|
||||
@{{ form.errors.get('name') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mass Ability Assignment / Removal -->
|
||||
<div class="form-group" v-if="availableAbilities.length > 0">
|
||||
<label class="col-md-4 control-label"> </label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<button class="btn btn-default" @click.prevent="assignAllAbilities" v-if=" ! allAbilitiesAssigned">
|
||||
<i class="fa fa-btn fa-check"></i>Assign All Abilities
|
||||
</button>
|
||||
|
||||
<button class="btn btn-default" @click.prevent="removeAllAbilities" v-if="allAbilitiesAssigned">
|
||||
<i class="fa fa-btn fa-times"></i>Remove All Abilities
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Token Abilities -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('abilities')}" v-if="availableAbilities.length > 0">
|
||||
<label class="col-md-4 control-label">Token Can</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div v-for="ability in availableAbilities">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"
|
||||
@click="toggleAbility(ability.value)"
|
||||
:checked="abilityIsAssigned(ability.value)">
|
||||
|
||||
@{{ ability.name }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('abilities')">
|
||||
@{{ form.errors.get('abilities') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Create Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="create"
|
||||
:disabled="form.busy">
|
||||
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Show Token Modal -->
|
||||
<div class="modal fade" id="modal-show-token" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="showingToken">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
API Token
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
Here is your new API token. <strong>This is the only time the token will ever
|
||||
be displayed, so be sure not to lose it!</strong> You may revoke the token
|
||||
at any time from your API settings.
|
||||
</div>
|
||||
|
||||
<textarea id="api-token" class="form-control"
|
||||
@click="selectToken"
|
||||
rows="5">@{{ showingToken }}</textarea>
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" @click="selectToken">
|
||||
<span v-if="copyCommandSupported">Copy To Clipboard</span>
|
||||
<span v-else>Select All</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-create-token>
|
152
spark/resources/views/settings/api/tokens.blade.php
Normal file
152
spark/resources/views/settings/api/tokens.blade.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<spark-tokens :tokens="tokens" :available-abilities="availableAbilities" inline-template>
|
||||
<div>
|
||||
<div>
|
||||
<div class="panel panel-default" v-if="tokens.length > 0">
|
||||
<div class="panel-heading">API Tokens</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Last Used</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr v-for="token in tokens">
|
||||
<!-- Name -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
@{{ token.name }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Last Used At -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
<span v-if="token.last_used_at">
|
||||
@{{ token.last_used_at | datetime }}
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Never
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Edit Button -->
|
||||
<td>
|
||||
<button class="btn btn-primary" @click="editToken(token)">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<!-- Delete Button -->
|
||||
<td>
|
||||
<button class="btn btn-danger-outline" @click="approveTokenDelete(token)">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Token Modal -->
|
||||
<div class="modal fade" id="modal-update-token" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="updatingToken">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Edit Token (@{{ updatingToken.name }})
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- Update Token Form -->
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Token Name -->
|
||||
<div class="form-group" :class="{'has-error': updateTokenForm.errors.has('name')}">
|
||||
<label class="col-md-4 control-label">Token Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" v-model="updateTokenForm.name">
|
||||
|
||||
<span class="help-block" v-show="updateTokenForm.errors.has('name')">
|
||||
@{{ updateTokenForm.errors.get('name') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Token Abilities -->
|
||||
<div class="form-group" :class="{'has-error': updateTokenForm.errors.has('abilities')}" v-if="availableAbilities.length > 0">
|
||||
<label class="col-md-4 control-label">Token Can</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div v-for="ability in availableAbilities">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox"
|
||||
@click="toggleAbility(ability.value)"
|
||||
:checked="abilityIsAssigned(ability.value)">
|
||||
|
||||
@{{ ability.name }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="help-block" v-show="updateTokenForm.errors.has('abilities')">
|
||||
@{{ updateTokenForm.errors.get('abilities') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
|
||||
<button type="button" class="btn btn-primary" @click="updateToken" :disabled="updateTokenForm.busy">
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Token Modal -->
|
||||
<div class="modal fade" id="modal-delete-token" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="deletingToken">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Delete Token (@{{ deletingToken.name }})
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
Are you sure you want to delete this token? If deleted, API requests that attempt to
|
||||
authenticate using this token will no longer be accepted.
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No, Go Back</button>
|
||||
|
||||
<button type="button" class="btn btn-danger" @click="deleteToken" :disabled="deleteTokenForm.busy">
|
||||
Yes, Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-tokens>
|
13
spark/resources/views/settings/invoices.blade.php
Normal file
13
spark/resources/views/settings/invoices.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<spark-invoices :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
<!-- Update Extra Billing Information -->
|
||||
<div v-if="billable">
|
||||
@include('spark::settings.invoices.update-extra-billing-information')
|
||||
</div>
|
||||
|
||||
<!-- Invoice List -->
|
||||
<div v-if="invoices.length > 0">
|
||||
@include('spark::settings.invoices.invoice-list')
|
||||
</div>
|
||||
</div>
|
||||
</spark-invoices>
|
@@ -0,0 +1,19 @@
|
||||
@if ($billable instanceof Laravel\Spark\Team)
|
||||
Hi {{ $billable->name }}!
|
||||
@else
|
||||
Hi {{ explode(' ', $billable->name)[0] }}!
|
||||
@endif
|
||||
|
||||
<br><br>
|
||||
|
||||
Thanks for your continued support. We've attached a copy of your invoice for your records.
|
||||
Please let us know if you have any questions or concerns!
|
||||
|
||||
<br><br>
|
||||
|
||||
Thanks!
|
||||
|
||||
<br>
|
||||
|
||||
{{ $invoiceData['product'] }}
|
||||
|
@@ -0,0 +1,38 @@
|
||||
<spark-invoice-list :user="user" :team="team"
|
||||
:invoices="invoices" :billable-type="billableType" inline-template>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Invoices</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="invoice in invoices">
|
||||
<!-- Invoice Date -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
<strong>@{{ invoice.created_at | date }}</strong>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Invoice Total -->
|
||||
<td>
|
||||
<div class="btn-table-align">@{{ invoice.total | currency }}</div>
|
||||
</td>
|
||||
|
||||
<!-- Invoice Download Button -->
|
||||
<td class="text-right">
|
||||
<a :href="downloadUrlFor(invoice)">
|
||||
<button class="btn btn-default">
|
||||
<i class="fa fa-btn fa-file-pdf-o"></i>Download PDF
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</spark-invoice-list>
|
@@ -0,0 +1,41 @@
|
||||
<spark-update-extra-billing-information :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Extra Billing Information</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Information Message -->
|
||||
<div class="alert alert-info">
|
||||
This information will appear on all of your receipts, and is a great place to add your full
|
||||
business name, VAT number, or address of record. Do not include any confidential or
|
||||
financial information such as credit card numbers.
|
||||
</div>
|
||||
|
||||
<!-- Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your billing information has been updated!
|
||||
</div>
|
||||
|
||||
<!-- Extra Billing Information -->
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('information')}">
|
||||
<div class="col-md-12">
|
||||
<textarea class="form-control" rows="7" v-model="form.information" style="font-family: monospace;"></textarea>
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('information')">
|
||||
@{{ form.errors.get('information') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group m-b-none">
|
||||
<div class="col-md-offset-4 col-md-8 text-right">
|
||||
<button type="submit" class="btn btn-primary" @click.prevent="update" :disabled="form.busy">
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-extra-billing-information>
|
@@ -0,0 +1,23 @@
|
||||
<spark-payment-method-braintree :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
<!-- Current Discount -->
|
||||
<div class="panel panel-success" v-if="currentDiscount">
|
||||
<div class="panel-heading">Current Discount</div>
|
||||
|
||||
<div class="panel-body">
|
||||
You currently receive a discount of @{{ formattedDiscount(currentDiscount) }}
|
||||
for @{{ formattedDiscountDuration(currentDiscount) }}.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Card -->
|
||||
@include('spark::settings.payment-method.update-payment-method-braintree')
|
||||
|
||||
<div>
|
||||
<div v-if="billable.current_billing_plan">
|
||||
<!-- Redeem Coupon -->
|
||||
@include('spark::settings.payment-method.redeem-coupon')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-payment-method-braintree>
|
@@ -0,0 +1,28 @@
|
||||
<spark-payment-method-stripe :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
<!-- Current Discount -->
|
||||
<div class="panel panel-success" v-if="currentDiscount">
|
||||
<div class="panel-heading">Current Discount</div>
|
||||
|
||||
<div class="panel-body">
|
||||
You currently receive a discount of @{{ formattedDiscount(currentDiscount) }}
|
||||
for @{{ formattedDiscountDuration(currentDiscount) }}.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update VAT ID -->
|
||||
@if (Spark::collectsEuropeanVat())
|
||||
@include('spark::settings.payment-method.update-vat-id')
|
||||
@endif
|
||||
|
||||
<!-- Update Card -->
|
||||
@include('spark::settings.payment-method.update-payment-method-stripe')
|
||||
|
||||
<div>
|
||||
<div v-if="billable.stripe_id">
|
||||
<!-- Redeem Coupon -->
|
||||
@include('spark::settings.payment-method.redeem-coupon')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-payment-method-stripe>
|
5
spark/resources/views/settings/payment-method.blade.php
Normal file
5
spark/resources/views/settings/payment-method.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
@if (Spark::billsUsingStripe())
|
||||
@include('spark::settings.payment-method-stripe')
|
||||
@else
|
||||
@include('spark::settings.payment-method-braintree')
|
||||
@endif
|
@@ -0,0 +1,44 @@
|
||||
<spark-redeem-coupon :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Redeem Coupon</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Coupon accepted! The discount will be applied to your next invoice.
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Coupon Code -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('coupon')}">
|
||||
<label class="col-md-4 control-label">Coupon Code</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="coupon" v-model="form.coupon">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('coupon')">
|
||||
@{{ form.errors.get('coupon') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Redeem Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="redeem"
|
||||
:disabled="form.busy">
|
||||
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Redeeming
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Redeem
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-redeem-coupon>
|
@@ -0,0 +1,78 @@
|
||||
<!-- Address -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('address')}">
|
||||
<label class="col-md-4 control-label">Address</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.address">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('address')">
|
||||
@{{ form.errors.get('address') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Address Line 2 -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('address_line_2')}">
|
||||
<label class="col-md-4 control-label">Address Line 2</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.address_line_2">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('address_line_2')">
|
||||
@{{ form.errors.get('address_line_2') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- City -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('city')}">
|
||||
<label class="col-md-4 control-label">City</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.city">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('city')">
|
||||
@{{ form.errors.get('city') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- State & ZIP Code -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('state')}">
|
||||
<label class="col-md-4 control-label">State & ZIP / Postal Code</label>
|
||||
|
||||
<!-- State -->
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" v-model="form.state" placeholder="State">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('state')">
|
||||
@{{ form.errors.get('state') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Zip Code -->
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" v-model="form.zip" placeholder="Postal Code">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('zip')">
|
||||
@{{ form.errors.get('zip') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Country -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('country')}">
|
||||
<label class="col-md-4 control-label">Country</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" v-model="form.country">
|
||||
@foreach (app(Laravel\Spark\Repositories\Geography\CountryRepository::class)->all() as $key => $country)
|
||||
<option value="{{ $key }}">{{ $country }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('country')">
|
||||
@{{ form.errors.get('country') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,59 @@
|
||||
<spark-update-payment-method-braintree :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<!-- Update Payment Method Heading -->
|
||||
<div class="panel-heading">
|
||||
<div class="pull-left">
|
||||
Update Payment Method
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<!-- Paypal Indicator -->
|
||||
<span v-if="billable.paypal_email">
|
||||
<i class="fa fa-btn fa-paypal"></i>
|
||||
@{{ billable.paypal_email }}
|
||||
</span>
|
||||
|
||||
<!-- Credit Card Indicator -->
|
||||
<span v-if="billable.card_last_four">
|
||||
<i class="['fa', 'fa-btn', cardIcon]"></i>
|
||||
************@{{ billable.card_last_four }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Payment Method Update Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your payment method has been updated.
|
||||
</div>
|
||||
|
||||
<!-- Generic 500 Level Error Message / Braintree Threw Exception -->
|
||||
<div class="alert alert-danger" v-if="form.errors.has('form')">
|
||||
We had trouble updating your payment method. It's possible your payment provider is preventing
|
||||
us from charging the payment method. Please contact your payment provider or customer support.
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Braintree Container -->
|
||||
<div id="braintree-payment-method-container" class="m-b-md"></div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group m-b-none p-b-none">
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-primary" :disabled="form.busy">
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Updating
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Update
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-payment-method-braintree>
|
@@ -0,0 +1,123 @@
|
||||
<spark-update-payment-method-stripe :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<!-- Update Payment Method Heading -->
|
||||
<div class="panel-heading">
|
||||
<div class="pull-left">
|
||||
Update Payment Method
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<span v-if="billable.card_last_four">
|
||||
<i :class="['fa', 'fa-btn', cardIcon]"></i>
|
||||
************@{{ billable.card_last_four }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Card Update Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your card has been updated.
|
||||
</div>
|
||||
|
||||
<!-- Generic 500 Level Error Message / Stripe Threw Exception -->
|
||||
<div class="alert alert-danger" v-if="form.errors.has('form')">
|
||||
We had trouble updating your card. It's possible your card provider is preventing
|
||||
us from charging the card. Please contact your card provider or customer support.
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Billing Address Fields -->
|
||||
@if (Spark::collectsBillingAddress())
|
||||
<h2><i class="fa fa-btn fa-map-marker"></i>Billing Address</h2>
|
||||
|
||||
@include('spark::settings.payment-method.update-payment-method-address')
|
||||
|
||||
<h2><i class="fa fa-btn fa-credit-card"></i>Credit Card</h2>
|
||||
@endif
|
||||
|
||||
<!-- Cardholder's Name -->
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-md-4 control-label">Cardholder's Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" v-model="cardForm.name">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card Number -->
|
||||
<div class="form-group" :class="{'has-error': cardForm.errors.has('number')}">
|
||||
<label for="number" class="col-md-4 control-label">Card Number</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
data-stripe="number"
|
||||
:placeholder="placeholder"
|
||||
v-model="cardForm.number">
|
||||
|
||||
<span class="help-block" v-show="cardForm.errors.has('number')">
|
||||
@{{ cardForm.errors.get('number') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Security Code -->
|
||||
<div class="form-group">
|
||||
<label for="cvc" class="col-md-4 control-label">Security Code</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" data-stripe="cvc" v-model="cardForm.cvc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Expiration Information -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Expiration</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<!-- Month -->
|
||||
<div class="col-xs-6">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="MM" maxlength="2" data-stripe="exp-month" v-model="cardForm.month">
|
||||
</div>
|
||||
|
||||
<!-- Year -->
|
||||
<div class="col-xs-6">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="YYYY" maxlength="4" data-stripe="exp-year" v-model="cardForm.year">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Zip Code -->
|
||||
<div class="form-group" v-if=" ! spark.collectsBillingAddress">
|
||||
<label for="zip" class="col-md-4 control-label">ZIP / Postal Code</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" v-model="form.zip">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary" @click.prevent="update" :disabled="form.busy">
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Updating
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Update
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-payment-method-stripe>
|
@@ -0,0 +1,45 @@
|
||||
<spark-update-vat-id :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Update VAT ID</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your VAT ID has been updated!
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- VAT ID -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('vat_id')}">
|
||||
<label class="col-md-4 control-label">VAT ID</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="vat_id" v-model="form.vat_id">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('vat_id')">
|
||||
@{{ form.errors.get('vat_id') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="update"
|
||||
:disabled="form.busy">
|
||||
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Updating
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Update
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-vat-id>
|
9
spark/resources/views/settings/profile.blade.php
Normal file
9
spark/resources/views/settings/profile.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<spark-profile :user="user" inline-template>
|
||||
<div>
|
||||
<!-- Update Profile Photo -->
|
||||
@include('spark::settings.profile.update-profile-photo')
|
||||
|
||||
<!-- Update Contact Information -->
|
||||
@include('spark::settings.profile.update-contact-information')
|
||||
</div>
|
||||
</spark-profile>
|
@@ -0,0 +1,52 @@
|
||||
<spark-update-contact-information :user="user" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Contact Information</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your contact information has been updated!
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Name -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('name')}">
|
||||
<label class="col-md-4 control-label">Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" v-model="form.name">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('name')">
|
||||
@{{ form.errors.get('name') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- E-Mail Address -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('email')}">
|
||||
<label class="col-md-4 control-label">E-Mail Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control" name="email" v-model="form.email">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('email')">
|
||||
@{{ form.errors.get('email') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="update"
|
||||
:disabled="form.busy">
|
||||
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-contact-information>
|
@@ -0,0 +1,39 @@
|
||||
<spark-update-profile-photo :user="user" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default" v-if="user">
|
||||
<div class="panel-heading">Profile Photo</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-danger" v-if="form.errors.has('photo')">
|
||||
@{{ form.errors.get('photo') }}
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Photo Preview-->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label"> </label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<span role="img" class="profile-photo-preview"
|
||||
:style="previewStyle">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label"> </label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label type="button" class="btn btn-primary btn-upload" :disabled="form.busy">
|
||||
<span>Select New Photo</span>
|
||||
|
||||
<input ref="photo" type="file" class="form-control" name="photo" @change="update">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-profile-photo>
|
20
spark/resources/views/settings/security.blade.php
Normal file
20
spark/resources/views/settings/security.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<spark-security :user="user" inline-template>
|
||||
<div>
|
||||
<!-- Update Password -->
|
||||
@include('spark::settings.security.update-password')
|
||||
|
||||
<!-- Two-Factor Authentication -->
|
||||
@if (Spark::usesTwoFactorAuth())
|
||||
<div v-if="user && ! user.uses_two_factor_auth">
|
||||
@include('spark::settings.security.enable-two-factor-auth')
|
||||
</div>
|
||||
|
||||
<div v-if="user && user.uses_two_factor_auth">
|
||||
@include('spark::settings.security.disable-two-factor-auth')
|
||||
</div>
|
||||
|
||||
<!-- Two-Factor Reset Code Modal -->
|
||||
@include('spark::settings.security.modals.two-factor-reset-code')
|
||||
@endif
|
||||
</div>
|
||||
</spark-security>
|
@@ -0,0 +1,15 @@
|
||||
<spark-disable-two-factor-auth :user="user" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<button class="btn btn-danger-outline" @click="disable" :disabled="form.busy">
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Disabling
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Disable Two-Factor Authentication
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</spark-disable-two-factor-auth>
|
@@ -0,0 +1,60 @@
|
||||
<spark-enable-two-factor-auth :user="user" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Two-Factor Authentication</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Information Message -->
|
||||
<div class="alert alert-info">
|
||||
In order to use two-factor authentication, you <strong>must</strong> install the
|
||||
<strong><a href="https://authy.com" target="_blank">Authy</a></strong> application
|
||||
on your smartphone. Authy is available for iOS and Android.
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Country Code -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('country_code')}">
|
||||
<label class="col-md-4 control-label">Country Code</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="number" class="form-control" name="country_code" v-model="form.country_code">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('country_code')">
|
||||
@{{ form.errors.get('country_code') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone Number -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('phone')}">
|
||||
<label class="col-md-4 control-label">Phone Number</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="tel" class="form-control" name="phone" v-model="form.phone">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('phone')">
|
||||
@{{ form.errors.get('phone') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Enable Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="enable"
|
||||
:disabled="form.busy">
|
||||
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Enabling
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Enable
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-enable-two-factor-auth>
|
@@ -0,0 +1,29 @@
|
||||
<div class="modal fade" id="modal-show-two-factor-reset-code" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Two-Factor Authentication Reset Code
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
If you lose your two-factor authentication device, you may use this
|
||||
emergency reset token to disable two-factor authentication on your account.
|
||||
<strong>This is the only time this token will be displayed, so be sure not
|
||||
to lose it!</strong>
|
||||
</div>
|
||||
|
||||
<pre><code>@{{ twoFactorResetCode }}</code></pre>
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,65 @@
|
||||
<spark-update-password inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Update Password</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your password has been updated!
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Current Password -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('current_password')}">
|
||||
<label class="col-md-4 control-label">Current Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="current_password" v-model="form.current_password">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('current_password')">
|
||||
@{{ form.errors.get('current_password') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- New Password -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('password')}">
|
||||
<label class="col-md-4 control-label">Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="password" v-model="form.password">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('password')">
|
||||
@{{ form.errors.get('password') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- New Password Confirmation -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('password_confirmation')}">
|
||||
<label class="col-md-4 control-label">Confirm Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" name="password_confirmation" v-model="form.password_confirmation">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('password_confirmation')">
|
||||
@{{ form.errors.get('password_confirmation') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="update"
|
||||
:disabled="form.busy">
|
||||
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-password>
|
31
spark/resources/views/settings/subscription.blade.php
Normal file
31
spark/resources/views/settings/subscription.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<spark-subscription :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
<div v-if="plans.length > 0">
|
||||
<!-- Trial Expiration Notice -->
|
||||
@include('spark::settings.subscription.trial-expiration-notice')
|
||||
|
||||
<!-- New Subscription -->
|
||||
<div v-if="needsSubscription">
|
||||
@include('spark::settings.subscription.subscribe')
|
||||
</div>
|
||||
|
||||
<!-- Update Subscription -->
|
||||
<div v-if="subscriptionIsActive">
|
||||
@include('spark::settings.subscription.update-subscription')
|
||||
</div>
|
||||
|
||||
<!-- Resume Subscription -->
|
||||
<div v-if="subscriptionIsOnGracePeriod">
|
||||
@include('spark::settings.subscription.resume-subscription')
|
||||
</div>
|
||||
|
||||
<!-- Cancel Subscription -->
|
||||
<div v-if="subscriptionIsActive">
|
||||
@include('spark::settings.subscription.cancel-subscription')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Plan Features Modal -->
|
||||
@include('spark::modals.plan-details')
|
||||
</div>
|
||||
</spark-subscription>
|
@@ -0,0 +1,48 @@
|
||||
<spark-cancel-subscription :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<button class="btn btn-danger-outline"
|
||||
@click="confirmCancellation"
|
||||
:disabled="form.busy">
|
||||
|
||||
Cancel Subscription
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Confirm Cancellation Modal -->
|
||||
<div class="modal fade" id="modal-confirm-cancellation" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Cancel Subscription
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
Are you sure you want to cancel your subscription?
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No, Go Back</button>
|
||||
|
||||
<button type="button" class="btn btn-danger" @click="cancel" :disabled="form.busy">
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Cancelling
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Yes, Cancel
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-cancel-subscription>
|
@@ -0,0 +1,111 @@
|
||||
<spark-resume-subscription :user="user" :team="team"
|
||||
:plans="plans" :billable-type="billableType" inline-template>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-left" :class="{'btn-table-align': hasMonthlyAndYearlyPlans}">
|
||||
Resume Subscription
|
||||
</div>
|
||||
|
||||
<!-- Interval Selector Button Group -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" v-if="hasMonthlyAndYearlyPlans">
|
||||
<!-- Monthly Plans -->
|
||||
<button type="button" class="btn btn-default"
|
||||
@click="showMonthlyPlans"
|
||||
:class="{'active': showingMonthlyPlans}">
|
||||
|
||||
Monthly
|
||||
</button>
|
||||
|
||||
<!-- Yearly Plans -->
|
||||
<button type="button" class="btn btn-default"
|
||||
@click="showYearlyPlans"
|
||||
:class="{'active': showingYearlyPlans}">
|
||||
|
||||
Yearly
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body table-responsive">
|
||||
<!-- Plan Error Message - In General Will Never Be Shown -->
|
||||
<div class="alert alert-danger" v-if="planForm.errors.has('plan')">
|
||||
@{{ planForm.errors.get('plan') }}
|
||||
</div>
|
||||
|
||||
<!-- Cancellation Information -->
|
||||
<div class="p-b-lg">
|
||||
You have cancelled your subscription to the
|
||||
<strong>@{{ activePlan.name }} (@{{ activePlan.interval | capitalize }})</strong> plan.
|
||||
</div>
|
||||
|
||||
<div class="p-b-lg">
|
||||
The benefits of your subscription will continue until your current billing period ends on
|
||||
<strong>@{{ activeSubscription.ends_at | date }}</strong>. You may resume your subscription at no
|
||||
extra cost until the end of the billing period.
|
||||
</div>
|
||||
|
||||
<!-- European VAT Notice -->
|
||||
@if (Spark::collectsEuropeanVat())
|
||||
<p class="p-b-lg">
|
||||
All subscription plan prices include applicable VAT.
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead></thead>
|
||||
<tbody>
|
||||
<tr v-for="plan in paidPlansForActiveInterval">
|
||||
<!-- Plan Name -->
|
||||
<td>
|
||||
<div class="btn-table-align" @click="showPlanDetails(plan)">
|
||||
<span style="cursor: pointer;">
|
||||
<strong>@{{ plan.name }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Plan Features Button -->
|
||||
<td>
|
||||
<button class="btn btn-default m-l-sm" @click="showPlanDetails(plan)">
|
||||
<i class="fa fa-btn fa-star-o"></i>Plan Features
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<!-- Plan Price -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
@{{ priceWithTax(plan) | currency }} / @{{ plan.interval | capitalize }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Plan Select Button -->
|
||||
<td class="text-right">
|
||||
<button class="btn btn-plan"
|
||||
v-bind:class="{'btn-warning-outline': ! isActivePlan(plan), 'btn-warning': isActivePlan(plan)}"
|
||||
@click="updateSubscription(plan)"
|
||||
:disabled="selectingPlan">
|
||||
|
||||
<span v-if="selectingPlan === plan">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Resuming
|
||||
</span>
|
||||
|
||||
<span v-if="! isActivePlan(plan) && selectingPlan !== plan">
|
||||
Switch
|
||||
</span>
|
||||
|
||||
<span v-if="isActivePlan(plan) && selectingPlan !== plan">
|
||||
Resume
|
||||
</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</spark-resume-subscription>
|
@@ -0,0 +1,91 @@
|
||||
<!-- Address -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('address')}">
|
||||
<label class="col-md-4 control-label">Address</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.address">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('address')">
|
||||
@{{ form.errors.get('address') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Address Line 2 -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('address_line_2')}">
|
||||
<label class="col-md-4 control-label">Address Line 2</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.address_line_2">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('address_line_2')">
|
||||
@{{ form.errors.get('address_line_2') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- City -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('city')}">
|
||||
<label class="col-md-4 control-label">City</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.city">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('city')">
|
||||
@{{ form.errors.get('city') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- State & ZIP Code -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('state')}">
|
||||
<label class="col-md-4 control-label">State & ZIP / Postal Code</label>
|
||||
|
||||
<!-- State -->
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" v-model="form.state" placeholder="State">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('state')">
|
||||
@{{ form.errors.get('state') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Zip Code -->
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" v-model="form.zip" placeholder="Postal Code">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('zip')">
|
||||
@{{ form.errors.get('zip') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Country -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('country')}">
|
||||
<label class="col-md-4 control-label">Country</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" v-model="form.country">
|
||||
@foreach (app(Laravel\Spark\Repositories\Geography\CountryRepository::class)->all() as $key => $country)
|
||||
<option value="{{ $key }}">{{ $country }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('country')">
|
||||
@{{ form.errors.get('country') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- European VAT ID -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('vat_id')}" v-if="countryCollectsVat">
|
||||
<label class="col-md-4 control-label">VAT ID</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" v-model="form.vat_id">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('vat_id')">
|
||||
@{{ form.errors.get('vat_id') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,41 @@
|
||||
<spark-subscribe-braintree :user="user" :team="team"
|
||||
:plans="plans" :billable-type="billableType" inline-template>
|
||||
|
||||
<div>
|
||||
<!-- Common Subscribe Form Contents -->
|
||||
@include('spark::settings.subscription.subscribe-common')
|
||||
|
||||
<!-- Billing Information -->
|
||||
<div class="panel panel-default" v-show="selectedPlan">
|
||||
<div class="panel-heading"><i class="fa fa-btn fa-credit-card"></i>Billing Information</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Generic 500 Level Error Message / Stripe Threw Exception -->
|
||||
<div class="alert alert-danger" v-if="form.errors.has('form')">
|
||||
We had trouble validating your card. It's possible your card provider is preventing
|
||||
us from charging the card. Please contact your card provider or customer support.
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Braintree Container -->
|
||||
<div id="braintree-subscribe-container" class="m-b-md"></div>
|
||||
|
||||
<!-- Subscribe Button -->
|
||||
<div class="form-group m-b-none p-b-none">
|
||||
<div class="col-sm-6">
|
||||
<button type="submit" class="btn btn-primary" :disabled="form.busy">
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Subscribing
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Subscribe
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-subscribe-braintree>
|
@@ -0,0 +1,104 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-left" :class="{'btn-table-align': hasMonthlyAndYearlyPlans}">
|
||||
Subscribe
|
||||
</div>
|
||||
|
||||
<!-- Interval Selector Button Group -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" v-if="hasMonthlyAndYearlyPaidPlans">
|
||||
<!-- Monthly Plans -->
|
||||
<button type="button" class="btn btn-default"
|
||||
@click="showMonthlyPlans"
|
||||
:class="{'active': showingMonthlyPlans}">
|
||||
|
||||
Monthly
|
||||
</button>
|
||||
|
||||
<!-- Yearly Plans -->
|
||||
<button type="button" class="btn btn-default"
|
||||
@click="showYearlyPlans"
|
||||
:class="{'active': showingYearlyPlans}">
|
||||
|
||||
Yearly
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body table-responsive">
|
||||
<!-- Subscription Notice -->
|
||||
<div class="p-b-lg">
|
||||
You are not subscribed to a plan. Choose from the plans below to get started.
|
||||
</div>
|
||||
|
||||
<!-- European VAT Notice -->
|
||||
@if (Spark::collectsEuropeanVat())
|
||||
<p class="p-b-lg">
|
||||
All subscription plan prices are excluding applicable VAT.
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<!-- Plan Error Message -->
|
||||
<div class="alert alert-danger" v-if="form.errors.has('plan')">
|
||||
@{{ form.errors.get('plan') }}
|
||||
</div>
|
||||
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead></thead>
|
||||
<tbody>
|
||||
<tr v-for="plan in paidPlansForActiveInterval">
|
||||
<!-- Plan Name -->
|
||||
<td>
|
||||
<div class="btn-table-align" @click="showPlanDetails(plan)">
|
||||
<span style="cursor: pointer;">
|
||||
<strong>@{{ plan.name }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Plan Features Button -->
|
||||
<td>
|
||||
<button class="btn btn-default m-l-sm" @click="showPlanDetails(plan)">
|
||||
<i class="fa fa-btn fa-star-o"></i>Plan Features
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<!-- Plan Price -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
@{{ plan.price | currency }} / @{{ plan.interval | capitalize }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Trial Days -->
|
||||
<td>
|
||||
<div class="btn-table-align" v-if="plan.trialDays && ! hasSubscribed(plan)">
|
||||
@{{ plan.trialDays}} Day Trial
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Plan Select Button -->
|
||||
<td class="text-right">
|
||||
<button class="btn btn-primary-outline btn-plan"
|
||||
v-if="selectedPlan !== plan"
|
||||
@click="selectPlan(plan)"
|
||||
:disabled="form.busy">
|
||||
|
||||
Select
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary btn-plan"
|
||||
v-if="selectedPlan === plan"
|
||||
disabled>
|
||||
|
||||
<i class="fa fa-btn fa-check"></i>Selected
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,135 @@
|
||||
<spark-subscribe-stripe :user="user" :team="team"
|
||||
:plans="plans" :billable-type="billableType" inline-template>
|
||||
|
||||
<div>
|
||||
<!-- Common Subscribe Form Contents -->
|
||||
@include('spark::settings.subscription.subscribe-common')
|
||||
|
||||
<!-- Billing Information -->
|
||||
<div class="panel panel-default" v-show="selectedPlan">
|
||||
<div class="panel-heading">Billing Information</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Generic 500 Level Error Message / Stripe Threw Exception -->
|
||||
<div class="alert alert-danger" v-if="form.errors.has('form')">
|
||||
We had trouble validating your card. It's possible your card provider is preventing
|
||||
us from charging the card. Please contact your card provider or customer support.
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Billing Address Fields -->
|
||||
@if (Spark::collectsBillingAddress())
|
||||
<h2><i class="fa fa-btn fa-map-marker"></i>Billing Address</h2>
|
||||
|
||||
@include('spark::settings.subscription.subscribe-address')
|
||||
|
||||
<h2><i class="fa fa-btn fa-credit-card"></i>Credit Card</h2>
|
||||
@endif
|
||||
|
||||
<!-- Cardholder's Name -->
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-md-4 control-label">Cardholder's Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" v-model="cardForm.name">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card Number -->
|
||||
<div class="form-group" :class="{'has-error': cardForm.errors.has('number')}">
|
||||
<label for="number" class="col-md-4 control-label">Card Number</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="number" data-stripe="number" v-model="cardForm.number">
|
||||
|
||||
<span class="help-block" v-show="cardForm.errors.has('number')">
|
||||
@{{ cardForm.errors.get('number') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Security Code -->
|
||||
<div class="form-group">
|
||||
<label for="number" class="col-md-4 control-label">Security Code</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="cvc" data-stripe="cvc" v-model="cardForm.cvc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Expiration -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label">Expiration</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<!-- Month -->
|
||||
<div class="col-xs-6">
|
||||
<input type="text" class="form-control" name="month"
|
||||
placeholder="MM" maxlength="2" data-stripe="exp-month" v-model="cardForm.month">
|
||||
</div>
|
||||
|
||||
<!-- Year -->
|
||||
<div class="col-xs-6">
|
||||
<input type="text" class="form-control" name="year"
|
||||
placeholder="YYYY" maxlength="4" data-stripe="exp-year" v-model="cardForm.year">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ZIP Code -->
|
||||
<div class="form-group" v-if=" ! spark.collectsBillingAddress">
|
||||
<label for="number" class="col-md-4 control-label">ZIP / Postal Code</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="zip" v-model="form.zip">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Coupon -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('coupon')}">
|
||||
<label class="col-md-4 control-label">Coupon</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" v-model="form.coupon">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('coupon')">
|
||||
@{{ form.errors.get('coupon') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tax / Price Information -->
|
||||
<div class="form-group" v-if="spark.collectsEuropeanVat && countryCollectsVat && selectedPlan">
|
||||
<label class="col-md-4 control-label"> </label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="alert alert-info" style="margin: 0;">
|
||||
<strong>Tax:</strong> @{{ taxAmount(selectedPlan) | currency }}
|
||||
<br><br>
|
||||
<strong>Total Price Including Tax:</strong>
|
||||
@{{ priceWithTax(selectedPlan) | currency }} / @{{ selectedPlan.interval | capitalize }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Subscribe Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary" @click.prevent="subscribe" :disabled="form.busy">
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Subscribing
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Subscribe
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-subscribe-stripe>
|
@@ -0,0 +1,5 @@
|
||||
@if (Spark::billsUsingStripe())
|
||||
@include('spark::settings.subscription.subscribe-stripe')
|
||||
@else
|
||||
@include('spark::settings.subscription.subscribe-braintree')
|
||||
@endif
|
@@ -0,0 +1,9 @@
|
||||
<div class="panel panel-warning" v-if="subscriptionIsOnTrial">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-btn fa-clock-o"></i>Free Trial
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
You are currently within your free trial period. Your trial will expire on <strong>@{{ trialEndsAt }}</strong>.
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,151 @@
|
||||
<spark-update-subscription :user="user" :team="team"
|
||||
:plans="plans" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-left" :class="{'btn-table-align': hasMonthlyAndYearlyPlans}">
|
||||
Update Subscription
|
||||
</div>
|
||||
|
||||
<!-- Interval Selector Button Group -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group" v-if="hasMonthlyAndYearlyPlans">
|
||||
<!-- Monthly Plans -->
|
||||
<button type="button" class="btn btn-default"
|
||||
@click="showMonthlyPlans"
|
||||
:class="{'active': showingMonthlyPlans}">
|
||||
|
||||
Monthly
|
||||
</button>
|
||||
|
||||
<!-- Yearly Plans -->
|
||||
<button type="button" class="btn btn-default"
|
||||
@click="showYearlyPlans"
|
||||
:class="{'active': showingYearlyPlans}">
|
||||
|
||||
Yearly
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body table-responsive">
|
||||
<!-- Plan Error Message - In General Will Never Be Shown -->
|
||||
<div class="alert alert-danger" v-if="planForm.errors.has('plan')">
|
||||
@{{ planForm.errors.get('plan') }}
|
||||
</div>
|
||||
|
||||
<!-- Current Subscription (Active) -->
|
||||
<div class="p-b-lg" v-if="activePlan.active">
|
||||
You are currently subscribed to the
|
||||
<strong>@{{ activePlan.name }} (@{{ activePlan.interval | capitalize }})</strong> plan.
|
||||
</div>
|
||||
|
||||
<!-- Current Subscription (Archived) -->
|
||||
<div class="alert alert-warning m-b-lg" v-if=" ! activePlan.active">
|
||||
You are currently subscribed to the
|
||||
<strong>@{{ activePlan.name }} (@{{ activePlan.interval | capitalize }})</strong> plan.
|
||||
This plan has been discontinued, but you may continue your subscription to this plan as long as you wish.
|
||||
If you cancel your subscription and later want to begin a new subscription, you will need to choose
|
||||
from one of the active plans listed below.
|
||||
</div>
|
||||
|
||||
<!-- European VAT Notice -->
|
||||
@if (Spark::collectsEuropeanVat())
|
||||
<p class="p-b-lg">
|
||||
All subscription plan prices include applicable VAT.
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead></thead>
|
||||
<tbody>
|
||||
<tr v-for="plan in plansForActiveInterval">
|
||||
<!-- Plan Name -->
|
||||
<td>
|
||||
<div class="btn-table-align" @click="showPlanDetails(plan)">
|
||||
<span style="cursor: pointer;">
|
||||
<strong>@{{ plan.name }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Plan Features Button -->
|
||||
<td>
|
||||
<button class="btn btn-default m-l-sm" @click="showPlanDetails(plan)">
|
||||
<i class="fa fa-btn fa-star-o"></i>Plan Features
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<!-- Plan Price -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
<span v-if="plan.price == 0">
|
||||
Free
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
@{{ priceWithTax(plan) | currency }} / @{{ plan.interval | capitalize }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Plan Select Button -->
|
||||
<td class="text-right">
|
||||
<button class="btn btn-primary btn-plan" v-if="isActivePlan(plan)" disabled>
|
||||
<i class="fa fa-btn fa-check"></i>Current Plan
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary-outline btn-plan"
|
||||
v-if=" ! isActivePlan(plan) && selectingPlan !== plan"
|
||||
@click="confirmPlanUpdate(plan)"
|
||||
:disabled="selectingPlan">
|
||||
|
||||
Switch
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary btn-plan"
|
||||
v-if="selectingPlan && selectingPlan === plan"
|
||||
disabled>
|
||||
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Updating
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Confirm Plan Update Modal -->
|
||||
<div class="modal fade" id="modal-confirm-plan-update" tabindex="-2" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" v-if="confirmingPlan">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">
|
||||
Update Subscription
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Are you sure you want to switch to the
|
||||
<strong>@{{ confirmingPlan.name }} (@{{ confirmingPlan.interval | capitalize }})</strong> plan?
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No, Go Back</button>
|
||||
|
||||
<button type="button" class="btn btn-primary" @click="approvePlanUpdate">Yes, I'm Sure</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-subscription>
|
16
spark/resources/views/settings/teams.blade.php
Normal file
16
spark/resources/views/settings/teams.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<spark-teams :user="user" :teams="teams" inline-template>
|
||||
<div>
|
||||
<!-- Create Team -->
|
||||
@if (Spark::createsAdditionalTeams())
|
||||
@include('spark::settings.teams.create-team')
|
||||
@endif
|
||||
|
||||
<!-- Pending Invitations -->
|
||||
@include('spark::settings.teams.pending-invitations')
|
||||
|
||||
<!-- Current Teams -->
|
||||
<div v-if="user && teams.length > 0">
|
||||
@include('spark::settings.teams.current-teams')
|
||||
</div>
|
||||
</div>
|
||||
</spark-teams>
|
63
spark/resources/views/settings/teams/create-team.blade.php
Normal file
63
spark/resources/views/settings/teams/create-team.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<spark-create-team inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Create {{ucfirst(Spark::teamString())}}</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" role="form" v-if="canCreateMoreTeams">
|
||||
<!-- Name -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('name')}">
|
||||
<label class="col-md-4 control-label">{{ ucfirst(Spark::teamString()) }} Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="create-team-name" class="form-control" name="name" v-model="form.name">
|
||||
|
||||
<span class="help-block" v-if="hasTeamLimit">
|
||||
You currently have @{{ remainingTeams }} {{ str_plural(Spark::teamString()) }} remaining.
|
||||
</span>
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('name')">
|
||||
@{{ form.errors.get('name') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Spark::teamsIdentifiedByPath())
|
||||
<!-- Slug (Only Shown When Using Paths For Teams) -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('slug')}">
|
||||
<label class="col-md-4 control-label">{{ ucfirst(Spark::teamString()) }} Slug</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="create-team-slug" class="form-control" name="slug" v-model="form.slug">
|
||||
|
||||
<p class="help-block" v-show=" ! form.errors.has('slug')">
|
||||
This slug is used to identify your team in URLs.
|
||||
</p>
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('slug')">
|
||||
@{{ form.errors.get('slug') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Create Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="create"
|
||||
:disabled="form.busy">
|
||||
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div v-else>
|
||||
<span class="text-danger">
|
||||
Your current plan doesn't allow you to create more teams, please <a href="{{ url('/settings#/subscription') }}">upgrade your subscription</a>.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-create-team>
|
138
spark/resources/views/settings/teams/current-teams.blade.php
Normal file
138
spark/resources/views/settings/teams/current-teams.blade.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<spark-current-teams :user="user" :teams="teams" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Current {{ ucfirst(str_plural(Spark::teamString())) }}</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Owner</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr v-for="team in teams">
|
||||
<!-- Photo -->
|
||||
<td>
|
||||
<img :src="team.photo_url" class="spark-team-photo">
|
||||
</td>
|
||||
|
||||
<!-- Team Name -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
@{{ team.name }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Owner Name -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
<span v-if="user.id == team.owner.id">
|
||||
You
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
@{{ team.owner.name }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Edit Button -->
|
||||
<td>
|
||||
<a :href="'/settings/{{str_plural(Spark::teamString())}}/'+team.id">
|
||||
<button class="btn btn-primary">
|
||||
<i class="fa fa-cog"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<!-- Leave Button -->
|
||||
<td>
|
||||
<button class="btn btn-warning" @click="approveLeavingTeam(team)"
|
||||
data-toggle="tooltip" title="Leave Team"
|
||||
v-if="user.id !== team.owner_id">
|
||||
<i class="fa fa-sign-out"></i>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
@if (Spark::createsAdditionalTeams())
|
||||
<!-- Delete Button -->
|
||||
<td>
|
||||
<button class="btn btn-danger-outline" @click="approveTeamDelete(team)" v-if="user.id === team.owner_id">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Leave Team Modal -->
|
||||
<div class="modal fade" id="modal-leave-team" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="leavingTeam">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Leave {{ ucfirst(Spark::teamString()) }} (@{{ leavingTeam.name }})
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
Are you sure you want to leave this {{ Spark::teamString() }}?
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No, Go Back</button>
|
||||
|
||||
<button type="button" class="btn btn-warning" @click="leaveTeam" :disabled="leaveTeamForm.busy">
|
||||
Yes, Leave
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Team Modal -->
|
||||
<div class="modal fade" id="modal-delete-team" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="deletingTeam">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Delete {{ ucfirst(Spark::teamString()) }} (@{{ deletingTeam.name }})
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
Are you sure you want to delete this {{ Spark::teamString() }}? If you choose to delete the {{ Spark::teamString() }}, all of the
|
||||
{{ Spark::teamString() }}'s data will be permanently deleted.
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No, Go Back</button>
|
||||
|
||||
<button type="button" class="btn btn-danger" @click="deleteTeam" :disabled="deleteTeamForm.busy">
|
||||
<span v-if="deleteTeamForm.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Deleting
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Yes, Delete
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-current-teams>
|
@@ -0,0 +1,14 @@
|
||||
Hi!
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ $invitation->team->owner->name }} has invited you to join their {{ Spark::teamString() }}!
|
||||
|
||||
<br><br>
|
||||
|
||||
Since you already have an account, you may accept the invitation from your
|
||||
account settings screen.
|
||||
|
||||
<br><br>
|
||||
|
||||
See you soon!
|
@@ -0,0 +1,14 @@
|
||||
Hi!
|
||||
|
||||
<br><br>
|
||||
|
||||
{{ $invitation->team->owner->name }} has invited you to join their {{ Spark::teamString() }}! If you do not already have an account,
|
||||
you may click the following link to get started:
|
||||
|
||||
<br><br>
|
||||
|
||||
<a href="{{ url('register?invitation='.$invitation->token) }}">{{ url('register?invitation='.$invitation->token) }}</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
See you soon!
|
@@ -0,0 +1,34 @@
|
||||
<spark-mailed-invitations :invitations="invitations" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default" v-if="invitations.length > 0">
|
||||
<div class="panel-heading">Mailed Invitations</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead>
|
||||
<th>E-Mail Address</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr v-for="invitation in invitations">
|
||||
<!-- E-Mail Address -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
@{{ invitation.email }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Delete Button -->
|
||||
<td>
|
||||
<button class="btn btn-danger-outline" @click="cancel(invitation)">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-mailed-invitations>
|
@@ -0,0 +1,42 @@
|
||||
<spark-pending-invitations inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default" v-if="invitations.length > 0">
|
||||
<div class="panel-heading">Pending Invitations</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead>
|
||||
<th>{{ ucfirst(Spark::teamString()) }}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr v-for="invitation in invitations">
|
||||
<!-- Team Name -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
@{{ invitation.team.name }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Accept Button -->
|
||||
<td>
|
||||
<button class="btn btn-success" @click="accept(invitation)">
|
||||
<i class="fa fa-check"></i>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<!-- Reject Button -->
|
||||
<td>
|
||||
<button class="btn btn-danger-outline" @click="reject(invitation)">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-pending-invitations>
|
@@ -0,0 +1,53 @@
|
||||
<spark-send-invitation :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Send Invitation</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
The invitation has been sent!
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form" v-if="canInviteMoreTeamMembers">
|
||||
<!-- E-Mail Address -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('email')}">
|
||||
<label class="col-md-4 control-label">E-Mail Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control" name="email" v-model="form.email">
|
||||
<span class="help-block" v-if="hasTeamMembersLimit">
|
||||
You currently have @{{ remainingTeamMembers }} invitation(s) remaining.
|
||||
</span>
|
||||
<span class="help-block" v-show="form.errors.has('email')">
|
||||
@{{ form.errors.get('email') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Send Invitation Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="send"
|
||||
:disabled="form.busy">
|
||||
|
||||
<span v-if="form.busy">
|
||||
<i class="fa fa-btn fa-spinner fa-spin"></i>Sending
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
Send Invitation
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div v-else>
|
||||
<span class="text-danger">
|
||||
Your current plan doesn't allow you to invite more members, please <a href="{{ url('/settings#/subscription') }}">upgrade your subscription</a>.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-send-invitation>
|
141
spark/resources/views/settings/teams/team-members.blade.php
Normal file
141
spark/resources/views/settings/teams/team-members.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<spark-team-members :user="user" :team="team" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ ucfirst(Spark::teamString()) }} Members (@{{ team.users.length }})</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-borderless m-b-none">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th v-if="roles.length > 1">Role</th>
|
||||
<th v-if="roles.length > 1"><!-- Edit Team Member Button --></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr v-for="member in team.users">
|
||||
<!-- Photo -->
|
||||
<td>
|
||||
<img :src="member.photo_url" class="spark-profile-photo">
|
||||
</td>
|
||||
|
||||
<!-- Name -->
|
||||
<td>
|
||||
<div class="btn-table-align">
|
||||
<span v-if="member.id === user.id">
|
||||
You
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
@{{ member.name }}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Role -->
|
||||
<td v-if="roles.length > 0">
|
||||
<div class="btn-table-align">
|
||||
@{{ teamMemberRole(member) }}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Edit Button -->
|
||||
<td v-if="roles.length > 0">
|
||||
<button class="btn btn-primary"
|
||||
@click="editTeamMember(member)"
|
||||
v-if="canEditTeamMember(member)">
|
||||
|
||||
<i class="fa fa-pencil"></i>
|
||||
</button>
|
||||
</td>
|
||||
|
||||
<!-- Delete Button -->
|
||||
<td>
|
||||
<button class="btn btn-danger-outline"
|
||||
@click="approveTeamMemberDelete(member)"
|
||||
v-if="canDeleteTeamMember(member)">
|
||||
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Team Member Modal -->
|
||||
<div class="modal fade" id="modal-update-team-member" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="updatingTeamMember">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Edit {{ ucfirst(Spark::teamString()) }} Member (@{{ updatingTeamMember.name }})
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- Update Team Member Form -->
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group" :class="{'has-error': updateTeamMemberForm.errors.has('role')}">
|
||||
<label class="col-md-4 control-label">{{ ucfirst(Spark::teamString()) }} Member Role</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<select class="form-control" v-model="updateTeamMemberForm.role">
|
||||
<option v-for="role in roles" :value="role.value">
|
||||
@{{ role.text }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<span class="help-block" v-if="updateTeamMemberForm.errors.has('role')">
|
||||
@{{ updateTeamMemberForm.errors.get('role') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
|
||||
<button type="button" class="btn btn-primary" @click="update" :disabled="updateTeamMemberForm.busy">
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Team Member Modal -->
|
||||
<div class="modal fade" id="modal-delete-member" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" v-if="deletingTeamMember">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
Remove {{ ucfirst(Spark::teamString()) }} Member (@{{ deletingTeamMember.name }})
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
Are you sure you want to remove this {{ ucfirst(Spark::teamString()) }} member?
|
||||
</div>
|
||||
|
||||
<!-- Modal Actions -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">No, Go Back</button>
|
||||
|
||||
<button type="button" class="btn btn-danger" @click="deleteMember" :disabled="deleteTeamMemberForm.busy">
|
||||
Yes, Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-team-members>
|
@@ -0,0 +1,20 @@
|
||||
<spark-team-membership :user="user" :team="team" :billable-type="billableType" inline-template>
|
||||
<div>
|
||||
@if (Auth::user()->ownsTeam($team))
|
||||
<!-- Send Invitation -->
|
||||
<div v-if="user && team">
|
||||
@include('spark::settings.teams.send-invitation')
|
||||
</div>
|
||||
|
||||
<!-- Pending Invitations -->
|
||||
<div v-if="invitations && invitations.length > 0">
|
||||
@include('spark::settings.teams.mailed-invitations')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Team Members -->
|
||||
<div v-if="user && team">
|
||||
@include('spark::settings.teams.team-members')
|
||||
</div>
|
||||
</div>
|
||||
</spark-team-membership>
|
11
spark/resources/views/settings/teams/team-profile.blade.php
Normal file
11
spark/resources/views/settings/teams/team-profile.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<spark-team-profile :user="user" :team="team" inline-template>
|
||||
<div>
|
||||
<div v-if="user && team">
|
||||
<!-- Update Team Photo -->
|
||||
@include('spark::settings.teams.update-team-photo')
|
||||
|
||||
<!-- Update Team Name -->
|
||||
@include('spark::settings.teams.update-team-name')
|
||||
</div>
|
||||
</div>
|
||||
</spark-team-profile>
|
156
spark/resources/views/settings/teams/team-settings.blade.php
Normal file
156
spark/resources/views/settings/teams/team-settings.blade.php
Normal file
@@ -0,0 +1,156 @@
|
||||
@extends('spark::layouts.app')
|
||||
|
||||
@section('scripts')
|
||||
@if (Spark::billsUsingStripe())
|
||||
<script src="https://js.stripe.com/v2/"></script>
|
||||
@else
|
||||
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<spark-team-settings :user="user" :team-id="{{ $team->id }}" inline-template>
|
||||
<div class="spark-screen container">
|
||||
<div class="row">
|
||||
<!-- Tabs -->
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default panel-flush">
|
||||
<div class="panel-heading">
|
||||
<span v-if="team">
|
||||
@{{ team.name }} {{ ucfirst(Spark::teamString()) }} Settings
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="spark-settings-tabs">
|
||||
<ul class="nav spark-settings-stacked-tabs" role="tablist">
|
||||
<!-- Owner Settings -->
|
||||
@if (Auth::user()->ownsTeam($team))
|
||||
<li role="presentation" class="active">
|
||||
<a href="#owner" aria-controls="owner" role="tab" data-toggle="tab">
|
||||
<i class="fa fa-fw fa-btn fa-edit"></i>{{ ucfirst(Spark::teamString()) }} Profile
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<!-- Membership -->
|
||||
@if (Auth::user()->ownsTeam($team))
|
||||
<li role="presentation">
|
||||
@else
|
||||
<li role="presentation" class="active">
|
||||
@endif
|
||||
<a href="#membership" aria-controls="membership" role="tab" data-toggle="tab">
|
||||
<i class="fa fa-fw fa-btn fa-users"></i>Membership
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- View All Teams -->
|
||||
@if (Spark::createsAdditionalTeams())
|
||||
<li role="presentation">
|
||||
<a href="/settings#/{{str_plural(Spark::teamString())}}">
|
||||
<i class="fa fa-fw fa-btn fa-arrow-left"></i>View All {{ ucfirst(str_plural(Spark::teamString())) }}
|
||||
</a>
|
||||
</li>
|
||||
@else
|
||||
<li role="presentation">
|
||||
<a href="/settings">
|
||||
<i class="fa fa-fw fa-btn fa-arrow-left"></i>Your Settings
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Billing Tabs -->
|
||||
@if (Spark::canBillTeams() && Auth::user()->ownsTeam($team))
|
||||
<div class="panel panel-default panel-flush">
|
||||
<div class="panel-heading">
|
||||
{{ ucfirst(Spark::teamString()) }} Billing
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="spark-settings-tabs">
|
||||
<ul class="nav spark-settings-stacked-tabs" role="tablist">
|
||||
@if (Spark::hasPaidTeamPlans())
|
||||
<!-- Subscription Link -->
|
||||
<li role="presentation">
|
||||
<a href="#subscription" aria-controls="subscription" role="tab" data-toggle="tab">
|
||||
<i class="fa fa-fw fa-btn fa-shopping-bag"></i>Subscription
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<!-- Payment Method Link -->
|
||||
<li role="presentation">
|
||||
<a href="#payment-method" aria-controls="payment-method" role="tab" data-toggle="tab">
|
||||
<i class="fa fa-fw fa-btn fa-credit-card"></i>Payment Method
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Invoices Link -->
|
||||
<li role="presentation">
|
||||
<a href="#invoices" aria-controls="invoices" role="tab" data-toggle="tab">
|
||||
<i class="fa fa-fw fa-btn fa-history"></i>Invoices
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Tab Panels -->
|
||||
<div class="col-md-8">
|
||||
<div class="tab-content">
|
||||
<!-- Owner Information -->
|
||||
@if (Auth::user()->ownsTeam($team))
|
||||
<div role="tabpanel" class="tab-pane active" id="owner">
|
||||
@include('spark::settings.teams.team-profile')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Membership -->
|
||||
@if (Auth::user()->ownsTeam($team))
|
||||
<div role="tabpanel" class="tab-pane" id="membership">
|
||||
@else
|
||||
<div role="tabpanel" class="tab-pane active" id="membership">
|
||||
@endif
|
||||
<div v-if="team">
|
||||
@include('spark::settings.teams.team-membership')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Billing Tab Panes -->
|
||||
@if (Spark::canBillTeams() && Auth::user()->ownsTeam($team))
|
||||
@if (Spark::hasPaidTeamPlans())
|
||||
<!-- Subscription -->
|
||||
<div role="tabpanel" class="tab-pane" id="subscription">
|
||||
<div v-if="user && team">
|
||||
@include('spark::settings.subscription')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Payment Method -->
|
||||
<div role="tabpanel" class="tab-pane" id="payment-method">
|
||||
<div v-if="user && team">
|
||||
@include('spark::settings.payment-method')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Invoices -->
|
||||
<div role="tabpanel" class="tab-pane" id="invoices">
|
||||
<div v-if="user && team">
|
||||
@include('spark::settings.invoices')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-team-settings>
|
||||
@endsection
|
@@ -0,0 +1,39 @@
|
||||
<spark-update-team-name :user="user" :team="team" inline-template>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Update {{ ucfirst(Spark::teamString()) }} Name</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<!-- Success Message -->
|
||||
<div class="alert alert-success" v-if="form.successful">
|
||||
Your {{ Spark::teamString() }} name has been updated!
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Name -->
|
||||
<div class="form-group" :class="{'has-error': form.errors.has('name')}">
|
||||
<label class="col-md-4 control-label">Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="name" v-model="form.name">
|
||||
|
||||
<span class="help-block" v-show="form.errors.has('name')">
|
||||
@{{ form.errors.get('name') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-6">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
@click.prevent="update"
|
||||
:disabled="form.busy">
|
||||
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-team-name>
|
@@ -0,0 +1,39 @@
|
||||
<spark-update-team-photo :user="user" :team="team" inline-template>
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{{ ucfirst(Spark::teamString()) }} Photo</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="alert alert-danger" v-if="form.errors.has('photo')">
|
||||
@{{ form.errors.get('photo') }}
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" role="form">
|
||||
<!-- Photo Preview-->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label"> </label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<span role="img" class="team-photo-preview"
|
||||
:style="previewStyle">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Update Button -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-4 control-label"> </label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label type="button" class="btn btn-primary btn-upload" :disabled="form.busy">
|
||||
<span>Select New Photo</span>
|
||||
|
||||
<input ref="photo" type="file" class="form-control" name="photo" @change="update">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</spark-update-team-photo>
|
Reference in New Issue
Block a user