final
This commit is contained in:
parent
3b9b4ab36d
commit
1ce7da4f8d
@ -66,7 +66,7 @@ class Donor_controller extends BaseController
|
|||||||
$rules=[
|
$rules=[
|
||||||
'name' =>'required|min_length[3]|max_length[30]',
|
'name' =>'required|min_length[3]|max_length[30]',
|
||||||
'phone' =>'required|min_length[3]|max_length[10]',
|
'phone' =>'required|min_length[3]|max_length[10]',
|
||||||
'email' =>'required|min_length[6]|max_length[50]|valid_email|is_unique[donar_management.email]',
|
'email' =>'required|min_length[6]|max_length[50]|valid_email|is_unique[user_management.email]',
|
||||||
'pan' =>'required|min_length[3]|max_length[20]',
|
'pan' =>'required|min_length[3]|max_length[20]',
|
||||||
'address' =>'required|min_length[3]|max_length[70]',
|
'address' =>'required|min_length[3]|max_length[70]',
|
||||||
'pin_code' =>'required|min_length[6]|max_length[6]',
|
'pin_code' =>'required|min_length[6]|max_length[6]',
|
||||||
|
|||||||
@ -14,7 +14,41 @@ class My_controller extends BaseController
|
|||||||
$this->Dashboard_model = new Dashboard_model();
|
$this->Dashboard_model = new Dashboard_model();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public function donor_register() {
|
||||||
|
// helper(['form', 'url']);
|
||||||
|
|
||||||
|
// $input = $this->validate([
|
||||||
|
// 'name' =>'required|min_length[3]|max_length[20]',
|
||||||
|
// 'phone' =>'required|min_length[3]|max_length[10]',
|
||||||
|
// 'email' =>'required|min_length[6]|max_length[50]|valid_email|is_unique[donar_management.email]',
|
||||||
|
// 'pan' =>'required|min_length[3]|max_length[20]',
|
||||||
|
// 'address' =>'required|min_length[3]|max_length[70]',
|
||||||
|
// 'country' =>'required',
|
||||||
|
// 'state' =>'required',
|
||||||
|
// 'city' =>'required',
|
||||||
|
// 'pin_code' =>'required|min_length[6]|max_length[6]',
|
||||||
|
// 'date_of_birth' =>'required|min_length[3]|max_length[20]',
|
||||||
|
// 'gender' =>'required',
|
||||||
|
// 'org_name' =>'required|min_length[3]|max_length[20]',
|
||||||
|
// 'gstin' =>'required|min_length[3]|max_length[20]',
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
// $formModel = new FormModel();
|
||||||
|
|
||||||
|
// if (!$input) {
|
||||||
|
// echo view('contact_form', [
|
||||||
|
// 'validation' => $this->validator
|
||||||
|
// ]);
|
||||||
|
// } else {
|
||||||
|
// $formModel->save([
|
||||||
|
// 'name' => $this->request->getVar('name'),
|
||||||
|
// 'email' => $this->request->getVar('email'),
|
||||||
|
// 'phone' => $this->request->getVar('phone'),
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
// return $this->response->redirect(site_url('/submit-form'));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -22,7 +56,7 @@ class My_controller extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
$data['country']=$this->Dashboard_model->fetch_country();
|
$data['country']=$this->Dashboard_model->fetch_country();
|
||||||
helper(['form']);
|
helper(['form', 'url']);
|
||||||
if(!session()->has('logged_user'))
|
if(!session()->has('logged_user'))
|
||||||
{
|
{
|
||||||
return redirect()->to(base_url());
|
return redirect()->to(base_url());
|
||||||
@ -44,15 +78,14 @@ class My_controller extends BaseController
|
|||||||
'city' =>'required',
|
'city' =>'required',
|
||||||
'pin_code' =>'required|min_length[6]|max_length[6]',
|
'pin_code' =>'required|min_length[6]|max_length[6]',
|
||||||
'date_of_birth' =>'required|min_length[3]|max_length[20]',
|
'date_of_birth' =>'required|min_length[3]|max_length[20]',
|
||||||
'gender' =>'required|min_length[3]|max_length[20]',
|
'gender' =>'required',
|
||||||
'org_name' =>'required|min_length[3]|max_length[20]',
|
'org_name' =>'required|min_length[3]|max_length[20]',
|
||||||
'gstin' =>'required|min_length[3]|max_length[20]',
|
'gstin' =>'required|min_length[3]|max_length[20]',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if(! $this->validate($rules))
|
if(! $this->validate($rules))
|
||||||
{
|
{
|
||||||
$data['validation'] = $this->validator;
|
$data['validation'] = $this->validator;
|
||||||
//echo '<script>alert("Please import correct file, did not match excel sheet column")</script>';
|
//echo '<script>alert("Please import correct file, did not match excel sheet column")</script>';
|
||||||
}else{
|
}else{
|
||||||
$Address_model = new Address_model();
|
$Address_model = new Address_model();
|
||||||
@ -194,6 +227,8 @@ class My_controller extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -343,7 +343,7 @@ $(document).ready(function(){
|
|||||||
<div class="name">PinCode</div>
|
<div class="name">PinCode</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="input--style-5" type="text" name="pin_code" id="pin_code">
|
<input class="input--style-5" type="text" name="pin_code" id="pin_code" value="<?= set_value('pin_code') ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -389,18 +389,25 @@ $(document).ready(function(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<?php $validation = \Config\Services::validation(); ?>
|
||||||
<div class="name">
|
|
||||||
|
|
||||||
<?php if(isset($validation)): ?>
|
<?php if(isset($validation)): ?>
|
||||||
<div class="alert alert-danger" role="aler">
|
<div class='alert alert-danger mt-2'>
|
||||||
<?= $validation->listErrors() ?>
|
<?= $validation->listErrors() ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--- <?php if($validation->getError('phone')) {?>
|
||||||
|
<div class='alert alert-danger mt-2'>
|
||||||
|
<?= $error = $validation->getError('phone'); ?>
|
||||||
|
</div>
|
||||||
|
<?php }?>---->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button class="btn btn--radius-2 btn--red" type="submit">Register</button>
|
<button class="btn btn--radius-2 btn--red" type="submit">Register</button>
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
__ci_last_regenerate|i:1609821938;_ci_previous_url|s:40:"http://localhost/donation/donor_register";logged_user|s:1:"3";
|
||||||
@ -0,0 +1 @@
|
|||||||
|
__ci_last_regenerate|i:1609821140;_ci_previous_url|s:40:"http://localhost/donation/donor_register";logged_user|s:1:"3";
|
||||||
@ -0,0 +1 @@
|
|||||||
|
__ci_last_regenerate|i:1609822667;_ci_previous_url|s:40:"http://localhost/donation/donor_register";logged_user|s:1:"3";
|
||||||
@ -0,0 +1 @@
|
|||||||
|
__ci_last_regenerate|i:1609820338;_ci_previous_url|s:32:"http://localhost/donation/signup";
|
||||||
@ -0,0 +1 @@
|
|||||||
|
__ci_last_regenerate|i:1609823015;_ci_previous_url|s:26:"http://localhost/donation/";
|
||||||
@ -0,0 +1 @@
|
|||||||
|
__ci_last_regenerate|i:1609822987;_ci_previous_url|s:40:"http://localhost/donation/donor_register";logged_user|s:1:"3";
|
||||||
Loading…
Reference in New Issue
Block a user