all atb changes

This commit is contained in:
Joey Kimsey
2025-02-05 23:57:17 -05:00
parent 2ac64e5c49
commit ffb82b1192
328 changed files with 12384 additions and 2477 deletions

View File

@ -0,0 +1,47 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Memberships</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form action="{ROOT_URL}admin/products/delete" method="post">
<table class="table table-striped">
<thead>
<tr>
<th style="width: 25%">Name</th>
<th style="width: 20%">status</th>
<th style="width: 20%">Price</th>
<th style="width: 10%">Start</th>
<th style="width: 10%">End</th>
<th style="width: 5%"></th>
<th style="width: 5%"></th>
<th style="width: 5%">
<input type="checkbox" onchange="checkAll(this)" name="check.f" value="F_[]">
</th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td>{name}</td>
<td>{status}</td>
<td>{prettyPrice}</td>
<td>{DTC}{current_period_start}{/DTC}</td>
<td>{DTC}{current_period_end}{/DTC}</td>
<td><a href="{ROOT_URL}admin/records/view/{ID}" class="btn btn-sm btn-primary"><i class="fa fa-fw fa-upload"></i></a></td>
<td><a href="{ROOT_URL}admin/records/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
<td>
<input type="checkbox" value="{ID}" name="MP_[]">
</td>
</tr>
{/LOOP}
{ALT}
<tr>
<td align="center" colspan="6">
No results to show.
</td>
</tr>
{/ALT}
</tbody>
</table>
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
</form>
</div>

View File

@ -0,0 +1,76 @@
<div class="container py-4">
<div class="row justify-content-center">
<div class="col-md-8">
{ADMIN_BREADCRUMBS}
<div class="card shadow">
<!-- Card Header -->
<div class="card-header text-center bg-dark text-white">
<h3 class="card-title mb-0">{name}</h3>
</div>
<!-- Card Body -->
<div class="card-body">
<div class="row align-items-center">
<!-- Details -->
<table class="table table-borderless">
<tbody>
<tr>
<th scope="row" class="col-3">User</th>
<td>{name}</td>
</tr>
<tr>
<th scope="row">Status</th>
<td>{status}</td>
</tr>
<tr>
<th scope="row">Billing Frequency</th>
<td>{billing_frequency}</td>
</tr>
<tr>
<th scope="row">Started:</th>
<td>{DTC}{current_period_end}{/DTC}</td>
</tr>
<tr>
<th scope="row">Ended:</th>
<td>{DTC}{current_period_start}{/DTC}</td>
</tr>
<tr>
<th scope="row">Stripe Customer</th>
<td class="input-group mb-3">
<input type="text" value="{stripe_customer}" name="input" class="form-control" id="stripeCustomer{ID}">
<button class="btn btn-secondary" onclick="copyElementText('stripeCustomer{ID}')">Copy</button>
</td>
</tr>
<tr>
<th scope="row">Stripe Subscription</th>
<td class="input-group mb-3">
<input type="text" value="{stripe_subscription}" name="input" class="form-control" id="stripeSubscription{ID}">
<button class="btn btn-secondary" onclick="copyElementText('stripeSubscription{ID}')">Copy</button>
</td>
</tr>
<tr>
<th scope="row">Stripe Subscription Price</th>
<td class="input-group mb-3">
<input type="text" value="{subscription_price_id}" name="input" class="form-control" id="stripeSubscriptionPrice{ID}">
<button class="btn btn-secondary" onclick="copyElementText('stripeSubscriptionPrice{ID}')">Copy</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Admin Controls -->
<div class="card-footer text-center">
{ADMIN}
<form action="{ROOT_URL}admin/feedback/delete" method="post">
<input type="hidden" name="F_" value="{ID}">
<input type="hidden" name="token" value="{TOKEN}">
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
</form>
{/ADMIN}
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,35 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Stripe Webhook Generation</legend>
<hr>
{ADMIN_BREADCRUMBS}
<p>Orphans are stripe prices that have unique lookup_keys used by the membership system, but have no products currently saved.</p>
<table class="table table-striped">
<thead>
<tr>
<th style="width: 10%">price id</th>
<th style="width: 10%">amount</th>
<th style="width: 50%">lookup key</th>
<th style="width: 10%">url</th>
<th style="width: 10%"></th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td>{price_id}</td>
<td>{amount}</td>
<td>{lookup_key}</td>
<td><a href="{ROOT_URL}admin/members/orphans/adopt/{price_id}" class="btn btn-sm btn-success"><i class="fa fa-fw fa-download"></i></a></td>
<td><a href="{ROOT_URL}admin/members/orphans/abandon/{price_id}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
</tr>
{/LOOP}
{ALT}
<tr>
<td class="text-center" colspan="5">
No results to show.
</td>
</tr>
{/ALT}
</tbody>
</table>
</div>

View File

@ -0,0 +1,51 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Create Membership Product</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form action="" method="post">
<fieldset>
<!-- Name -->
<div class="mb-3 row">
<label for="name" class="col-lg-3 col-form-label text-end">Name:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="name" id="name">
</div>
</div>
<!-- Monthly Price -->
<div class="mb-3 row">
<label for="monthly_price" class="col-lg-3 col-form-label text-end">Monthly Price:</label>
<div class="col-lg-6">
<input type="number" class="form-control" name="monthly_price" id="monthly_price">
<small class="form-text text-muted">Integer required: $4.99 : 499</small>
</div>
</div>
<!-- Yearly Price -->
<div class="mb-3 row">
<label for="yearly_price" class="col-lg-3 col-form-label text-end">Yearly Price:</label>
<div class="col-lg-6">
<input type="number" class="form-control" name="yearly_price" id="yearly_price">
<small class="form-text text-muted">Integer required: $4.99 : 499</small>
</div>
</div>
<!-- Description -->
<div class="mb-3 row">
<label for="description" class="col-lg-3 col-form-label text-end">Description:</label>
<div class="col-lg-6">
<textarea class="form-control" name="description" id="description" rows="6" maxlength="2000" required></textarea>
<small class="form-text text-muted">Max: 2000 characters</small>
</div>
</div>
<!-- Hidden Token -->
<input type="hidden" name="token" value="{TOKEN}">
</fieldset>
<!-- Submit Button -->
<div class="text-center">
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg center-block">Save</button>
</div>
</form>
</div>

View File

@ -0,0 +1,51 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Create Membership Product</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form action="" method="post">
<fieldset>
<!-- Name -->
<div class="mb-3 row">
<label for="name" class="col-lg-3 col-form-label text-end">Name:</label>
<div class="col-lg-6">
<input type="text" class="form-control" name="name" id="name" value="{name}">
</div>
</div>
<!-- Monthly Price -->
<div class="mb-3 row">
<label for="monthly_price" class="col-lg-3 col-form-label text-end">Monthly Price:</label>
<div class="col-lg-6">
<input type="number" class="form-control" name="monthly_price" id="monthly_price" value="{monthly_price}">
<small class="form-text text-muted">Integer required: $4.99 : 499</small>
</div>
</div>
<!-- Yearly Price -->
<div class="mb-3 row">
<label for="yearly_price" class="col-lg-3 col-form-label text-end">Yearly Price:</label>
<div class="col-lg-6">
<input type="number" class="form-control" name="yearly_price" id="yearly_price" value="{yearly_price}">
<small class="form-text text-muted">Integer required: $4.99 : 499</small>
</div>
</div>
<!-- Description -->
<div class="mb-3 row">
<label for="description" class="col-lg-3 col-form-label text-end">Description:</label>
<div class="col-lg-6">
<textarea class="form-control" name="description" id="description" rows="6" maxlength="2000" required>{description}</textarea>
<small class="form-text text-muted">Max: 2000 characters</small>
</div>
</div>
<!-- Hidden Token -->
<input type="hidden" name="token" value="{TOKEN}">
</fieldset>
<!-- Submit Button -->
<div class="text-center">
<button type="submit" name="submit" value="submit" class="btn btn-primary btn-lg center-block">Send</button>
</div>
</form>
</div>

View File

@ -0,0 +1,46 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Membership Products</legend>
<hr>
{ADMIN_BREADCRUMBS}
<form action="{ROOT_URL}admin/products/delete" method="post">
<table class="table table-striped">
<thead>
<tr>
<th style="width: 10%">Name</th>
<th style="width: 25%">Monthly Price</th>
<th style="width: 50%">Yearly Price</th>
<th style="width: 5%"></th>
<th style="width: 5%"></th>
<th style="width: 5%"></th>
<th style="width: 5%">
<input type="checkbox" onchange="checkAll(this)" name="check.f" value="F_[]">
</th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td>{name}</td>
<td>{monthly_price}</td>
<td>{yearly_price}</td>
<td><a href="{ROOT_URL}admin/products/view/{ID}" class="btn btn-sm btn-primary"><i class="fa fa-fw fa-upload"></i></a></td>
<td><a href="{ROOT_URL}admin/products/edit/{ID}" class="btn btn-sm btn-warning"><i class="fa fa-fw fa-pencil"></i></a></td>
<td><a href="{ROOT_URL}admin/products/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
<td>
<input type="checkbox" value="{ID}" name="MP_[]">
</td>
</tr>
{/LOOP}
{ALT}
<tr>
<td align="center" colspan="6">
No results to show.
</td>
</tr>
{/ALT}
</tbody>
</table>
<a href="{ROOT_URL}admin/products/create" class="btn btn-sm btn-primary">Create</a>
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
</form>
</div>

View File

@ -0,0 +1,72 @@
<div class="container py-4">
<div class="row justify-content-center">
<div class="col-md-8">
{ADMIN_BREADCRUMBS}
<div class="card shadow">
<!-- Card Header -->
<div class="card-header text-center bg-dark text-white">
<h3 class="card-title mb-0">{name}</h3>
</div>
<!-- Card Body -->
<div class="card-body">
<div class="row align-items-center">
<!-- Log Details -->
<table class="table table-borderless">
<tbody>
<tr>
<th scope="row" class="col-3">Name</th>
<td>{name}</td>
</tr>
<tr>
<th scope="row">Monthly Price</th>
<td>{monthly_price}</td>
</tr>
<tr>
<th scope="row">Yearly Price</th>
<td>{yearly_price}</td>
</tr>
<tr>
<th scope="row">Stripe Product</th>
<td class="input-group mb-3">
<input type="text" value="{stripe_product}" name="input" class="form-control" id="stripeProduct{ID}">
<button class="btn btn-secondary" onclick="copyElementText('stripeProduct{ID}')" aria-describedby="stripeProduct{ID}">Copy</button>
</td>
</tr>
<tr>
<th scope="row">Stripe Price Yearly</th>
<td class="input-group mb-3">
<input type="text" value="{stripe_price_yearly}" name="input" class="form-control" id="stripeYearly{ID}">
<button class="btn btn-secondary" onclick="copyElementText('stripeYearly{ID}')">Copy</button>
</td>
</tr>
<tr>
<th scope="row">Stripe Price Monthly</th>
<td class="input-group mb-3">
<input type="text" value="{stripe_price_monthly}" name="input" class="form-control" id="stripeMonthly{ID}">
<button class="btn btn-secondary" onclick="copyElementText('stripeMonthly{ID}')">Copy</button>
</td>
</tr>
<tr>
<th scope="row">Description</th>
<td>{description}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Admin Controls -->
<div class="card-footer text-center">
{ADMIN}
<form action="{ROOT_URL}admin/feedback/delete" method="post">
<input type="hidden" name="F_" value="{ID}">
<input type="hidden" name="token" value="{TOKEN}">
<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
</form>
{/ADMIN}
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,13 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Membership Scripts</legend>
<hr>
{ADMIN_BREADCRUMBS}
<ul class="list-unstyled">
<li>
<a href="{ROOT_URL}admin/members/webhooks">Webhook Generation</a>
</li>
<li>
<a href="{ROOT_URL}admin/members/orphans">Orphan Products</a>
</li>
</ul>
</div>

View File

@ -0,0 +1,43 @@
<div class="context-main-bg context-main p-3">
<legend class="text-center">Stripe Webhook Generation</legend>
<hr>
{ADMIN_BREADCRUMBS}
<table class="table table-striped">
<thead>
<tr>
<th style="width: 10%">id</th>
<th style="width: 10%">status</th>
<th style="width: 50%">enabled_events</th>
<th style="width: 10%">url</th>
<th style="width: 10%"></th>
</tr>
</thead>
<tbody>
{LOOP}
<tr>
<td>{id}</td>
<td>{status}</td>
<td>{enabled_events}</td>
<td>{url}</td>
<td><a href="{ROOT_URL}admin/members/webhooks/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
</tr>
{/LOOP}
{ALT}
<tr>
<td class="text-center" colspan="5">
No results to show.
</td>
</tr>
{/ALT}
</tbody>
</table>
<div class="text-center">
<h5>WARNING: Regenerating existing webhooks makes joey sad, don't do iit!</h5>
<p>The new webhooks will be generated using the base url: <strong>{urltouse}</strong></p>
<form action="" method="post" class="form-horizontal">
<div class="form-group">
<button name="submit" value="submit" type="submit" class="btn btn-lg btn-danger">re-generate</button>
</div>
</form>
</div>
</div>