master changes

This commit is contained in:
venbatechnologies@gmail.com 2018-08-02 09:52:57 +05:30
parent c996d14041
commit f65139c9c4
7 changed files with 240 additions and 77 deletions

View File

@ -57,6 +57,7 @@ $route['translate_uri_dashes'] = FALSE;
$route['Routes'] = 'Dashboard_Controller/index'; $route['Routes'] = 'Dashboard_Controller/index';
$route['Dashboard'] = 'Dashboard_Controller/Dashboard'; $route['Dashboard'] = 'Dashboard_Controller/Dashboard';
$route['country_master'] = 'Dashboard_Controller/country_master'; $route['country_master'] = 'Dashboard_Controller/country_master';
$route['SaveAll_country_master'] = 'Dashboard_Controller/SaveAll_country_master'; $route['SaveAll_country_master'] = 'Dashboard_Controller/SaveAll_country_master';
$route['GetAll_country_master'] = 'Dashboard_Controller/GetAll_country_master'; $route['GetAll_country_master'] = 'Dashboard_Controller/GetAll_country_master';
@ -66,17 +67,18 @@ $route['Add_city_master'] = 'Dashboard_Controller/Add_city_master';
$route['visa_type_master'] = 'Dashboard_Controller/visa_type_master'; $route['visa_type_master'] = 'Dashboard_Controller/visa_type_master';
$route['Add_visa_type_master'] = 'Dashboard_Controller/Add_visa_type_master'; $route['SaveAll_visa_type_master'] = 'Dashboard_Controller/SaveAll_visa_type_master';
$route['GetAll_visa_type'] = 'Dashboard_Controller/GetAll_visa_type_master';
$route['document_master'] = 'Dashboard_Controller/document_master'; $route['document_master'] = 'Dashboard_Controller/document_master';
$route['Add_document_master'] = 'Dashboard_Controller/Add_document_master'; $route['SaveAll_document_master'] = 'Dashboard_Controller/SaveAll_document_master';
$route['GetAll_document_master'] = 'Dashboard_Controller/GetAll_document_master';
$route['country_visa_details'] = 'Dashboard_Controller/country_visa_details'; $route['country_visa_details'] = 'Dashboard_Controller/country_visa_details';
$route['favourite'] = 'Favourite_Controller/favourite'; $route['favourite'] = 'Favourite_Controller/favourite';
$route['loginMe'] = 'Login_Controller/loginMe'; $route['loginMe'] = 'Login_Controller/loginMe';
$route['forgotPassword'] = "Login_Controller/forgotPassword"; $route['forgotPassword'] = "Login_Controller/forgotPassword";
$route['resetPasswordUser'] = "Login_Controller/resetPasswordUser"; $route['resetPasswordUser'] = "Login_Controller/resetPasswordUser";

View File

@ -69,7 +69,7 @@ class Dashboard_Controller extends BaseController
else{ else{
$Edited = $this->Dashboard_Model->Update_CountryMaster($CountryMasterDatas, $CountryCode); $Edited = $this->Dashboard_Model->Update_CountryMaster($CountryMasterDatas, $CountryCode);
echo $Edited == True ? "<script>alert('$CountryCode Details Successfully Updated!');window.location.href='country_master';</script>" echo $Edited == True ? "<script>alert('Successfully Updated $CountryCode Details! ');window.location.href='country_master';</script>"
: "<script>alert('Sorry Not Updated ! Try Again'); window.location.href='country_master';</script>"; : "<script>alert('Sorry Not Updated ! Try Again'); window.location.href='country_master';</script>";
} }
@ -129,67 +129,112 @@ class Dashboard_Controller extends BaseController
*/ */
function visa_type_master(){ function visa_type_master(){
$this->global['pageTitle'] = 'Visa : Visa Type Master'; $this->global['pageTitle'] = 'Visa : Visa Type Master';
$data['getvisatype']= $this->Dashboard_Model->Get_VisaTypeMaster(); $data['getvisatype']= $this->Dashboard_Model->Get_VisaTypeMaster($VisaNo='');
$this->loadViews('visa_type_master', $this->global,$data , NULL); $this->loadViews('visa_type_master', $this->global,$data , NULL);
} }
/** /**
* To Store Visa Type Master Values * To Store Visa Type Master Values
*/ */
function Add_visa_type_master(){ function SaveAll_visa_type_master(){
$VisaCode = $this->input->post('HideVisaCode'); // value getting from hidden field
$VisaTypeMasterDatas = $VisaTypeMasterDatas =
array( 'VisaName'=>$this->input->post('VisaName'), array( 'VisaName'=>$this->input->post('VisaName'),
'VisaDescription'=>$this->input->post('VisaDescription'), 'VisaDescription'=>$this->input->post('VisaDescription'),
'IsActive'=>$this->input->post('IsActive') != '' ? 1 : 0); 'IsActive'=>$this->input->post('IsActive') != '' ? 1 : 0);
$Added = $this->Dashboard_Model->Add_VisaType($VisaTypeMasterDatas); if($VisaCode == ''){
$Added = $this->Dashboard_Model->Add_VisaType($VisaTypeMasterDatas);
echo $Added != "" ? "<script>alert('Created Successfully ! Visa NO :$Added'); window.location.href='visa_type_master';</script>"
: "<script>alert('Sorry Not Created ! Try Again'); window.location.href='visa_type_master';</script>";
if( $Added != "" ){
echo "<script>alert('Created Successfully ! Visa NO :$Added'); window.location.href='visa_type_master';</script>";
} }
else else{
{ $Edited = $this->Dashboard_Model->Update_VisaType($VisaTypeMasterDatas,$VisaCode);
echo "<script>alert('Sorry Not Created ! Try Again '); window.location.href='visa_type_master';</script>";
echo $Edited == True ? "<script>alert('Successfully Updated ! ');window.location.href='visa_type_master';</script>"
: "<script>alert('Sorry Not Updated ! Try Again'); window.location.href='visa_type_master';</script>";
} }
} }
/**
* View - visa_type_master
* Get an argument From Ajax Call - 'arg' is VisaNo
* Return Datas to View Through JSON_encode
*/
function GetAll_visa_type_master() {
$VisaNo = $this->input->post('arg');
$EditIt = $this->Dashboard_Model->Get_VisaTypeMaster($VisaNo);
echo json_encode($EditIt);
}
/** /**
* This function used to load the Document page * This function used to load the Document page
*/ */
function document_master(){ function document_master(){
$this->global['pageTitle'] = 'Visa : Upload Document'; $this->global['pageTitle'] = 'Visa : Upload Document';
$data['getdocument'] =$this->Dashboard_Model->Get_DocumentMaster(); $data['getdocument'] =$this->Dashboard_Model->Get_DocumentMaster($DocNo='');
$this->loadViews('document_upload', $this->global,$data , NULL); $this->loadViews('document_upload', $this->global,$data , NULL);
} }
/** /**
* To Store Visa's File & Documents Datas * To Store Visa's File & Documents Datas
*/ */
function Add_document_master(){ function SaveAll_document_master(){
$DocNo = $this->input->post('HideDocumentCode'); // value getting from hidden field
$Doc = $this->input->post('HideDocument'); // value getting from hidden field
$DocumentMasterDatas = $DocumentMasterDatas =
array( 'DocumentName'=>$this->input->post('DocumentName'), array( 'DocumentName'=>$this->input->post('DocumentName'),
'Document'=>$this->uploadFile(), 'Document'=>$Doc == '' ? $this->uploadFile() : $Doc ,
'DocumentDescription'=>$this->input->post('Description'), 'DocumentDescription'=>$this->input->post('Description'),
'IsActive'=>$this->input->post('IsActive') != '' ? 1 : 0); 'IsActive'=>$this->input->post('IsActive') != '' ? 1 : 0);
$Added = $this->Dashboard_Model->Add_Document($DocumentMasterDatas); if($DocNo == ''){
$Added = $this->Dashboard_Model->Add_Document($DocumentMasterDatas);
echo $Added != "" ? "<script>alert('Created Successfully ! Document NO :$Added'); window.location.href='document_master';</script>"
: "<script>alert('Sorry Not Created ! Try Again '); window.location.href='document_master';</script>";
if( $Added != "" ){
echo "<script>alert('Created Successfully ! Document NO :$Added'); window.location.href='document_master';</script>";
} }
else else{
{ $Edited = $this->Dashboard_Model->Update_Document($DocumentMasterDatas,$DocNo);
echo "<script>alert('Sorry Not Created ! Try Again '); window.location.href='document_master';</script>";
echo $Edited == True ? "<script>alert('Successfully Updated ! ');window.location.href='document_master';</script>"
: "<script>alert('Sorry Not Updated ! Try Again'); window.location.href='document_master';</script>";
} }
} }
/**
* View - document_upload
* Get an argument From Ajax Call - 'arg' is DocumentNo
* Return Datas to View Through JSON_encode
*/
function GetAll_document_master() {
$DocNo = $this->input->post('arg');
$EditIt = $this->Dashboard_Model->Get_DocumentMaster($DocNo);
echo json_encode($EditIt);
}
/** /**
* To upload IGR files * To upload IGR files
*/ */

View File

@ -5,7 +5,7 @@ class Dashboard_Model extends CI_Model{
/** /**
* To store Country Related details into 'Tab_CountryMaster' table * To store Country Related details into 'Tab_CountryMaster' table
* @param array $CountryMasterDatas : Its have all the Contry master datas * @param array $CountryMasterDatas : Its have all the Contry master datas
* @return $CountryMaster : This will return how many value are inserted (return as count) * @return $CountryMaster : This will return Last inserted id of Country Master
*/ */
function Add_CountryMaster($CountryMasterDatas) function Add_CountryMaster($CountryMasterDatas)
{ {
@ -16,9 +16,9 @@ class Dashboard_Model extends CI_Model{
return $id; return $id;
} }
/** /**
* To Update the values of Country detail on respective CounterCode into 'Tab_CountryMaster' table * To Update the values of Country detail on respective CounterCode and store into 'Tab_CountryMaster' table
* @param arry $CountryMasterDatas : This will have all the edited Country Details * @param array $CountryMasterDatas : This will have all the edited Country Details
* @param number $Cc : This is Country code * @param number $Cc : This is Country code
*/ */
function Update_CountryMaster($CountryMasterDatas, $Cc) function Update_CountryMaster($CountryMasterDatas, $Cc)
@ -29,9 +29,9 @@ class Dashboard_Model extends CI_Model{
} }
/** /**
* To Update the values of Country detail on respective CounterCode into 'Tab_CountryMaster' table * To Get the Country Master Data from respective CounterCode from 'Tab_CountryMaster' table
* @param arry $CountryMasterDatas : This will have all the edited Country Details
* @param number $Cc : This is Country code * @param number $Cc : This is Country code
* @return array $CountryMasterDatas : This will have all the Country Master Datas
*/ */
function Get_CountryMaster($Cc) function Get_CountryMaster($Cc)
{ {
@ -47,7 +47,7 @@ class Dashboard_Model extends CI_Model{
/** /**
* To store City Related details into 'Tab_CityMaster' table * To store City Related details into 'Tab_CityMaster' table
* @param array $CityMasterDatas : Its have all the City master datas * @param array $CityMasterDatas : Its have all the City master datas
* @return $CityMaster : This will return how many value are inserted (return as count) * @return $CityMaster : This will return Last inserted id of City Master
*/ */
function Add_CityMaster($CityMasterDatas) function Add_CityMaster($CityMasterDatas)
{ {
@ -69,8 +69,8 @@ class Dashboard_Model extends CI_Model{
/** /**
* To store VisaType Related details into 'Tab_VisaTypeMaster' table * To store VisaType Related details into 'Tab_VisaTypeMaster' table
* @param array $VisaTypeMasterDatas : Its have all the City master datas * @param array $VisaTypeMasterDatas : Its have all the Visa Type master datas
* @return $CityMaster : This will return how many value are inserted (return as count) * @return $VisaTypeMaster : This will return Last inserted id of Visa Type Master
*/ */
function Add_VisaType($VisaTypeMasterDatas) function Add_VisaType($VisaTypeMasterDatas)
{ {
@ -80,19 +80,39 @@ class Dashboard_Model extends CI_Model{
return $VisaTypeMaster; return $VisaTypeMaster;
} }
function Get_VisaTypeMaster() /**
{ * To Update the values of Visa type Detail on respective VisaNo and store into 'Tab_VisaTypeMaster' table
$this->db->select('*'); * @param array $VisaTypeMasterDatas : This will have all the edited Visa Type
$this->db->from('Tab_VisaTypeMaster'); * @param number $VisaNo : This is Visa code
$query = $this->db->get(); */
$VisaTypeMasterDatas = $query->result(); function Update_VisaType($VisaTypeMasterDatas,$VisaNo)
return $VisaTypeMasterDatas; {
$this->db->where('VisaCode',$VisaNo);
$this->db->update('Tab_VisaTypeMaster',$VisaTypeMasterDatas);
return TRUE;
}
/**
* To Get the Visa Master Data from respective VisaNo from 'Tab_VisaTypeMaster' table
* @param number $VisaNo : This is VisaNo
* @return array $DocumentMasterdatas : This will have all the Visa Type Datas
*/
function Get_VisaTypeMaster($VisaNo='')
{
$this->db->select('*');
$this->db->from('Tab_VisaTypeMaster');
if($VisaNo != ''){
$this->db->where('VisaCode',$VisaNo);
}
$query =$this->db->get();
$DocumentMasterdatas = $query->result();
return $DocumentMasterdatas;
} }
/** /**
* To store Document Related details into 'Tab_Documents' table * To store Document Related details into 'Tab_Documents' table
* @param array $DocumentMasterDatas : Its have all the document master datas * @param array $DocumentMasterDatas : Its have all the document master datas
* @return $Documents : This will return how many value are inserted (return as count) * @return $Documents : This will return Last Inserted Id of DocumentMaster
*/ */
function Add_Document($DocumentMasterDatas) function Add_Document($DocumentMasterDatas)
{ {
@ -101,10 +121,30 @@ class Dashboard_Model extends CI_Model{
return $Documents; return $Documents;
} }
function Get_DocumentMaster() /**
* To Update the values of Country detail on respective CounterCode into 'Tab_Documents' table
* @param arry $CountryMasterDatas : This will have all the edited Country Details
* @param number $Cc : This is Country code
*/
function Update_Document($DocumentMasterDatas,$DocNo)
{
$this->db->where('DocumentCode',$DocNo);
$this->db->update('Tab_Documents',$DocumentMasterDatas);
return TRUE;
}
/**
* To Get the Document Master Data from respective DocumentNo from 'Tab_Documents' table
* @param number $DocNo : This is DocumentNo
* @return array $DocumentMasterdatas : This will have all the Document Datas
*/
function Get_DocumentMaster($DocNo='')
{ {
$this->db->select('*'); $this->db->select('*');
$this->db->from('Tab_Documents'); $this->db->from('Tab_Documents');
if($DocNo != ''){
$this->db->where('DocumentCode',$DocNo);
}
$query =$this->db->get(); $query =$this->db->get();
$DocumentMasterdatas = $query->result(); $DocumentMasterdatas = $query->result();
return $DocumentMasterdatas; return $DocumentMasterdatas;

View File

@ -220,15 +220,21 @@ span:nth-child(3) .slide-up:active {
<div class="col-md-5"> <div class="col-md-5">
<div class="form-group"> <div class="form-group">
<label>Country Type</label> <label>Country Type</label>
<select class="form-control select2" style="width: 100%;"> <select id="Countrytype" name="Countrytype" class="form-control select2">
<option selected="selected">Alabama</option> <option value="">Select Country Type</option>
<option>Alaska</option> <?php
<option>California</option> if(!empty($records))
<option>Delaware</option> {
<option>Tennessee</option>
<option>Texas</option> foreach ($records as $rl)
<option>Washington</option> {
</select> ?>
<option value="<?php echo $rl->CountryCode ?>"><?php echo $rl->CountryName ?></option>
<?php
}
}
?>
</select>
</div> </div>
</div> </div>
</div> </div>

View File

@ -198,11 +198,11 @@ span:nth-child(3) .slide-up:active {
<!-- Custom Tabs --> <!-- Custom Tabs -->
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab">View Document</a></li> <li class="active" id="ViewDocumentli"><a href="#ViewDocumentTab" data-toggle="tab">View Document</a></li>
<li><a href="#tab_2" data-toggle="tab">Add Document</a></li> <li id="AddEditDocumentli"><a href="#AddEditDocumentTab" data-toggle="tab">Add/Edit Document</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tab_1"> <div class="tab-pane active" id="ViewDocumentTab">
<h3 style="text-align:center;">View Document</h3> <h3 style="text-align:center;">View Document</h3>
<table id="example2" class="table table-bordered table-hover"> <table id="example2" class="table table-bordered table-hover">
<thead> <thead>
@ -220,7 +220,7 @@ span:nth-child(3) .slide-up:active {
<td><?php echo $gdoc->DocumentCode;?></td> <td><?php echo $gdoc->DocumentCode;?></td>
<td><?php echo $gdoc->DocumentName;?></td> <td><?php echo $gdoc->DocumentName;?></td>
<td style="text-align:center;"><?php echo $gdoc->IsActive == 1 ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Deactive</span>' ?></td> <td style="text-align:center;"><?php echo $gdoc->IsActive == 1 ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Deactive</span>' ?></td>
<td style="text-align:center;"><a href="#Editcenter"><i class="fa fa-edit" data-toggle="tooltip" title="" data-original-title="Click here to view/Edit" style="color: #dc2265;"></i></a> <td style="text-align:center;"><span onclick="ToEditDocumentDetails(<?php echo $gdoc->DocumentCode; ?>)"><i class="fa fa-edit" data-toggle="tooltip" data-original-title="Click here to view/Edit <?php echo $gdoc->DocumentCode ?> Details" style="color: #dc2265;"></i></a>
</td> </td>
</tr> </tr>
<?php } <?php }
@ -237,14 +237,14 @@ span:nth-child(3) .slide-up:active {
</table> </table>
</div> </div>
<!-- /.tab-pane --> <!-- /.tab-pane -->
<div class="tab-pane" id="tab_2"> <div class="tab-pane" id="AddEditDocumentTab">
<h3 style="text-align:center;">View Document</h3> <h3 style="text-align:center;">View Document</h3>
<!-- form start --> <!-- form start -->
<form role="form" action="<?php echo base_url() ?>Add_document_master" method="post" style="padding:40px;" enctype="multipart/form-data"> <form role="form" action="<?php echo base_url() ?>SaveAll_document_master" method="post" style="padding:40px;" enctype="multipart/form-data">
<div class="row"> <div class="row">
<div class="col-md-5 designinput"> <div class="col-md-5 designinput">
<div class="form-group"> <div class="form-group">
<input class="slide-up" id="card" name="DocumentName" type="text" placeholder="Enter Document name" /><label for="card">Document Name</label> <input class="slide-up" id="documentname" name="DocumentName" type="text" placeholder="Enter Document name" /><label for="card">Document Name</label>
<!--<label for="exampleInputcountryname">Country Name</label> <!--<label for="exampleInputcountryname">Country Name</label>
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">--> <input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
@ -252,9 +252,9 @@ span:nth-child(3) .slide-up:active {
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="form-group"> <div class="form-group">
<label for="exampleInputcountryname">Document Upload</label> <label for="DocumentFile">Document Upload</label>
<input type="file" name="DocumentFile" id="Document" accept=".JPG,.PNG,.PDF" /> <input type="file" id="documentfile" name="DocumentFile" accept=".JPG,.PNG,.PDF" />
<!--<label for="exampleInputcountryname">Country Name</label> <!--<label for="exampleInputcountryname">Country Name</label>
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">--> <input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
@ -264,17 +264,19 @@ span:nth-child(3) .slide-up:active {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<label for="Description">Description</label> <label for="Description">Description</label>
<textarea class="form-control" rows="3" name="Description" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea> <textarea class="form-control" rows="3" name="Description" id="docdescription" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
</div> </div>
</div> </div>
<div class="row" style="padding-top:15px;"> <div class="row" style="padding-top:15px;">
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<label>Active/Deactive <label>Active/Deactive
<input type="checkbox" class="flat-red" name="IsActive" checked> <input type="checkbox" class="flat-red" name="IsActive" id="isactive" checked>
</label> </label>
</div> </div>
</div> </div>
<input id="hidedocumentcode" name="HideDocumentCode" type="hidden" readonly />
<input id="hidedocument" name="HideDocument" type="hidden" readonly />
<div class="col-md-offset-6 col-md-4"> <div class="col-md-offset-6 col-md-4">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
<div class="or-button">Or</div> <div class="or-button">Or</div>
@ -325,5 +327,39 @@ span:nth-child(3) .slide-up:active {
radioClass : 'iradio_flat-green' radioClass : 'iradio_flat-green'
}) })
}); });
function ToEditDocumentDetails(arg){
$('#ViewDocumentli,#ViewDocumentTab').removeClass("active");
$('#AddEditDocumentli,#AddEditDocumentTab').addClass("active");
$.ajax({
data:{arg:arg},
type:"POST",
url:"<?php echo base_url();?>GetAll_document_master",
success:function(data) {
//alert(data);
$.each(JSON.parse(data), function (i, item) {
$('#hidedocumentcode').val(item.DocumentCode);
$('#documentname').val(item.DocumentName);
$('#docdescription').val(item.DocumentDescription);
if(item.IsActive == 0){
$('.icheckbox_flat-green').attr("aria-checked", false);
$('.icheckbox_flat-green').removeClass('checked');
}
else{
$('.icheckbox_flat-green').attr("aria-checked", true);
}
$('#hidedocument').val(item.Document);
$('#documentfile').val(item.Document);
});
}
});
}
</script> </script>

View File

@ -203,11 +203,11 @@ span:nth-child(3) .slide-up:active {
<!-- Custom Tabs --> <!-- Custom Tabs -->
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#tab_1" data-toggle="tab">View Visa Type</a></li> <li class="active" id="ViewVisali"><a href="#ViewVisaTab" data-toggle="tab" >View Visa Type</a></li>
<li><a href="#tab_2" data-toggle="tab">Add Visa Type</a></li> <li id="AddEditVisali"><a href="#AddEditVisaTab" data-toggle="tab" >Add/Edit Visa Type</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tab_1"> <div class="tab-pane active" id="ViewVisaTab">
<h3 style="text-align:center;">View Visa Type</h3> <h3 style="text-align:center;">View Visa Type</h3>
<table id="example2" class="table table-bordered table-hover"> <table id="example2" class="table table-bordered table-hover">
<thead> <thead>
@ -225,7 +225,7 @@ span:nth-child(3) .slide-up:active {
<td><?php echo $gvisatype->VisaCode;?></td> <td><?php echo $gvisatype->VisaCode;?></td>
<td><?php echo $gvisatype->VisaName;?></td> <td><?php echo $gvisatype->VisaName;?></td>
<td style="text-align:center;"><?php echo $gvisatype->IsActive == 1 ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Deactive</span>' ?></td> <td style="text-align:center;"><?php echo $gvisatype->IsActive == 1 ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Deactive</span>' ?></td>
<td style="text-align:center;"><a href="#Editcenter"><i class="fa fa-edit" data-toggle="tooltip" title="" data-original-title="Click here to view/Edit" style="color: #dc2265;"></i></a> <td style="text-align:center;"><span onclick="ToEditVisaType(<?php echo $gvisatype->VisaCode; ?>)"><i class="fa fa-edit" data-toggle="tooltip" data-original-title="Click here to view/Edit <?php echo $gvisatype->VisaCode; ?> Details" style="color: #dc2265;"></i></a>
</td> </td>
</tr> </tr>
<?php } <?php }
@ -242,14 +242,14 @@ span:nth-child(3) .slide-up:active {
</table> </table>
</div> </div>
<!-- /.tab-pane --> <!-- /.tab-pane -->
<div class="tab-pane" id="tab_2"> <div class="tab-pane" id="AddEditVisaTab">
<h3 style="text-align:center;">Add Visa Type</h3> <h3 style="text-align:center;">Add/Edit Visa Type</h3>
<!-- form start --> <!-- form start -->
<form role="form" action="<?php echo base_url() ?>Add_visa_type_master" method="post" style="padding:40px;"> <form role="form" action="<?php echo base_url() ?>SaveAll_visa_type_master" method="post" style="padding:40px;">
<div class="row"> <div class="row">
<div class="col-md-5 designinput"> <div class="col-md-5 designinput">
<div class="form-group"> <div class="form-group">
<input class="slide-up" id="card" name="VisaName" type="text" placeholder="Enter visa name" /><label for="card">Visa Name</label> <input class="slide-up" id="visaname" name="VisaName" type="text" placeholder="Enter visa name" /><label for="card">Visa Name</label>
<!--<label for="exampleInputcountryname">Country Name</label> <!--<label for="exampleInputcountryname">Country Name</label>
<input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">--> <input type="text" class="form-control" id="exampleInputcountryname" placeholder="Enter country">-->
@ -259,17 +259,18 @@ span:nth-child(3) .slide-up:active {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<label for="Description">Description</label> <label for="Description">Description</label>
<textarea class="form-control" rows="3" name="VisaDescription" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea> <textarea class="form-control" rows="3" id="visadescription" name="VisaDescription" placeholder="Enter ..." data-gramm="true" data-txt_gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" data-gramm_id="d620fc04-2898-2668-7729-ac0c777081d4" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: 20px; font-size: 14px; transition: none; background: transparent !important;"></textarea>
</div> </div>
</div> </div>
<div class="row" style="padding-top:15px;"> <div class="row" style="padding-top:15px;">
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<label>Active/Deactive <label>Active/Deactive
<input type="checkbox" class="flat-red" name="IsActive" checked> <input type="checkbox" class="flat-red" id="isactive" name="IsActive" checked>
</label> </label>
</div> </div>
</div> </div>
<input id="hidevisacode" name="HideVisaCode" type="hidden" readonly />
<div class="col-md-offset-6 col-md-4"> <div class="col-md-offset-6 col-md-4">
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
<div class="or-button">Or</div> <div class="or-button">Or</div>
@ -320,4 +321,37 @@ span:nth-child(3) .slide-up:active {
}) })
}); });
function ToEditVisaType(arg){
$('#ViewVisali,#ViewVisaTab').removeClass("active");
$('#AddEditVisali,#AddEditVisaTab').addClass("active");
$.ajax({
data:{arg:arg},
type:"POST",
url:"<?php echo base_url();?>GetAll_visa_type",
success:function(data) {
//alert(data);
$.each(JSON.parse(data), function (i, item) {
$('#hidevisacode').val(item.VisaCode);
$('#visaname').val(item.VisaName);
$('#visadescription').val(item.VisaDescription);
if(item.IsActive == 0){
$('.icheckbox_flat-green').attr("aria-checked", false);
$('.icheckbox_flat-green').removeClass('checked');
}
else{
$('.icheckbox_flat-green').attr("aria-checked", true);
}
});
}
});
}
</script> </script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB