e89ec688 by Kevin Burton

updated admin event reg

1 parent 33ed94d1
......@@ -153,7 +153,7 @@ if ( ! function_exists('form_dropdown'))
$multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : '';
$form = '<select name="'.$name.'"'.$extra.$multiple.">\n";
$form = '<select name="'.$name.'"'.$extra.$multiple.">\n<option value=''>Select...</option>";
foreach ($options as $key => $val)
{
......@@ -206,6 +206,10 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
<script>
function update_' . $name . '(value) {
if (value=="") {
return;
}
jQuery("#'.$name.'_custom").attr("disabled","disabled").hide();
jQuery("#'.$name.'").show();
......@@ -235,6 +239,12 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par
return;
}
var option = document.createElement("option");
var val = "";
option.val = val;
option.innerHTML = "Select...";
select.appendChild(option);
for(var i = 0; i < options.length;) {
var option = document.createElement("option");
var val = options[i++];
......
......@@ -764,6 +764,7 @@ class Actions {
$event_id = $_POST['event_id'];
$type = $_POST['type'];
$status = $_POST['status'];
$paid_by = $_POST['paid_by'];
unset($_POST['action']);
unset($_POST['ajax']);
......
......@@ -21,66 +21,124 @@ if (! isset($_POST['search_user_to'])) {
?>
<style>
#post-body {
-moz-border-radius-bottomleft: 6px;
-moz-border-radius-bottomright: 6px;
-moz-border-radius-topright: 6px;
background: none repeat scroll 0 0 #FFFFFF;
border-width: 1px 1px 1px;
padding: 10px;
h4 {
float: left;
padding-right: 1em;
}
.merge-users {
float: left;
padding-right: 2em;
}
.merge-users label {
float: left;
font-weight: bold;
padding-right: 1em;
}
#field-list {
.merge-users input {
float: left;
}
.clear {
float: left;
clear: both;
}
.user-list, .user-list li {
float: left;
clear: both;
}
.changed {
float: left;
width: 250px;
margin-top: 5px;
border: 1px solid green;
clear: both;
display: none;
}
.changed h6 {
padding: 0px;
margin: 0px 0px 10px 0px;
font-size: 11px;
text-transform: uppercase;
}
.changed ul {
margin: 0;
padding: 0;
}
.changed ul li {
margin: 0px 0px 3px 0px;
padding: 0px;
font-size: 11px;
background: none;
}
.merge-table td { padding:10px;}
</style>
<div class="wrap">
<div id="icon-users" class="icon32"><br /></div>
<h2>Merging CBV Users...</h2>
<div class="validation-errors" style="display:none; margin-top:10px;">
<div class="error-wrap">
<h6>OOPS...</h6>
<ul></ul>
</div>
</div>
<div id="post-body" style="padding:0px 10px 15px 10px;">
<form method="post" id="admin-search-merge-form">
<div class="merge-users">
<label for="search_user_from">Merge FROM User:</label>
<input class="clear" type="text" name="search_user_from" value="<?php echo $_POST['search_user_from'] ?>" />
<input type="button" name="btn_user_from" value="Search" />
<div id="user-list-from"></div>
</div>
<div class="merge-users">
<label for="search_user_to">Merge TO User:</label>
<input class="clear" type="text" name="search_user_to" value="<?php echo $_POST['search_user_to'] ?>" />
<input type="button" name="btn_user_to" value="Search" />
<div id="user-list-to"></div>
</div>
<div id="field-list">
<h6>Success!</h6>
<table></table>
</div>
<h2>Merge CBV Users...</h2>
<div class="validation-errors" style="display:none; margin: 10px 0px 10px;">
<div class="error-wrap">
<ul></ul>
</div>
</div>
<div id="post-body" style="padding:10px 0px 15px 0px;">
<form method="post" id="admin-search-merge-form">
<table cellspacing="0" class="widefat post fixed merge-table">
<thead>
<tr>
<th><label for="search_user_from">Merge <strong><em>FROM</em></strong> User:</label></th>
<th><label for="search_user_to">Merge <strong><em>TO</em></strong> User:</label></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="merge-users">
<input class="clear" type="text" name="search_user_from" value="<?php echo $_POST['search_user_from'] ?>" />
<input type="button" name="btn_user_from" value="Search" />
<div id="user-list-from"></div>
</div>
</td>
<td>
<div class="merge-users">
<input class="clear" type="text" name="search_user_to" value="<?php echo $_POST['search_user_to'] ?>" />
<input type="button" name="btn_user_to" value="Search" />
<div id="user-list-to"></div>
</div>
</td>
</tr>
</tbody>
</table>
<div id="field-list" class="changed">
<h6>Success!</h6>
<ul></ul>
</div>
<div style="clear:both;"></div>
<div style="margin-top:10px;padding-top:5px; border-top:1px solid #e8e8e8;">
<input type="hidden" value="from" name="which_user_search" />
<input type="hidden" value="no" name="do_search" />
<input type="hidden" value="no" name="do_merge" />
<div style="margin-top:10px;">
<input type="hidden" value="from" name="which_user_search" />
<input type="hidden" value="no" name="do_search" />
<input type="hidden" value="no" name="do_merge" />
<input type="button" value="Merge Users" name="btn_merge" />
</div>
</form>
</div>
</div>
......
......@@ -58,6 +58,19 @@
</div>
</div>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">PAID BY</div>
<div class="dashboard-section-links"></div>
<div class="dashboard-section-content small">
<select name="paid_by">
<option value="visa" <?php echo ($user_event_meta['extras']['paid_by']=="visa") ? "selected" : ""; ?>>Visa</option>
<option value="mc" <?php echo ($user_event_meta['extras']['paid_by']=="mc") ? "selected" : ""; ?>>Mastercard</option>
<option value="amex" <?php echo ($user_event_meta['extras']['paid_by']=="amex") ? "selected" : ""; ?>>American Express</option>
<option value="cheque" <?php echo ($user_event_meta['extras']['paid_by']=="cheque") ? "selected" : ""; ?>>Cheque</option>
</select>
</div>
</div>
<?php
if (!empty($show_dietary)): ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
......