Adding delay and penalty calculations
This commit is contained in:
@@ -36,6 +36,21 @@
|
||||
pattern="^09\d{9}$"
|
||||
class="border border-gray-300 rounded-md text-center" required>
|
||||
|
||||
<label class="pb-3">تاریخ تولد:</label>
|
||||
<div class="flex flex-col gap-1">
|
||||
<input type="text" id="birthday_display"
|
||||
value="{{ $user->birthday ? \Morilog\Jalali\Jalalian::fromCarbon($user->birthday)->format('Y/m/d') : '' }}"
|
||||
placeholder="اختیاری — انتخاب تاریخ"
|
||||
class="border border-gray-300 rounded-md text-center"
|
||||
autocomplete="off" readonly>
|
||||
<input type="hidden" name="birthday" id="birthday"
|
||||
value="{{ $user->birthday ? $user->birthday->format('Y-m-d') : '' }}">
|
||||
<button type="button" id="clear_birthday"
|
||||
class="text-xs text-gray-500 hover:text-red-500 cursor-pointer self-end">
|
||||
پاک کردن
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<label class="pb-3">چت آیدی تلگرام:</label>
|
||||
<input type="text" pattern="\d+" name="chatid" value="{{ $user->chatid ?? '' }}"
|
||||
placeholder="چت آیدی تلگرام"
|
||||
@@ -71,6 +86,27 @@
|
||||
<button type="button" id="registerFingerprint" class="...">ثبت اثر انگشت</button>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#birthday_display').persianDatepicker({
|
||||
format: 'YYYY/MM/DD',
|
||||
autoClose: true,
|
||||
initialValue: false,
|
||||
toolbox: {
|
||||
calendarSwitch: {enabled: false},
|
||||
todayButton: {enabled: true, text: {fa: 'امروز'}}
|
||||
},
|
||||
onSelect: function (unix) {
|
||||
const gregorian = new persianDate(unix).toCalendar('gregorian').toLocale('en');
|
||||
$('#birthday').val(gregorian.format('YYYY-MM-DD'));
|
||||
}
|
||||
});
|
||||
|
||||
$('#clear_birthday').on('click', function () {
|
||||
$('#birthday_display').val('');
|
||||
$('#birthday').val('');
|
||||
});
|
||||
});
|
||||
|
||||
function base64urlToBuffer(base64url) {
|
||||
const padding = '='.repeat((4 - base64url.length % 4) % 4);
|
||||
const base64 = (base64url + padding).replace(/-/g, '+').replace(/_/g, '/');
|
||||
|
||||
Reference in New Issue
Block a user