mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Fix date picker
This commit is contained in:
@@ -165,6 +165,22 @@ Alpine.data('adminUserEdit', () => ({
|
||||
const y = document.getElementById('expiry_year'), m = document.getElementById('expiry_month');
|
||||
if (y) y.addEventListener('change', () => this.updateValidDays());
|
||||
if (m) m.addEventListener('change', () => this.updateValidDays());
|
||||
|
||||
// Setup quick action buttons
|
||||
document.querySelectorAll('[data-expiry-action]').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
const action = btn.dataset.expiryAction;
|
||||
if (action === 'set') {
|
||||
const days = parseInt(btn.dataset.days) || 0;
|
||||
const hours = parseInt(btn.dataset.hours) || 0;
|
||||
this.setExpiry(days, hours);
|
||||
} else if (action === 'end-of-day') {
|
||||
this.setEndOfDay();
|
||||
} else if (action === 'clear') {
|
||||
this.clearExpiry();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
_updatePreview() {
|
||||
|
||||
@@ -41,6 +41,14 @@ const lazyComponentMap = {
|
||||
'recentActivity': () => import('./components/admin/dashboard.js'), // same file
|
||||
'adminGroups': () => import('./components/admin/groups.js'),
|
||||
'adminFeatures': () => import('./components/admin/features.js'),
|
||||
'adminUserEdit': () => import('./components/admin/features.js'), // same file
|
||||
'adminUserList': () => import('./components/admin/features.js'), // same file
|
||||
'adminDeletedUsers': () => import('./components/admin/features.js'), // same file
|
||||
'adminInvitations': () => import('./components/admin/features.js'), // same file
|
||||
'adminRegexForm': () => import('./components/admin/features.js'), // same file
|
||||
'tinyMceEditor': () => import('./components/admin/features.js'), // same file
|
||||
'verifyUser': () => import('./components/admin/features.js'), // same file
|
||||
'tmuxEdit': () => import('./components/admin/features.js'), // same file
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
@endif
|
||||
|
||||
<!-- User Form -->
|
||||
<form method="post" action="{{ url('admin/user-edit') }}" class="p-6">
|
||||
<form method="post" action="{{ url('admin/user-edit') }}" class="p-6" x-data="adminUserEdit">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="submit">
|
||||
@if(!empty($user['id']))
|
||||
|
||||
Reference in New Issue
Block a user