Commit 3ba24b71 by Ashish Pal

updated template details

parent 9d30da46
...@@ -5,7 +5,7 @@ $table_name = $wpdb->prefix."custody_icici_forms"; ...@@ -5,7 +5,7 @@ $table_name = $wpdb->prefix."custody_icici_forms";
?> ?>
<div class="wrap"> <div class="wrap">
<a href='admin.php?page=custodylist&action=new' class="page-title-action">Add New Forms</a> <a href='admin.php?page=custodylist&action=new' class="page-title-action">Add New Forms</a>
<h2>Forms list</h2> <h2>Custody Forms list</h2>
<form class="search-form wp-clearfix" method="get"> <form class="search-form wp-clearfix" method="get">
<input type="hidden" name="page" value="list"> <input type="hidden" name="page" value="list">
<input type="hidden" name="action" value="search"> <input type="hidden" name="action" value="search">
...@@ -13,7 +13,7 @@ $table_name = $wpdb->prefix."custody_icici_forms"; ...@@ -13,7 +13,7 @@ $table_name = $wpdb->prefix."custody_icici_forms";
<label class="screen-reader-text" for="tag-search-input">Search</label> <label class="screen-reader-text" for="tag-search-input">Search</label>
<input type="search" id="tag-search-input" name="s" value=""> <input type="search" id="tag-search-input" name="s" value="">
<select name="search_type" id="search_type"> <select name="search_type" id="search_type">
<option value="">Select Search Type </option> <option value="">Select Search Type</option>
<option value="STOF">Type of Form</option> <option value="STOF">Type of Form</option>
<option value="TOA">Type of Account</option> <option value="TOA">Type of Account</option>
<option value="URL">User URL</option> <option value="URL">User URL</option>
......
<?php defined( 'ABSPATH' ) or die( 'Direct access is not permitted' );?> <?php defined( 'ABSPATH' ) or die( 'Direct access is not permitted' );?>
<h1 class="wp-heading-inline">Edit Type of Account</h1> <h1 class="wp-heading-inline">Edit Type of Account</h1>
<h3>Note: Please do the actvity very carefully in this form, it will update update whole records beloging to selected Type of Account.</h3> <h3>Note: Please do the activity very carefully in this form, it will update the whole records belonging to selected Type of Account.</h3>
<table class="form-table"> <table class="form-table">
<form method='post' action='' name='myform' enctype='multipart/form-data'> <form method='post' action='' name='myform' enctype='multipart/form-data'>
<input type="hidden" name="action" id="action" value="update_toa"> <input type="hidden" name="action" id="action" value="update_toa">
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<td> <td>
<select name="type_of_account" id="type_of_account" required> <select name="type_of_account" id="type_of_account" required>
<option value="">Select Type of Account</option> <option value="">Select Type of Account</option>
<?php foreach($result_1 as $value ) { ?> <?php foreach($result as $value ) { ?>
<option value="<?php echo $value; ?>"><?php echo $value; ?></option> <option value="<?php echo $value; ?>"><?php echo $value; ?></option>
<?php <?php
} }
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
<input name="type_of_account_other" type="text" value="" size="40" placeholder="Please enter other value"> <input name="type_of_account_other" type="text" value="" size="40" placeholder="Please enter other value">
</td> </td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><input type='submit' class='button button-primary' name='but_submit' value='Update'></td> <td><input type='submit' class='button button-primary' name='but_submit' value='Update'></td>
......
<?php defined( 'ABSPATH' ) or die( 'Direct access is not permitted' );?> <?php defined( 'ABSPATH' ) or die( 'Direct access is not permitted' );?>
<h1 class="wp-heading-inline">Edit Type of Form</h1> <h1 class="wp-heading-inline">Edit Type of Form</h1>
<h3>Note: Please do the actvity very carefully in this form, it will update selected the whole records beloging to Type of form.</h3> <h3>Note: Please do the activity very carefully in this form, it will update the whole records belonging to selected Type of form.</h3>
<table class="form-table"> <table class="form-table">
<form method='post' action='' name='myform' enctype='multipart/form-data'> <form method='post' action='' name='myform' enctype='multipart/form-data'>
<input type="hidden" name="action" id="action" value="update_tof"> <input type="hidden" name="action" id="action" value="update_tof">
......
...@@ -92,7 +92,7 @@ if ($_GET['action']=="status" && isset($_GET['upt'])) { ...@@ -92,7 +92,7 @@ if ($_GET['action']=="status" && isset($_GET['upt'])) {
if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update' && isset($_POST['action'])){ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update' && isset($_POST['action'])){
if($_POST['action'] == 'Update'){ if($_POST['action'] == 'update_main'){
$id = $_POST['id']; $id = $_POST['id'];
$type_of_account = $_POST['type_of_account']; $type_of_account = $_POST['type_of_account'];
$type_of_form = $_POST['type_of_form']; $type_of_form = $_POST['type_of_form'];
...@@ -117,7 +117,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update' && isset($_PO ...@@ -117,7 +117,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update' && isset($_PO
}elseif($_POST['action'] == 'update_toa'){ }elseif($_POST['action'] == 'update_toa'){
if($_POST['type_of_account'] && trim($_POST['type_of_account_other'])){ if($_POST['type_of_account'] && trim($_POST['type_of_account_other'])){
$type_of_account_other = trim($_POST['type_of_account_other']); $type_of_account_other = trim($_POST['type_of_account_other']);
$type_of_form =$_POST['type_of_form']; $type_of_account =$_POST['type_of_account'];
$wpdb->query("update $table_name set type_of_account ='$type_of_account_other' WHERE type_of_account='$type_of_account'"); $wpdb->query("update $table_name set type_of_account ='$type_of_account_other' WHERE type_of_account='$type_of_account'");
echo "<script>location.replace('admin.php?page=custodylist&msg=4');</script>"; echo "<script>location.replace('admin.php?page=custodylist&msg=4');</script>";
} }
...@@ -125,7 +125,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update' && isset($_PO ...@@ -125,7 +125,7 @@ if(isset($_POST['but_submit']) && $_POST['but_submit'] == 'Update' && isset($_PO
} }
function msg_print($msg){ function msg_print($msg){
$array = array(1=>"Record Updated",2=>"Record Updated",3=>"Record Added"); $array = array(1=>"Record Updated",2=>"Record Updated",3=>"Record Added",4=>"Updated Type for Form Details",5=>"Record Updated");
return $array[$msg]; return $array[$msg];
} }
if(isset($_GET['msg'])){ if(isset($_GET['msg'])){
...@@ -150,7 +150,7 @@ if(isset($_GET['msg'])){ ...@@ -150,7 +150,7 @@ if(isset($_GET['msg'])){
<table class="form-table"> <table class="form-table">
<form method='post' action='' name='myform' enctype='multipart/form-data'> <form method='post' action='' name='myform' enctype='multipart/form-data'>
<input type="hidden" name="id" id="id" value="<?php echo $id?>"> <input type="hidden" name="id" id="id" value="<?php echo $id?>">
<input type="hidden" name="action" id="action" value="update"> <input type="hidden" name="action" id="action" value="update_main">
<tr class="form-field term-name-wrap"> <tr class="form-field term-name-wrap">
<th scope="row"><label for="name">Type of Form</label></th> <th scope="row"><label for="name">Type of Form</label></th>
<td> <td>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<thead> <thead>
<tr> <tr>
<th width="5%">Id</th> <th width="5%">Id</th>
<th width="20%"><?php echo wp_list_sort($list, $orderby = array("type_of_form"), $order = 'ASC', $preserve_keys = false );?></th> <th width="20%">Type of Form</th>
<th width="20%">Type of Account</th> <th width="20%">Type of Account</th>
<th width="20%">User URl</th> <th width="20%">User URl</th>
<th width="20%">Url</th> <th width="20%">Url</th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment