DSatishchandra commited on
Commit
0981dc3
·
verified ·
1 Parent(s): 4d445df

Update templates/signup.html

Browse files
Files changed (1) hide show
  1. templates/signup.html +4 -50
templates/signup.html CHANGED
@@ -77,15 +77,15 @@
77
  <label for="name">Name:</label>
78
  <input type="text" id="name" name="name" placeholder="Enter your name" required>
79
 
80
- <label for="phone">Phone:</label>
81
- <input type="text" id="phone" name="phone" placeholder="Enter your phone number" required>
82
-
83
  <label for="email">Email:</label>
84
  <input type="email" id="email" name="email" placeholder="Enter your email" required>
85
 
86
  <label for="password">Password:</label>
87
  <input type="password" id="password" name="password" placeholder="Enter your password" required>
88
 
 
 
 
89
  <button type="submit">Sign Up</button>
90
  </form>
91
  <p>Already have an account? <a href="/login">Login</a></p>
@@ -93,51 +93,5 @@
93
  <p class="error-message">{{ error }}</p>
94
  {% endif %}
95
  </div>
96
- <div id="otp-section">
97
- <input type="text" id="phone-number" placeholder="Enter your mobile number">
98
- <button onclick="sendOTP()">Send OTP</button>
99
- <input type="text" id="otp-input" placeholder="Enter OTP">
100
- <button onclick="verifyOTP()">Verify OTP</button>
101
- </div>
102
- <script>
103
- function sendOTP() {
104
- const phone = document.getElementById('phone-number').value;
105
- fetch('/send_otp', {
106
- method: 'POST',
107
- headers: { 'Content-Type': 'application/json' },
108
- body: JSON.stringify({ phone })
109
- })
110
- .then(response => response.json())
111
- .then(data => {
112
- if (data.success) {
113
- alert(data.message);
114
- } else {
115
- alert('Error sending OTP: ' + (data.error || 'Unknown error'));
116
- }
117
- })
118
- .catch(error => console.error('Error:', error));
119
- }
120
-
121
- function verifyOTP() {
122
- const phone = document.getElementById('phone').value;
123
- const otp = document.getElementById('otp').value;
124
-
125
- fetch('/verify_otp', {
126
- method: 'POST',
127
- headers: { 'Content-Type': 'application/json' },
128
- body: JSON.stringify({ phone, otp })
129
- })
130
- .then(response => response.json())
131
- .then(data => {
132
- if (data.success) {
133
- alert(data.message);
134
- } else {
135
- alert(data.error);
136
- }
137
- })
138
- .catch(error => console.error('Error:', error));
139
- }
140
- </script>
141
-
142
  </body>
143
- </html>
 
77
  <label for="name">Name:</label>
78
  <input type="text" id="name" name="name" placeholder="Enter your name" required>
79
 
 
 
 
80
  <label for="email">Email:</label>
81
  <input type="email" id="email" name="email" placeholder="Enter your email" required>
82
 
83
  <label for="password">Password:</label>
84
  <input type="password" id="password" name="password" placeholder="Enter your password" required>
85
 
86
+ <label for="referral">Referral Code:</label>
87
+ <input type="text" id="referral" name="referral" placeholder="Enter referral code" required>
88
+
89
  <button type="submit">Sign Up</button>
90
  </form>
91
  <p>Already have an account? <a href="/login">Login</a></p>
 
93
  <p class="error-message">{{ error }}</p>
94
  {% endif %}
95
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  </body>
97
+ </html>