feat(web/hack_list): my hacks improvement

This commit is contained in:
Baoshuo Ren 2022-10-21 10:39:24 +08:00
parent 47d54be437
commit 62941dbea5
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -78,11 +78,18 @@
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control form-control-sm" name="hacker" id="input-hacker" value="<?= $q_hacker ?>" maxlength="20" style="width:10em" /> <input type="text" class="form-control form-control-sm" name="hacker" id="input-hacker" value="<?= $q_hacker ?>" maxlength="20" style="width:10em" />
<?php if (Auth::check()): ?> <?php if (Auth::check()): ?>
<a href="/hacks?hacker=<?= Auth::id() ?>" class="btn btn-outline-secondary btn-sm"> <a id="my-hacks" href="/hacks?hacker=<?= Auth::id() ?>" class="btn btn-outline-secondary btn-sm">
我的 我的
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
<script>
$('#my-hacks').click(function(event) {
event.preventDefault();
$('#input-hacker').val('<?= Auth::id() ?>');
$('#form-search').submit();
});
</script>
</div> </div>
<div id="form-group-owner" class="col-auto"> <div id="form-group-owner" class="col-auto">
<label for="input-owner" class="form-label"> <label for="input-owner" class="form-label">
@ -91,11 +98,18 @@
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control form-control-sm" name="owner" id="input-owner" value="<?= $q_owner ?>" maxlength="20" style="width:10em" /> <input type="text" class="form-control form-control-sm" name="owner" id="input-owner" value="<?= $q_owner ?>" maxlength="20" style="width:10em" />
<?php if (Auth::check()): ?> <?php if (Auth::check()): ?>
<a href="/hacks?owner=<?= Auth::id() ?>" class="btn btn-outline-secondary btn-sm"> <a id="my-owners" href="/hacks?owner=<?= Auth::id() ?>" class="btn btn-outline-secondary btn-sm">
我的 我的
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
<script>
$('#my-owners').click(function(event) {
event.preventDefault();
$('#input-owner').val('<?= Auth::id() ?>');
$('#form-search').submit();
});
</script>
</div> </div>
<div id="form-group-status" class="col-auto"> <div id="form-group-status" class="col-auto">
<label for="input-status" class="form-label"> <label for="input-status" class="form-label">