418 lines
25 KiB
Smarty
418 lines
25 KiB
Smarty
{*
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>{$opt.app_name} - Archive for {$fullname|escape:'htmlall'}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link href="css/phpgiftreg.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1/font/bootstrap-icons.min.css" rel="stylesheet" crossorigin="anonymous">
|
|
<link href="https://cdn.jsdelivr.net/npm/lightbox2@2/dist/css/lightbox.min.css" rel="stylesheet" crossorigin="anonymous">
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/lightbox2@2/dist/js/lightbox.min.js" crossorigin="anonymous"></script>
|
|
<script src="js/themeswitcher.js"></script>
|
|
<script src="js/bs-components.js"></script>
|
|
<script language="JavaScript" type="text/javascript">
|
|
$(document).ready(function() {
|
|
{if $opt.confirm_item_archives}
|
|
$('a[rel=confirmitemarchive]').click(function(event) {
|
|
var desc = $(this).attr('data-content');
|
|
if (!window.confirm('Are you sure you want to archive "' + desc + '"?')) {
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
{/if}
|
|
{if $opt.confirm_item_deletes}
|
|
$('a[rel=confirmitemdelete]').click(function(event) {
|
|
var desc = $(this).attr('data-content');
|
|
if (!window.confirm('Are you sure you want to delete "' + desc + '"?')) {
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
{/if}
|
|
{if $opt.shop_requires_approval}
|
|
$('a[rel=confirmunshop]').click(function(event) {
|
|
var fn = $(this).attr('data-content');
|
|
if (!window.confirm('Are you sure you no longer wish to shop for ' + fn + '?')) {
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
{/if}
|
|
});
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
{include file='navbar.tpl'}
|
|
<main>
|
|
<div class="container">
|
|
{if isset($message)}
|
|
<div class="alert alert-success" role="alert">
|
|
{$message|escape:'htmlall'}
|
|
</div> <!-- alert -->
|
|
{/if}
|
|
{if $opt.show_helptext}
|
|
<div class="card text-bg-info mb-3">
|
|
<div class="card-header">Help</div>
|
|
<div class="card-body">
|
|
<ul>
|
|
<li>You can click the column headers to sort by that attribute.</li>
|
|
<li>List each item seperately on your list - do not combine items. (i.e. list each book of a 4-part series separately.)</li>
|
|
<li>Once you've bought or decided not to buy an item, remember to return to the recipient's gift lists and mark it accordingly.</li>
|
|
<li>If someone purchases an item on your list, click <img src="images/return-light.png" /> to mark it as received.</li>
|
|
<li>To unarchive an item on your list, click <img src="images/basket3-fill-light.png" />.</li>
|
|
</ul>
|
|
</div> <!-- card body -->
|
|
</div> <!-- card -->
|
|
{/if}
|
|
<div class="card mb-3">
|
|
<div class="card-header"><h1>My Items</h1></div>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th class="colheader"><a href="index.php?mysort=name{if $mysort == "name"}&sortdir={$sortdir == "DESC" ? "ASC" : "DESC"}{/if}">Name{if $mysort == "name"} <img class="theme-image" data-light-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" data-dark-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-dark.png" src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" border="0" />{/if}</a></th>
|
|
<th class="colheader"><a href="index.php?mysort=ranking{if $mysort == "ranking"}&sortdir={$sortdir == "DESC" ? "ASC" : "DESC"}{/if}">Ranking{if $mysort == "ranking"} <img class="theme-image" data-light-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" data-dark-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-dark.png" src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" border="0" />{/if}</a></th>
|
|
<th class="colheader"><a href="index.php?mysort=quantity{if $mysort == "quantity"}&sortdir={$sortdir == "DESC" ? "ASC" : "DESC"}{/if}">Quantity{if $mysort == "quantity"} <img class="theme-image" data-light-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" data-dark-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-dark.png" src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" border="0" />{/if}</a></th>
|
|
<th class="colheader"><a href="index.php?mysort=category{if $mysort == "category"}&sortdir={$sortdir == "DESC" ? "ASC" : "DESC"}{/if}">Category{if $mysort == "category"} <img class="theme-image" data-light-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" data-dark-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-dark.png" src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" border="0" />{/if}</a></th>
|
|
<th class="colheader"><a href="index.php?mysort=source{if $mysort == "source"}&sortdir={$sortdir == "DESC" ? "ASC" : "DESC"}{/if}">Store{if $mysort == "source"} <img class="theme-image" data-light-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" data-dark-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-dark.png" src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" border="0" />{/if}</a></th>
|
|
<th class="colheader"><a href="index.php?mysort=price{if $mysort == "price"}&sortdir={$sortdir == "DESC" ? "ASC" : "DESC"}{/if}">Price{if $mysort == "price"} <img class="theme-image" data-light-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" data-dark-src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-dark.png" src="images/caret-{$sortdir == "DESC" ? "DESC" : "ASC"}-light.png" border="0" />{/if}</a></th>
|
|
<th class="rcolheader">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$myitems item=row}
|
|
<tr valign="top">
|
|
<td>
|
|
<form name="itemform" id="itemform_{$row.itemid}" method="POST" action="item.php" enctype="multipart/form-data" class="well form-horizontal">
|
|
<div class="modal" tabindex="-1" id="editmodal_{$row.itemid}">
|
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Item Info: {$row.name|truncate:60}</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div> <!-- modal-header -->
|
|
<div class="modal-body">
|
|
<input type="hidden" name="itemid" value="{$row.itemid}">
|
|
<input type="hidden" name="action" value="update">
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="description">Name</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="name" name="name" type="text" value="{$row.name|escape:'htmlall'}" class="form-control{if isset($name_error)} is-invalid{/if}" placeholder="Name" maxlength="100" required>
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="description">Description</label>
|
|
</div>
|
|
<div class="col">
|
|
<textarea id="description" name="description" class="form-control{if isset($description_error)} is-invalid{/if}" rows="3" cols="40">{$row.description|escape:'htmlall'}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="category">Category</label>
|
|
</div>
|
|
<div class="col">
|
|
<select id="category" name="category" class="form-select">
|
|
{foreach from=$categories item=catrow}
|
|
<option value="{$catrow.categoryid}" {if $catrow.categoryid == $row.catid}SELECTED{/if}>{$catrow.category|escape:'htmlall'}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="price">Price ({$opt.currency_symbol})</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="price" name="price" type="text" value="{$row.pricenum|escape:'htmlall'}" class="form-control{if isset($price_error)} is-invalid{/if}" placeholder="0.00">
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="source">Store/Retailer</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="source" name="source" type="text" value="{$row.source|escape:'htmlall'}" class="form-control{if isset($source_error)} is-invalid{/if}" maxlength="255" placeholder="Source">
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="ranking">Ranking</label>
|
|
</div>
|
|
<div class="col">
|
|
<select id="ranking" size="{count($ranks)}" name="ranking" multiple="multiple" class="form-select">
|
|
{foreach from=$ranks item=rankrow}
|
|
<option value="{$rankrow.ranking}" {if $rankrow.ranking == $row.rankid}SELECTED{/if}>{$rankrow.title}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{if $opt.allow_multiples}
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="quantity">Quantity</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="quantity" name="quantity" type="text" value="{$row.quantity|escape:'htmlall'}" class="form-control{if isset($quantity_error)} is-invalid{/if}" maxlength="3">
|
|
</div>
|
|
</div>
|
|
{else}
|
|
<input type="hidden" name="quantity" value="1">
|
|
{/if}
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="url">URL</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="url" name="url" type="text" inputmode="url" autocapitalize="off" spellcheck="false" value="{$row.url|escape:'htmlall'}" class="form-control{if isset($url_error)} is-invalid{/if}" maxlength="255">
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="control-label" for="image">Image</label>
|
|
</div>
|
|
{if $opt.allow_images}
|
|
<div class="col">
|
|
{if $row.image_filename == ''}
|
|
<input type="radio" name="image" value="none" CHECKED>
|
|
No image.<br />
|
|
<input type="radio" name="image" value="upload" id="ifnew">
|
|
Upload image:
|
|
<input type="file" id="imagefile" name="imagefile">
|
|
{else}
|
|
<input type="radio" name="image" value="remove">
|
|
Remove existing image.<br />
|
|
<input type="radio" name="image" value="keep" CHECKED>
|
|
Keep existing image.<br />
|
|
<input type="radio" name="image" value="replace" id="ifreplace">
|
|
Replace existing image:
|
|
<input type="file" id="imagefile" name="imagefile">
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="public">Make public</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="public" name="public" type="checkbox" class="form-check-input" {if $row.public == 1}checked{/if}>
|
|
</div> <!-- col -->
|
|
</div> <!-- row -->
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="comment">Comment</label>
|
|
</div>
|
|
<div class="col">
|
|
<textarea id="comment" name="comment" class="form-control{if isset($comment_error)} is-invalid{/if}" rows="2" cols="40">{$row.comment|escape:'htmlall'}</textarea>
|
|
</div> <!-- col -->
|
|
</div> <!-- row -->
|
|
</div> <!-- modal-body -->
|
|
<div class="modal-footer">
|
|
{if $row.url != ''}<a role="button" class="btn btn-secondary" href="{$row.url}" target="_blank" title="{$row.url}"><img alt="Visit URL" title="Visit URL" src="images/link-dark.png" border="0" /></a>{/if}
|
|
{if isset($row.image_filename)}<a role="button" class="btn btn-secondary" href="{$opt.image_subdir}/{$row.image_filename}" title="{$row.name|escape:'htmlall'}" data-lightbox="image-1"><img alt="View Image" title="View Image" src="images/image-dark.png" border="0" /></a>{/if}
|
|
<a role="button" class="btn btn-secondary" href="receive.php?itemid={$row.itemid}" ><img alt="Mark Item Received" src="images/return-dark.png" title="Mark Item Received" border="0" /></a>
|
|
<a role="button" class="btn btn-secondary" href="item.php?action=unarchive&itemid={$row.itemid}"><img alt="Unarchive Item" title="Unarchive Item" src="images/basket3-fill-dark.png" border="0" /></a>
|
|
<a role="button" class="btn btn-danger" rel="confirmitemdelete" data-content="{$row.name|escape:'htmlall'}" href="item.php?action=delete&itemid={$row.itemid}"><img alt="Delete Item" title="Delete Item" src="images/bin-dark.png" border="0" /></a>
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
<button type="submit" class="btn btn-primary">Save</button>
|
|
</div> <!-- modal-footer -->
|
|
</div> <!-- modal-content -->
|
|
</div> <!-- modal-dialog -->
|
|
</div> <!-- modal -->
|
|
</form>
|
|
<a href="#" data-bs-toggle="modal" data-bs-target="#editmodal_{$row.itemid}">
|
|
<span title="{$row.description|escape:'htmlall'}">{$row.name|truncate:50|escape:'htmlall'}</span>
|
|
</a>
|
|
<span title="{$row.description|escape:'htmlall'}">
|
|
{if $row.public == 1} <img alt="Item is Public" class="theme-image" data-light-src="images/globe-light.png" data-dark-src="images/globe-dark.png" src="images/globe-light.png" border="0" title="Item is Public">{/if}
|
|
</td>
|
|
<td nowrap class="text-center">{$row.rankid}</td>
|
|
<td nowrap class="text-center">{$row.quantity}</td>
|
|
<td>{$row.category|default:" "}</td>
|
|
<td>{$row.source|default:" "}</td>
|
|
<td align="right">{$row.price}</td>
|
|
<td align="right" nowrap>
|
|
{if $row.url != ''}
|
|
<a href="{$row.url}" target="_blank" title="{$row.url}"><img class="theme-image" data-light-src="images/link-light.png" data-dark-src="images/link-dark.png" src="images/link-light.png" border="0" alt="Link" /></a>
|
|
{/if}
|
|
{if $row.image_filename != '' && $opt.allow_images}
|
|
<a href="{$opt.image_subdir}/{$row.image_filename}" title="{$row.name|escape:'htmlall'}" data-lightbox="image-1"><img class="theme-image" data-light-src="images/image-light.png" data-dark-src="images/image-dark.png" src="images/image-light.png" border="0" alt="Image" /></a>
|
|
{/if}
|
|
<a href="receive.php?itemid={$row.itemid}" class="text-decoration-none"><img alt="Mark Item Received" class="theme-image" data-light-src="images/return-light.png" data-dark-src="images/return-dark.png" src="images/return-light.png" border="0" title="Mark Item Received" /></a>
|
|
<a href="#" data-bs-toggle="modal" data-bs-target="#editmodal_{$row.itemid}"><img alt="Edit Item" class="theme-image" data-light-src="images/pencil-light.png" data-dark-src="images/pencil-dark.png" src="images/pencil-light.png" border="0" title="Edit Item" /></a>
|
|
<a href="item.php?action=unarchive&itemid={$row.itemid}" class="text-decoration-none"><img alt="Unarchive Item" class="theme-image" data-light-src="images/basket3-fill-light.png" data-dark-src="images/basket3-fill-dark.png" src="images/basket3-fill-light.png" border="0" alt="Unarchive" title="Unarchive Item" /></a>
|
|
<a rel="confirmitemdelete" data-content="{$row.name|escape:'htmlall'}" href="item.php?action=delete&itemid={$row.itemid}" class="text-decoration-none"><img alt="Delete Item" class="theme-image" data-light-src="images/bin-light.png" data-dark-src="images/bin-dark.png" src="images/bin-light.png" border="0" alt="Delete" title="Delete Item" /></a>
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- table-responsive -->
|
|
{if $myitems_count > $opt.items_per_page || $offset > 0}
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination justify-content-center">
|
|
<li class="page-item{if $offset + $opt.items_per_page < $myitems_count} disabled{/if}"><a class="page-link" href="index.php?offset={$offset - $opt.items_per_page}">«</a></li>
|
|
{for $i=0 to $myitems_count step $opt.items_per_page}
|
|
<li class="page-item{if $offset >= $i && $offset < $i + $opt.items_per_page} active{/if}"><a class="page-link" href="index.php?offset={$i}">{$i + $opt.items_per_page}</a></li>
|
|
{/for}
|
|
<li class="page-item{if $offset >= $opt.items_per_page} disabled{/if}"><a class="page-link" href="index.php?offset={$offset + $opt.items_per_page}">»</a></li>
|
|
</ul>
|
|
</nav> <!-- pagination -->
|
|
{/if}
|
|
</div> <!-- card-body -->
|
|
<div class="card-footer text-body-secondary">
|
|
<form name="itemform" id="additemform" method="POST" action="item.php" enctype="multipart/form-data" class="well form-horizontal">
|
|
<div class="modal" tabindex="-1" id="addmodal">
|
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Add Item</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div> <!-- modal-header -->
|
|
<div class="modal-body">
|
|
<input type="hidden" name="action" value="insert">
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="description">Name</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="name" name="name" type="text" value="" class="form-control{if isset($name_error)} is-invalid{/if}" placeholder="Name" maxlength="100" required>
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="description">Description</label>
|
|
</div>
|
|
<div class="col">
|
|
<textarea id="description" name="description" class="form-control{if isset($description_error)} is-invalid{/if}" rows="2" cols="40"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="category">Category</label>
|
|
</div>
|
|
<div class="col">
|
|
<select id="category" name="category" class="form-select">
|
|
{foreach from=$categories item=catrow}
|
|
<option value="{$catrow.categoryid}" {if $catrow.categoryid == $opt.default_category}SELECTED{/if}>{$catrow.category|escape:'htmlall'}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="price">Price ({$opt.currency_symbol})</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="price" name="price" type="text" value="" class="form-control{if isset($price_error)} is-invalid{/if}" placeholder="0.00">
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="source">Store/Retailer</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="source" name="source" type="text" value="" class="form-control{if isset($source_error)} is-invalid{/if}" maxlength="255" placeholder="Source">
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="ranking">Ranking</label>
|
|
</div>
|
|
<div class="col">
|
|
<select id="ranking" size="{count($ranks)}" name="ranking" multiple="multiple" class="form-select">
|
|
{foreach from=$ranks item=rankrow}
|
|
<option value="{$rankrow.ranking}" {if $rankrow.ranking == $opt.default_ranking}SELECTED{/if}>{$rankrow.title}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{if $opt.allow_multiples}
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="quantity">Quantity</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="quantity" name="quantity" type="text" value="" class="form-control{if isset($quantity_error)} is-invalid{/if}" maxlength="3">
|
|
</div>
|
|
</div>
|
|
{else}
|
|
<input type="hidden" name="quantity" value="1">
|
|
{/if}
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="url">URL</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="url" name="url" type="text" inputmode="url" autocapitalize="off" spellcheck="false" value="" class="form-control{if isset($url_error)} is-invalid{/if}" maxlength="255">
|
|
</div>
|
|
</div>
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="control-label" for="image">Image</label>
|
|
</div>
|
|
{if $opt.allow_images}
|
|
<div class="col">
|
|
<input type="radio" name="image" value="none" CHECKED>
|
|
No image.<br />
|
|
<input type="radio" name="image" value="upload" id="ifnew">
|
|
Upload image:
|
|
<input type="file" id="imagefile" name="imagefile">
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="public">Make public</label>
|
|
</div>
|
|
<div class="col">
|
|
<input id="public" name="public" type="checkbox" class="form-check-input">
|
|
</div> <!-- col -->
|
|
</div> <!-- row -->
|
|
<div class="row row-cols-2 mb-2 g-3 align-items-center">
|
|
<div class="col-4">
|
|
<label class="col-form-label" for="comment">Comment</label>
|
|
</div>
|
|
<div class="col">
|
|
<textarea id="comment" name="comment" class="form-control{if isset($comment_error)} is-invalid{/if}" rows="2" cols="40"></textarea>
|
|
</div> <!-- col -->
|
|
</div> <!-- row -->
|
|
</div> <!-- modal-body -->
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
<button type="submit" class="btn btn-primary">Save</button>
|
|
</div> <!-- modal-footer -->
|
|
</div> <!-- modal-content -->
|
|
</div> <!-- modal-dialog -->
|
|
</div> <!-- modal -->
|
|
</form>
|
|
<a href="#" data-bs-toggle="modal" data-bs-target="#addmodal">Add a new item</a>
|
|
</div> <!-- card-footer -->
|
|
</div> <!-- card -->
|
|
</div> <!-- container -->
|
|
</main>
|
|
{include file='footer.tpl'}
|
|
</body>
|
|
</html>
|