Changeset 1589408
- Timestamp:
- 02/05/2017 05:53:13 PM (9 years ago)
- Location:
- redi-restaurant-reservation/branches/for_fred
- Files:
-
- 2 edited
-
js/restaurant.js (modified) (4 diffs)
-
templates/frontend.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
redi-restaurant-reservation/branches/for_fred/js/restaurant.js
r1587637 r1589408 64 64 } 65 65 66 67 addChildrenField(totalChildrenFields); 66 jQuery('#children-1').change(function(){ 67 totalPersonsCount(); 68 }); 69 70 jQuery('#children-2').change(function(){ 71 totalPersonsCount(); 72 }); 73 74 // addChildrenField(totalChildrenFields); 68 75 69 76 function addChildrenField(id) { … … 101 108 102 109 jQuery('#persons1').change(function () { 103 totalPersonsCount();104 });105 jQuery('#persons2').change(function () {106 110 totalPersonsCount(); 107 111 }); … … 117 121 }); 118 122 totalPersons += parseInt(jQuery('#persons1 option:selected').val()); 119 totalPersons += parseInt(jQuery('#persons2 option:selected').val());120 123 121 124 jQuery('#total_number_of_guests').val(totalPersons); … … 415 418 cartItems:{ 416 419 adults: jQuery('#persons1 option:selected').val(), 417 elderly: jQuery('#persons2 option:selected').val(),418 420 children: children 419 421 } -
redi-restaurant-reservation/branches/for_fred/templates/frontend.php
r1575206 r1589408 62 62 <?php endif;?> 63 63 64 <label for="duration" style="float: left; width:1 80px;"><?php _e('Duration', 'redi-restaurant-reservation')?>:</label>64 <label for="duration" style="float: left; width:175px;"><?php _e('Duration', 'redi-restaurant-reservation')?>:</label> 65 65 <select id="duration" name="duration" class="redi-reservation-select" style="text-align: right;"> 66 <option value="120" selected="selected">2:00 </option>67 <option value="150">2:30 </option>68 <option value="180">3:00 </option>66 <option value="120" selected="selected">2:00 uur</option> 67 <option value="150">2:30 uur</option> 68 <option value="180">3:00 uur</option> 69 69 </select> 70 70 <br/> 71 71 <div> 72 <label for="persons1" style="float: left; width: 180px;">72 <label for="persons1" style="float: left; width:200px;"> 73 73 <?php _e('Adults', 'redi-restaurant-reservation')?>: 74 74 <span class="redi_required"> *</span> … … 83 83 <br clear="all"/> 84 84 85 <?php $minPersons = 3; $maxAge = 14;?> 86 87 <label id="labelfor" for="replace" > 88 <p style="float: left; padding-bottom: 0"><?php _e('Children', 'redi-restaurant-reservation')?>:</p> 89 <p style="float: left; padding-left:140px; padding-bottom: 0">Aantal:</p> 90 <br clear="all"/> 91 </label> 85 92 <div> 86 <label for="persons2" style="float: left; width:180px;"> 87 <?php _e('Adults 65+', 'redi-restaurant-reservation')?>: 88 </label> 89 <select name="persons[1]" id="persons2" style="float: left; text-align: right;"> 90 <?php for ($i = $minPersons; $i != $maxPersons+1; $i++): ?> 93 <label for="children-1" style="float: left; width:200px;">Aantal kinderen 3 t/m 11 jr.</label> 94 <select class="children-count" name="children-count-[0]" id="children-1" style="float: left; text-align: right;"> 95 <?php for ($i = 0; $i != $maxPersons+1; $i++): ?> 91 96 <option value="<?php echo $i?>"><?php echo $i?></option> 92 97 <?php endfor ?> … … 94 99 </div> 95 100 <br clear="all"/> 96 97 <?php $minPersons = 3; $maxAge = 14;?> 98 <label id="labelfor" for="replace" > 99 <p style="float: left; padding-bottom: 0"><?php _e('Children', 'redi-restaurant-reservation')?>:</p> 100 <p style="float: left; padding-left:120px; padding-bottom: 0">Aantal:</p> 101 <br clear="all"/> 102 </label> 101 <div> 102 <label for="children-2" style="float: left; width:200px;">Aantal kinderen 0 t/m 2 jr. (gratis)</label> 103 <select class="children-count" name="children-count-[1]" id="children-2" style="float: left; text-align: right;"> 104 <?php for ($i = 0; $i != $maxPersons+1; $i++): ?> 105 <option value="<?php echo $i?>"><?php echo $i?></option> 106 <?php endfor ?> 107 </select> 108 </div> 109 <br clear="all"/> 103 110 <div id="children"> 111 104 112 </div> 105 113 <div id="children-template" style="display:none"> 106 <select class="children-name" name="children-name-replace" id="children-name-replace" style="width:1 76px;">114 <select class="children-name" name="children-name-replace" id="children-name-replace" style="width:196px;"> 107 115 <option value="none"><?php _e('Select children age', 'redi-restaurant-reservation')?></option> 108 116 <option value="0_2">0 t/m 2 jaar</option> … … 120 128 <hr/> 121 129 <div> 122 <label style="float: left; width: 180px; font-weight: bold;">130 <label style="float: left; width: 200px; font-weight: bold;"> 123 131 <?php _e('Total number of guests', 'redi-restaurant-reservation')?> 124 132 </label> … … 278 286 <?php if(isset($$field_name) && !empty($$field_name)):?> 279 287 <div> 280 <label for="field_<?php echo $i; ?>"><?php echo $$field_name; ?>: 288 <?php 289 $input_field_type = 'text'; 290 switch($$field_type){ 291 case 'newsletter': 292 case 'reminder': 293 case 'checkbox': 294 $input_field_type = 'checkbox'; 295 }?> 296 <label <?php if($input_field_type == 'checkbox') echo 'style="float:left;"'?> for="field_<?php echo $i; ?>"><?php echo $$field_name; ?>: 281 297 <?php if(isset($$field_required) && $$field_required):?><span class="redi_required"> *</span> 282 298 <input type="hidden" id="<?php echo 'field_'.$i.'_message'; ?>" value="<?php echo !empty($$field_message) ? $$field_message : _e('Custom field is required', 'redi-restaurant-reservation');?>"> 283 299 <?php endif;?> 284 300 </label> 285 <?php 286 $input_field_type = 'text'; 287 switch($$field_type){ 288 case 'newsletter': 289 case 'reminder': 290 case 'checkbox': 291 $input_field_type = 'checkbox'; 292 }?> 293 <input <?php if(in_array($$field_type, array('newsletter', 'reminder'))) echo'checked="checked"' ?> type="<?php echo($input_field_type);?>" value="" name="field_<?php echo $i; ?>" id="field_<?php echo $i; ?>" <?php if(isset($$field_required) && $$field_required):?>class="field_required"<?php endif; ?>> 301 302 <input <?php if($input_field_type == 'checkbox') echo'style="float:left; display: inline; height:20px;margin-bottom:5px"' ?> <?php if(in_array($$field_type, array('newsletter', 'reminder'))) echo'checked="checked"' ?> type="<?php echo($input_field_type);?>" value="" name="field_<?php echo $i; ?>" id="field_<?php echo $i; ?>" <?php if(isset($$field_required) && $$field_required):?>class="field_required"<?php endif; ?>> 303 <?php if($input_field_type == 'checkbox') echo '<br clear="both"/>'?> 294 304 </div> 295 305 <?php endif;?> … … 300 310 <?php _e('Comment', 'redi-restaurant-reservation');?> 301 311 </label> 302 <textarea maxlength="250" rows="5" name="UserComments" id="UserComments" cols="20" class="UserComments" placeholder=" Bijv. jarigen, kinderstoelen, dieet/allergie�n etc."></textarea>312 <textarea maxlength="250" rows="5" name="UserComments" id="UserComments" cols="20" class="UserComments" placeholder="Heeft u meer dan 1 rolstoel, kinderwagen of kinderstoel in de groep, geef dan hier het aantal op."></textarea> 303 313 </div> 304 314 <div>
Note: See TracChangeset
for help on using the changeset viewer.