student 3 дней назад
Родитель
Сommit
1b91f29aa3

BIN
Content WEB PICK 10 (1).xlsx


+ 145 - 0
website/.gitignore

@@ -0,0 +1,145 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ins.
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ASP.NET application
+[Dd]ebug[Pp]rofile/
+[Pp]ublish[Ss]ettings/
+*.[Pp]ublish.xml
+*.azurePubxml
+*.pubxml
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientApp/node_modules/
+ClientApp/build/
+ClientApp/dist/
+*.swp
+*.*~
+project.lock.json
+.DS_Store
+*.pyc
+.vscode
+appsettings.Development.json
+
+# =========================
+# Java
+# =========================
+*.class
+*.log
+
+# Package Files
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs
+hs_err_pid*
+replay_pid*
+
+# Eclipse
+.classpath
+.project
+.settings/
+
+# IntelliJ IDEA
+.idea/
+*.iws
+*.iml
+*.ipr
+out/
+
+# Maven
+target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+
+# Gradle
+.gradle/
+!gradle/wrapper/gradle-wrapper.jar

+ 28 - 0
website/Areas/LotteryV2/Controllers/HomeController.cs

@@ -880,6 +880,34 @@ namespace LotteryWebApp.Areas.LotteryV2.Controllers
                     model.listTerm = new List<Term>();
                 }
 
+                if (model.termType == Constants.PIC10_BIGSMALL_CODE || model.termType == Constants.PIC10_ODDEVEN_CODE)
+                {
+                    ResultOfTermRequest pastRequest = new ResultOfTermRequest
+                    {
+                        gameId = model.termType,
+                        token = token,
+                        type = Constants.TERM_HAS_RESULT_TYPE,
+                        order = Constants.DECS,
+                        fromDate = DateTime.Now.AddDays(-10).ToString("dd/MM/yyyy"), 
+                        toDate = DateTime.Now.ToString("dd/MM/yyyy"),
+                        rowsOnPage = "5",
+                        seqPage = "1",
+                        id = Constants.ALL_DATA
+                    };
+
+                    ResultOfTermResponse pastResult = api.GetResultOfTermApi(configuration, pastRequest);
+                    if (pastResult.responseCode == Code.SUCCESS && pastResult.listTerm != null)
+                    {
+                        var pastTerms = pastResult.listTerm.Take(5).ToList();
+                        pastTerms.Reverse(); // Display chronological order
+                        ViewBag.PastTerms = pastTerms;
+                    }
+                    else
+                    {
+                        ViewBag.PastTerms = new List<Term>();
+                    }
+                }
+
                 return View(model);
             }
             catch (Exception ex)

+ 109 - 47
website/Areas/LotteryV2/Views/Home/BuyTicket.cshtml

@@ -49,14 +49,55 @@
             <div class="px-5 pt-4 pb-2">
                 <h3 class="text-[17px] font-bold text-black text-center mb-3">Results for the last 5 days</h3>
                 <div id="last5Results" class="flex justify-between gap-1.5 px-1">
-                    @* Mock data for results *@
-                    @for(int r=0; r<5; r++) {
-                        var resTitle = isBigSmall ? (r % 2 == 0 ? "Big" : "Small") : (r % 2 == 0 ? "Odd" : "Even");
-                        var resColor = isBigSmall ? (resTitle == "Big" ? "#A2FF00" : "#FF4157") : (resTitle == "Odd" ? "#FFC700" : "#B33BD0");
-                        <div class="flex flex-col items-center justify-center min-h-[64px] flex-1 rounded-lg py-1.5 border border-gray-200" style="background: linear-gradient(136deg, #FFFAE6 0%, #FFE588 100%);">
-                            <span class="text-[11px] font-bold text-black whitespace-nowrap opacity-70">Mar @(16+r)</span>
-                            <span class="text-[22px] font-black leading-tight" style="-webkit-text-stroke: 0.5px #000; color: @resColor;">@resTitle</span>
-                        </div>
+                    @{
+                        var pastTerms = ViewBag.PastTerms as List<LotteryWebApp.Service.Term> ?? new List<LotteryWebApp.Service.Term>();
+                        foreach (var term in pastTerms) {
+                            var rawResult = (term.result ?? "").Trim().ToUpper();
+                            var dateStr = "--";
+                            DateTime dt;
+                            if (DateTime.TryParse(term.date_random, out dt)) {
+                                dateStr = dt.ToString("MMM dd", System.Globalization.CultureInfo.InvariantCulture);
+                            }
+                            
+                            var resKey = rawResult;
+                            var resTitle = rawResult;
+                            if (isBigSmall) {
+                                if (rawResult == "S") { resKey = "Small"; resTitle = Lang.Small; }
+                                else if (rawResult == "B") { resKey = "Big"; resTitle = Lang.Big; }
+                            } else {
+                                if (rawResult == "O") { resKey = "Odd"; resTitle = Lang.Odd; }
+                                else if (rawResult == "E") { resKey = "Even"; resTitle = Lang.Even; }
+                            }
+                            
+                            var resColor = "";
+                            var bgStyle = "background: linear-gradient(136deg, #FFFAE6 0%, #FFE588 100%);";
+                            var textStyle = "-webkit-text-stroke: 0.5px #000;";
+
+                            if (resKey == "NA" || string.IsNullOrEmpty(rawResult)) {
+                                bgStyle = "background: #EAEAEA;";
+                                resTitle = "";
+                                textStyle = "";
+                            } else {
+                                if (isBigSmall) {
+                                    resColor = resKey == "Big" ? "#A2FF00" : "#FF4157";
+                                } else {
+                                    resColor = resKey == "Odd" ? "#FFC700" : "#B33BD0";
+                                }
+                                textStyle += $" color: {resColor};";
+                            }
+                            
+                            <div class="flex flex-col items-center justify-center min-h-[64px] flex-1 rounded-lg py-1.5 border border-gray-200" style="@bgStyle">
+                                <span class="text-[11px] font-bold text-black whitespace-nowrap opacity-70">@dateStr</span>
+                                <span class="text-[22px] font-black leading-tight" style="@textStyle">@resTitle</span>
+                            </div>
+                        }
+                        
+                        for(int r = pastTerms.Count; r < 5; r++) {
+                            <div class="flex flex-col items-center justify-center min-h-[64px] flex-1 rounded-lg py-1.5 border border-gray-200" style="background: #EAEAEA; opacity: 0.7;">
+                                <span class="text-[11px] font-bold text-black whitespace-nowrap opacity-70">--</span>
+                                <span class="text-[22px] font-black leading-tight" style="color: transparent;"></span>
+                            </div>
+                        }
                     }
                 </div>
             </div>
@@ -494,8 +535,10 @@ else
         var activeBall = null;
         var activeTicketCard = null;
         var selectedNumbers = []; // For Edit mode, this will be an array of fixed size with nulls
+        var isMultiMode = false;
 
         function editFullTicket(btn) {
+            isMultiMode = true;
             activeTicketCard = $(btn).closest('.ticket-card');
             activeBall = null;
             
@@ -562,7 +605,7 @@ else
                 var $btn = $(this);
                 var picked = $btn.text().trim();
                 
-                if (isMulti) {
+                if (isMultiMode) {
                     if (selectedNumbers.includes(picked)) {
                         // Remove
                         let idx = selectedNumbers.indexOf(picked);
@@ -579,6 +622,20 @@ else
                     liveUpdateTicket();
                 } else {
                     // Single Select mode
+                    var exists = false;
+                    if (activeTicketCard) {
+                        activeTicketCard.find('.ball-filled').each(function() {
+                            if (activeBall && this !== activeBall[0] && $(this).text().trim() === picked) {
+                                exists = true;
+                            }
+                        });
+                    }
+                    if (exists) {
+                        if (typeof showNotification === "function") {
+                            showNotification("Number already selected", "warning");
+                        }
+                        return;
+                    }
                     grid.find('.num-btn').removeClass('bg-[#EE0033] text-white shadow-md scale-105 active-num').addClass('bg-white text-gray-700 border border-gray-100');
                     selectedNumbers = [picked];
                     $btn.addClass('bg-[#EE0033] text-white shadow-md scale-105 active-num').removeClass('bg-white text-gray-700 border border-gray-100');
@@ -594,7 +651,7 @@ else
             var count = selectedNumbers.filter(n => n !== null && n !== "").length;
             $("#selectionCount").text(count);
             $("#maxSelectionCount").text(maxBalls);
-            var isValid = activeTicketCard ? (count === maxBalls) : (count === 1);
+            var isValid = isMultiMode ? (count === maxBalls) : (count === 1);
             if (isValid) {
                 $("#confirmBtn").prop('disabled', false).removeClass('opacity-50 cursor-not-allowed').addClass('cursor-pointer');
             } else {
@@ -605,53 +662,46 @@ else
         function liveUpdateTicket() {
             if (!activeTicketCard) return;
             var balls = activeTicketCard.find('.ball-circle');
-            var modalPreview = $("#modalSelectionPreview");
-            
-            // No more clearing all and sorting in fixed-position mode
-            // Just update based on index
-            modalPreview.empty();
             
-            // Update Modal Preview Bar & Ticket Card balls
-            for(var i=0; i < maxBalls; i++){
-                var val = selectedNumbers[i];
-                
-                // Update Ticket Card Ball
-                if (i < balls.length) {
-                    var tBall = $(balls[i]);
-                    if (val) {
-                        tBall.removeClass('ball-empty').addClass('ball-filled').text(val);
-                    } else {
-                        tBall.removeClass('ball-filled').addClass('ball-empty').text('');
+            if (isMultiMode) {
+                // Update Ticket Card balls
+                for(var i=0; i < maxBalls; i++){
+                    var val = selectedNumbers[i];
+                    if (i < balls.length) {
+                        var tBall = $(balls[i]);
+                        if (val) {
+                            tBall.removeClass('ball-empty').addClass('ball-filled').text(val);
+                        } else {
+                            tBall.removeClass('ball-filled').addClass('ball-empty').text('');
+                        }
                     }
                 }
+                
+                // Toggle Rand/Edit button visibility
+                if (selectedNumbers.filter(n => n !== null && n !== "").length > 0) {
+                     activeTicketCard.find('.rand-btn').hide();
+                     activeTicketCard.find('.edit-delete-group').removeClass('hidden').show();
+                } else {
+                     activeTicketCard.find('.rand-btn').show();
+                     activeTicketCard.find('.edit-delete-group').addClass('hidden');
+                }
+                
+                updateTotalPrice();
             }
-            
-            // Toggle Rand/Edit button visibility
-            if (selectedNumbers.length > 0) {
-                 activeTicketCard.find('.rand-btn').hide();
-                 activeTicketCard.find('.edit-delete-group').removeClass('hidden').show();
-            } else {
-                 activeTicketCard.find('.rand-btn').show();
-                 activeTicketCard.find('.edit-delete-group').addClass('hidden');
-            }
-            
-            updateTotalPrice();
         }
 
         // All immediate jQuery event bindings must wait for DOM + jQuery to be ready
         document.addEventListener("DOMContentLoaded", function() {
             // Click on a ball (filled or empty) to pick numbers
             $(document).on('click', '.ball-filled, .ball-empty', function() {
-                activeTicketCard = $(this).closest('.ticket-card');
+                isMultiMode = false;
+                activeBall = $(this);
+                activeTicketCard = activeBall.closest('.ticket-card');
                 
-                // Read current numbers from balls into the array
-                selectedNumbers = new Array(maxBalls).fill(null);
-                activeTicketCard.find('.ball-circle').each(function(idx) {
-                    var val = $(this).text().trim();
-                    if (val && idx < maxBalls) selectedNumbers[idx] = val;
-                });
+                var val = activeBall.text().trim();
+                selectedNumbers = val ? [val] : [];
                 
-                openNumberPicker(true);
+                openNumberPicker(false);
             });
 
             updateTotalPrice();
@@ -663,7 +713,7 @@ else
                 var count = selectedNumbers.filter(n => n !== null && n !== "").length;
                 if (count === 0) return;
 
-                if (activeTicketCard && activeTicketCard.length > 0) {
+                if (isMultiMode && activeTicketCard && activeTicketCard.length > 0) {
                     // Collect and sort for final storage/display (lottery numbers are usually sorted)
                     var finalSorted = selectedNumbers.filter(n => n !== null && n !== "").sort((a, b) => parseInt(a) - parseInt(b));
                     
@@ -682,11 +732,23 @@ else
                     activeTicketCard.find('.edit-delete-group').removeClass('hidden').show();
                     
                     updateTotalPrice();
-                } else if (activeBall && activeBall.length > 0) {
+                } else if (!isMultiMode && activeBall && activeBall.length > 0) {
                     // Single mode: Update only the active ball
                     activeBall.text(selectedNumbers[0]).removeClass('ball-empty').addClass('ball-filled');
                     activeBall.addClass('animate__animated animate__pulse');
                     setTimeout(() => activeBall.removeClass('animate__animated animate__pulse'), 500);
+                    
+                    var card = activeBall.closest('.ticket-card');
+                    var filledBalls = card.find('.ball-filled').length;
+                    if (filledBalls > 0) {
+                        card.find('.rand-btn').hide();
+                        card.find('.edit-delete-group').removeClass('hidden').show();
+                    } else {
+                        card.find('.rand-btn').show();
+                        card.find('.edit-delete-group').addClass('hidden');
+                    }
+                    
+                    updateTotalPrice();
                 }
 
                 closeNumberPicker();

+ 13 - 8
website/Areas/LotteryV2/Views/Home/GameHome.cshtml

@@ -24,14 +24,19 @@
     <div class="w-full bg-[#EE0033] p-4 text-white rounded-b-0xl shadow-md">
         <!-- Row 1: Profile Info -->
         <div class="flex items-center gap-4">
-            <div class="w-16 h-16 rounded-full border-2 border-white/60 overflow-hidden bg-[#FFE] shadow-sm">
-                <img src="https://api.dicebear.com/7.x/avataaars/svg?seed=Ngan" alt="Avatar" class="w-full h-full object-cover">
-            </div>
-            <div>
-                <div class="font-bold text-sm tracking-wide opacity-90">@(Model?.profile?.users ?? "User")</div>
-                <div class="flex items-center gap-1 mt-0.5">
-                    <span class="text-3xl font-black text-[#FBF3A7]" style="text-shadow: 0 1px 2px rgba(0,0,0,0.2)">@FormatMoney(Model?.userStatus?.bet_coin)</span>
-                    <span class="text-xs font-bold text-[#FBF3A7] uppercase mt-1">@Lang.v2_htg</span>
+            <a href="/LotteryV2/Home/Index" class="shrink-0 w-10 h-10 bg-white/20 backdrop-blur-md rounded-full flex items-center justify-center text-white border border-white/20 hover:bg-white/30 transition-all shadow-lg active:scale-90">
+                <i class="fas fa-chevron-left text-lg"></i>
+            </a>
+            <div class="flex items-center gap-4">
+                <div class="w-16 h-16 rounded-full border-2 border-white/60 overflow-hidden bg-[#FFE] shadow-sm">
+                    <img src="https://api.dicebear.com/7.x/avataaars/svg?seed=Ngan" alt="Avatar" class="w-full h-full object-cover">
+                </div>
+                <div>
+                    <div class="font-bold text-sm tracking-wide opacity-90">@(Model?.profile?.users ?? "User")</div>
+                    <div class="flex items-center gap-1 mt-0.5">
+                        <span class="text-3xl font-black text-[#FBF3A7]" style="text-shadow: 0 1px 2px rgba(0,0,0,0.2)">@FormatMoney(Model?.userStatus?.bet_coin)</span>
+                        <span class="text-xs font-bold text-[#FBF3A7] uppercase mt-1">@Lang.v2_htg</span>
+                    </div>
                 </div>
             </div>
         </div>

+ 24 - 7
website/Areas/LotteryV2/Views/Home/More.cshtml

@@ -63,7 +63,7 @@
             <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
         </div>
 
-        <!-- Item: How to play Pick 10 -->
+        <!-- Item: How to play Pick 10 
         <div class="flex items-center justify-between py-[18px] border-b-2 border-dashed border-gray-100 cursor-pointer transition-colors active:bg-gray-50" onclick="window.location.href='/LotteryV2/Home/HowToPlay'">
             <div class="flex items-center gap-4">
                 <i class="fa-regular fa-circle-question text-[#4A4A4A] text-[20px] w-6 text-center"></i>
@@ -71,8 +71,9 @@
             </div>
             <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
         </div>
+        -->
 
-        <!-- Item: Change Lang -->
+        <!-- Item: Change Lang 
         <div class="flex items-center justify-between py-[18px] border-b-2 border-dashed border-gray-100 cursor-pointer transition-colors active:bg-gray-50" onclick="toggleLanguage()">
             <div class="flex items-center gap-4">
                 <i class="fa-solid fa-language text-[#1689FC] text-[22px] w-6 text-center shadow-blue-500 drop-shadow-sm"></i>
@@ -80,6 +81,9 @@
             </div>
             <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
         </div>
+        -->
+
+
 
         <!-- Item: Contact Us -->
         <div class="flex items-center justify-between py-[18px] cursor-pointer transition-colors active:bg-gray-50">
@@ -99,6 +103,23 @@
                 @Lang.logout
             </a>
         </div>
+
+        <!-- Item: Change Language Flags -->
+        <div class="mt-8 flex items-center justify-center w-full px-1">
+            <div class="flex items-center gap-2 bg-gray-100 p-1.5 rounded-xl w-full">
+                @{
+                    var currentLang = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
+                }
+                <a href="javascript:void(0)" onclick="setLanguage('fr')" class="flex flex-1 justify-center items-center gap-2 px-3 py-2 rounded-lg transition-all @(currentLang == "fr" ? "bg-white shadow-sm border border-gray-200" : "opacity-60 hover:opacity-100")">
+                    <img src="/img/en_flag.png" alt="English" class="w-7 h-auto drop-shadow-sm" />
+                    <span class="text-[13px] font-bold text-gray-700">English</span>
+                </a>
+                <a href="javascript:void(0)" onclick="setLanguage('en')" class="flex flex-1 justify-center items-center gap-2 px-3 py-2 rounded-lg transition-all @(currentLang != "fr" ? "bg-white shadow-sm border border-gray-200" : "opacity-60 hover:opacity-100")">
+                    <img src="/img/Flag_of_Haiti.png" alt="Natcom" class="w-7 h-auto drop-shadow-sm" />
+                    <span class="text-[13px] font-bold text-gray-700">Natcom</span>
+                </a>
+            </div>
+        </div>
     </div>
     
     <!-- Real scalloped edge using CSS mask trick below the white box -->
@@ -111,11 +132,7 @@
 
 <script>
 
-    function toggleLanguage() {
-        // Toggle language based on current system culture
-        let currentLang = '@System.Threading.Thread.CurrentThread.CurrentCulture.Name';
-        let newLang = currentLang === 'en' ? 'fr' : 'en'; // Switch between en and fr
-
+    function setLanguage(newLang) {
         fetch(subDomain + '/Home/SetCulture?lang=' + newLang)
             .then(response => {
                 location.reload();

+ 5 - 5
website/Areas/LotteryV2/Views/Home/TransferWinMoney.cshtml

@@ -349,10 +349,10 @@
 
         $("#btnContinue").on("click", function() {
             if (isProcessing) return; // Prevent double-click
-
-            const amount = parseFloat($("#transferAmount").val()) || 0;
+            const rawAmount = $("#transferAmount").val();
+            const amount = parseFloat(unformatMoneyV2(rawAmount)) || 0;
             const phone = $("#receiverPhone").val();
-            const winMoney = parseFloat("@(Model?.userStatus?.bet_coin ?? "0")");
+            const winMoney = parseFloat(unformatMoneyV2("@(Model?.userStatus?.bet_coin ?? "0")")) || 0;
             
             if(amount <= 0) {
                 showFailureModal("@Html.Raw(Lang.v2_enter_valid_amount)");
@@ -374,7 +374,7 @@
             $.ajax({
                 url: subDomain + "/LotteryV2/Home/SendOTP",
                 type: "POST",
-                data: { phone: phone, amount: amount, channelPayment: selectedChannel },
+                data: { phone: phone, amount: unformatMoneyV2(rawAmount), channelPayment: selectedChannel },
                 success: function(res) {
                     $btn.prop('disabled', false).html(originalText);
                     isProcessing = false;
@@ -520,7 +520,7 @@
                 data: {
                     otp: otp,
                     phone: $("#receiverPhone").val(),
-                    amount: $("#transferAmount").val(),
+                    amount: unformatMoneyV2($("#transferAmount").val()),
                     channelPayment: selectedChannel
                 },
                 success: function(res) {

+ 5 - 0
website/Areas/LotteryV2/Views/Shared/_Layout.cshtml

@@ -63,6 +63,11 @@
             if (str === "") return "0";
             return str.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
         }
+
+        function unformatMoneyV2(amount) {
+            if (amount === undefined || amount === null || amount === "") return "0";
+            return amount.toString().replace(/[^0-9]/g, '');
+        }
     </script>
 
 

+ 3 - 3
website/Views/Account/ForgotPassword.cshtml

@@ -1,4 +1,4 @@
-@{
+@{
     ViewData["Title"] = "ForgotPassword";
     Layout = "~/Views/Shared/_NothingLayout.cshtml";
 }
@@ -45,8 +45,8 @@
                             {
                                 <fieldset class="form-group position-relative has-icon-left" style="margin:10px;">
                                     <label>@Lang.fill_your_number</label>
-                                    <input type="number" class="data-input-box form-control" id="phonenumber" style="border-radius: 10px;"
-                                       placeholder="@Lang.enter_phone_number" name="phonenumber" required>
+                                    <input type="tel" class="data-input-box form-control" id="phonenumber" style="border-radius: 10px;"
+                                       placeholder="@Lang.enter_phone_number" name="phonenumber" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required>
 
                                     <div class="form-control-position" style="top: 35px;">
                                         <i class="fa fa-user"></i>

+ 6 - 5
website/Views/Account/Login.cshtml

@@ -290,11 +290,12 @@
             <div class="custom-phone-input">
                 <div class="prefix-box">+509</div>
                 <div class="input-box">
-                    <input type="number" 
+                    <input type="tel" 
                            id="phonenumber" 
                            class="phone-field" 
                            placeholder="888 999 888" 
                            name="phonenumber" 
+                           oninput="this.value = this.value.replace(/[^0-9]/g, '')"
                            required 
                            autofocus>
                 </div>
@@ -310,10 +311,10 @@
             </div>
 
             <form id="otpForm" action="/verify-otp" method="POST" class="otp-container">
-                <input class="otp-input otp-box-0" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" required autofocus />
-                <input class="otp-input otp-box-1" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" required />
-                <input class="otp-input otp-box-2" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" required />
-                <input class="otp-input otp-box-3" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" required />
+                <input class="otp-input otp-box-0" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required autofocus />
+                <input class="otp-input otp-box-1" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required />
+                <input class="otp-input otp-box-2" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required />
+                <input class="otp-input otp-box-3" pattern="\d{1}" inputmode="numeric" name="lottery-otp-box" maxlength="1" placeholder="-" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required />
             </form>
 
             <div style="text-align: center; margin-bottom: 20px;">

+ 2 - 2
website/Views/Account/Register.cshtml

@@ -1,4 +1,4 @@
-@{
+@{
     ViewData["Title"] = "Register";
     Layout = "~/Views/Shared/_NothingLayout.cshtml";
 }
@@ -36,7 +36,7 @@
                                 {
                                     <fieldset class="form-group position-relative has-icon-left">
                                         <label>@Lang.phone_number</label>
-                                        <input type="number" class="data-input-box form-control" id="phonenumber" placeholder="@Lang.enter_phone_number" name="phonenumber" required>
+                                        <input type="tel" class="data-input-box form-control" id="phonenumber" placeholder="@Lang.enter_phone_number" name="phonenumber" oninput="this.value = this.value.replace(/[^0-9]/g, '')" required>
 
                                         <div class="form-control-position" style="top: 35px;">
                                             <i class="fa fa-user"></i>