updated admin event reg
Showing
4 changed files
with
128 additions
and
46 deletions
| ... | @@ -153,7 +153,7 @@ if ( ! function_exists('form_dropdown')) | ... | @@ -153,7 +153,7 @@ if ( ! function_exists('form_dropdown')) |
| 153 | 153 | ||
| 154 | $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; | 154 | $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; |
| 155 | 155 | ||
| 156 | $form = '<select name="'.$name.'"'.$extra.$multiple.">\n"; | 156 | $form = '<select name="'.$name.'"'.$extra.$multiple.">\n<option value=''>Select...</option>"; |
| 157 | 157 | ||
| 158 | foreach ($options as $key => $val) | 158 | foreach ($options as $key => $val) |
| 159 | { | 159 | { |
| ... | @@ -206,6 +206,10 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par | ... | @@ -206,6 +206,10 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par |
| 206 | <script> | 206 | <script> |
| 207 | function update_' . $name . '(value) { | 207 | function update_' . $name . '(value) { |
| 208 | 208 | ||
| 209 | if (value=="") { | ||
| 210 | return; | ||
| 211 | } | ||
| 212 | |||
| 209 | jQuery("#'.$name.'_custom").attr("disabled","disabled").hide(); | 213 | jQuery("#'.$name.'_custom").attr("disabled","disabled").hide(); |
| 210 | jQuery("#'.$name.'").show(); | 214 | jQuery("#'.$name.'").show(); |
| 211 | 215 | ||
| ... | @@ -235,6 +239,12 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par | ... | @@ -235,6 +239,12 @@ function form_linked_dropdown($name = '', $parent = '', $options = array(), $par |
| 235 | return; | 239 | return; |
| 236 | } | 240 | } |
| 237 | 241 | ||
| 242 | var option = document.createElement("option"); | ||
| 243 | var val = ""; | ||
| 244 | option.val = val; | ||
| 245 | option.innerHTML = "Select..."; | ||
| 246 | select.appendChild(option); | ||
| 247 | |||
| 238 | for(var i = 0; i < options.length;) { | 248 | for(var i = 0; i < options.length;) { |
| 239 | var option = document.createElement("option"); | 249 | var option = document.createElement("option"); |
| 240 | var val = options[i++]; | 250 | var val = options[i++]; | ... | ... |
| ... | @@ -764,6 +764,7 @@ class Actions { | ... | @@ -764,6 +764,7 @@ class Actions { |
| 764 | $event_id = $_POST['event_id']; | 764 | $event_id = $_POST['event_id']; |
| 765 | $type = $_POST['type']; | 765 | $type = $_POST['type']; |
| 766 | $status = $_POST['status']; | 766 | $status = $_POST['status']; |
| 767 | $paid_by = $_POST['paid_by']; | ||
| 767 | 768 | ||
| 768 | unset($_POST['action']); | 769 | unset($_POST['action']); |
| 769 | unset($_POST['ajax']); | 770 | unset($_POST['ajax']); | ... | ... |
| ... | @@ -21,66 +21,124 @@ if (! isset($_POST['search_user_to'])) { | ... | @@ -21,66 +21,124 @@ if (! isset($_POST['search_user_to'])) { |
| 21 | ?> | 21 | ?> |
| 22 | <style> | 22 | <style> |
| 23 | 23 | ||
| 24 | #post-body { | 24 | |
| 25 | -moz-border-radius-bottomleft: 6px; | 25 | |
| 26 | -moz-border-radius-bottomright: 6px; | 26 | h4 { |
| 27 | -moz-border-radius-topright: 6px; | 27 | float: left; |
| 28 | background: none repeat scroll 0 0 #FFFFFF; | 28 | padding-right: 1em; |
| 29 | border-width: 1px 1px 1px; | 29 | } |
| 30 | padding: 10px; | 30 | |
| 31 | .merge-users { | ||
| 32 | float: left; | ||
| 33 | padding-right: 2em; | ||
| 34 | } | ||
| 35 | |||
| 36 | .merge-users label { | ||
| 37 | float: left; | ||
| 38 | font-weight: bold; | ||
| 39 | padding-right: 1em; | ||
| 31 | } | 40 | } |
| 32 | 41 | ||
| 33 | #field-list { | 42 | .merge-users input { |
| 43 | float: left; | ||
| 44 | } | ||
| 45 | |||
| 46 | .clear { | ||
| 47 | float: left; | ||
| 48 | clear: both; | ||
| 49 | } | ||
| 50 | |||
| 51 | .user-list, .user-list li { | ||
| 52 | float: left; | ||
| 53 | clear: both; | ||
| 54 | } | ||
| 55 | |||
| 56 | .changed { | ||
| 57 | float: left; | ||
| 58 | width: 250px; | ||
| 59 | margin-top: 5px; | ||
| 60 | border: 1px solid green; | ||
| 61 | clear: both; | ||
| 34 | display: none; | 62 | display: none; |
| 35 | } | 63 | } |
| 36 | 64 | ||
| 65 | .changed h6 { | ||
| 66 | padding: 0px; | ||
| 67 | margin: 0px 0px 10px 0px; | ||
| 68 | font-size: 11px; | ||
| 69 | text-transform: uppercase; | ||
| 70 | } | ||
| 71 | |||
| 72 | .changed ul { | ||
| 73 | margin: 0; | ||
| 74 | padding: 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | .changed ul li { | ||
| 78 | margin: 0px 0px 3px 0px; | ||
| 79 | padding: 0px; | ||
| 80 | font-size: 11px; | ||
| 81 | background: none; | ||
| 82 | } | ||
| 83 | .merge-table td { padding:10px;} | ||
| 37 | </style> | 84 | </style> |
| 38 | 85 | ||
| 39 | <div class="wrap"> | 86 | <div class="wrap"> |
| 40 | 87 | ||
| 41 | <div id="icon-users" class="icon32"><br /></div> | 88 | <div id="icon-users" class="icon32"><br /></div> |
| 42 | <h2>Merging CBV Users...</h2> | 89 | <h2>Merge CBV Users...</h2> |
| 43 | 90 | ||
| 44 | <div class="validation-errors" style="display:none; margin-top:10px;"> | 91 | <div class="validation-errors" style="display:none; margin: 10px 0px 10px;"> |
| 45 | <div class="error-wrap"> | 92 | <div class="error-wrap"> |
| 46 | <h6>OOPS...</h6> | 93 | <ul></ul> |
| 47 | <ul></ul> | 94 | </div> |
| 48 | </div> | 95 | </div> |
| 49 | </div> | 96 | |
| 50 | 97 | <div id="post-body" style="padding:10px 0px 15px 0px;"> | |
| 51 | <div id="post-body" style="padding:0px 10px 15px 10px;"> | 98 | <form method="post" id="admin-search-merge-form"> |
| 52 | <form method="post" id="admin-search-merge-form"> | 99 | <table cellspacing="0" class="widefat post fixed merge-table"> |
| 53 | 100 | <thead> | |
| 54 | <div class="merge-users"> | 101 | <tr> |
| 55 | <label for="search_user_from">Merge FROM User:</label> | 102 | <th><label for="search_user_from">Merge <strong><em>FROM</em></strong> User:</label></th> |
| 56 | <input class="clear" type="text" name="search_user_from" value="<?php echo $_POST['search_user_from'] ?>" /> | 103 | <th><label for="search_user_to">Merge <strong><em>TO</em></strong> User:</label></th> |
| 57 | <input type="button" name="btn_user_from" value="Search" /> | 104 | </tr> |
| 58 | <div id="user-list-from"></div> | 105 | </thead> |
| 59 | </div> | 106 | <tbody> |
| 60 | 107 | <tr> | |
| 61 | <div class="merge-users"> | 108 | <td> |
| 62 | <label for="search_user_to">Merge TO User:</label> | 109 | <div class="merge-users"> |
| 63 | <input class="clear" type="text" name="search_user_to" value="<?php echo $_POST['search_user_to'] ?>" /> | 110 | <input class="clear" type="text" name="search_user_from" value="<?php echo $_POST['search_user_from'] ?>" /> |
| 64 | <input type="button" name="btn_user_to" value="Search" /> | 111 | <input type="button" name="btn_user_from" value="Search" /> |
| 65 | <div id="user-list-to"></div> | 112 | <div id="user-list-from"></div> |
| 66 | </div> | 113 | </div> |
| 67 | 114 | </td> | |
| 68 | <div id="field-list"> | 115 | <td> |
| 69 | <h6>Success!</h6> | 116 | <div class="merge-users"> |
| 70 | <table></table> | 117 | <input class="clear" type="text" name="search_user_to" value="<?php echo $_POST['search_user_to'] ?>" /> |
| 71 | </div> | 118 | <input type="button" name="btn_user_to" value="Search" /> |
| 72 | 119 | <div id="user-list-to"></div> | |
| 120 | </div> | ||
| 121 | </td> | ||
| 122 | </tr> | ||
| 123 | </tbody> | ||
| 124 | </table> | ||
| 125 | |||
| 126 | <div id="field-list" class="changed"> | ||
| 127 | <h6>Success!</h6> | ||
| 128 | <ul></ul> | ||
| 129 | </div> | ||
| 130 | |||
| 73 | <div style="clear:both;"></div> | 131 | <div style="clear:both;"></div> |
| 74 | 132 | ||
| 75 | <div style="margin-top:10px;padding-top:5px; border-top:1px solid #e8e8e8;"> | 133 | <div style="margin-top:10px;"> |
| 76 | <input type="hidden" value="from" name="which_user_search" /> | 134 | <input type="hidden" value="from" name="which_user_search" /> |
| 77 | <input type="hidden" value="no" name="do_search" /> | 135 | <input type="hidden" value="no" name="do_search" /> |
| 78 | <input type="hidden" value="no" name="do_merge" /> | 136 | <input type="hidden" value="no" name="do_merge" /> |
| 79 | <input type="button" value="Merge Users" name="btn_merge" /> | 137 | <input type="button" value="Merge Users" name="btn_merge" /> |
| 80 | </div> | 138 | </div> |
| 81 | 139 | ||
| 82 | </form> | 140 | </form> |
| 83 | 141 | ||
| 84 | </div> | 142 | </div> |
| 85 | 143 | ||
| 86 | </div> | 144 | </div> | ... | ... |
| ... | @@ -58,6 +58,19 @@ | ... | @@ -58,6 +58,19 @@ |
| 58 | </div> | 58 | </div> |
| 59 | </div> | 59 | </div> |
| 60 | 60 | ||
| 61 | <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> | ||
| 62 | <div class="dashboard-section-title">PAID BY</div> | ||
| 63 | <div class="dashboard-section-links"></div> | ||
| 64 | <div class="dashboard-section-content small"> | ||
| 65 | <select name="paid_by"> | ||
| 66 | <option value="visa" <?php echo ($user_event_meta['extras']['paid_by']=="visa") ? "selected" : ""; ?>>Visa</option> | ||
| 67 | <option value="mc" <?php echo ($user_event_meta['extras']['paid_by']=="mc") ? "selected" : ""; ?>>Mastercard</option> | ||
| 68 | <option value="amex" <?php echo ($user_event_meta['extras']['paid_by']=="amex") ? "selected" : ""; ?>>American Express</option> | ||
| 69 | <option value="cheque" <?php echo ($user_event_meta['extras']['paid_by']=="cheque") ? "selected" : ""; ?>>Cheque</option> | ||
| 70 | </select> | ||
| 71 | </div> | ||
| 72 | </div> | ||
| 73 | |||
| 61 | <?php | 74 | <?php |
| 62 | if (!empty($show_dietary)): ?> | 75 | if (!empty($show_dietary)): ?> |
| 63 | <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> | 76 | <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> | ... | ... |
-
Please register or sign in to post a comment