Plugin Directory

Changeset 1589408


Ignore:
Timestamp:
02/05/2017 05:53:13 PM (9 years ago)
Author:
robby.roboter
Message:

cosmetics

Location:
redi-restaurant-reservation/branches/for_fred
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • redi-restaurant-reservation/branches/for_fred/js/restaurant.js

    r1587637 r1589408  
    6464    }
    6565
    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);
    6875
    6976    function addChildrenField(id) {
     
    101108
    102109    jQuery('#persons1').change(function () {
    103         totalPersonsCount();
    104     });
    105     jQuery('#persons2').change(function () {
    106110        totalPersonsCount();
    107111    });
     
    117121        });
    118122        totalPersons += parseInt(jQuery('#persons1 option:selected').val());
    119         totalPersons += parseInt(jQuery('#persons2 option:selected').val());
    120123
    121124        jQuery('#total_number_of_guests').val(totalPersons);
     
    415418            cartItems:{
    416419                adults: jQuery('#persons1 option:selected').val(),
    417                 elderly: jQuery('#persons2 option:selected').val(),
    418420                children: children
    419421            }
  • redi-restaurant-reservation/branches/for_fred/templates/frontend.php

    r1575206 r1589408  
    6262        <?php endif;?>
    6363
    64         <label for="duration" style="float: left; width:180px;"><?php _e('Duration', 'redi-restaurant-reservation')?>:</label>
     64        <label for="duration" style="float: left; width:175px;"><?php _e('Duration', 'redi-restaurant-reservation')?>:</label>
    6565        <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>
    6969        </select>
    7070        <br/>
    7171<div>
    72         <label for="persons1" style="float: left; width:180px;">
     72        <label for="persons1" style="float: left; width:200px;">
    7373            <?php _e('Adults', 'redi-restaurant-reservation')?>:
    7474            <span class="redi_required"> *</span>
     
    8383        <br clear="all"/>
    8484
     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>
    8592        <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++): ?>
    9196                <option value="<?php echo $i?>"><?php echo $i?></option>
    9297            <?php endfor ?>
     
    9499        </div>
    95100        <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"/>
    103110        <div id="children">
     111
    104112        </div>
    105113        <div id="children-template" style="display:none">
    106             <select class="children-name" name="children-name-replace" id="children-name-replace" style="width:176px;">
     114            <select class="children-name" name="children-name-replace" id="children-name-replace" style="width:196px;">
    107115                <option value="none"><?php _e('Select children age', 'redi-restaurant-reservation')?></option>
    108116                <option value="0_2">0 t/m 2 jaar</option>
     
    120128        <hr/>
    121129        <div>
    122             <label style="float: left; width: 180px; font-weight: bold;">
     130            <label style="float: left; width: 200px; font-weight: bold;">
    123131                <?php _e('Total number of guests', 'redi-restaurant-reservation')?>
    124132            </label>
     
    278286            <?php if(isset($$field_name) && !empty($$field_name)):?>
    279287                <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; ?>:
    281297                        <?php if(isset($$field_required) && $$field_required):?><span class="redi_required"> *</span>
    282298                            <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');?>">
    283299                        <?php endif;?>
    284300                    </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"/>'?>
    294304                </div>
    295305            <?php endif;?>
     
    300310                <?php _e('Comment', 'redi-restaurant-reservation');?>
    301311            </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>
    303313        </div>
    304314        <div>
Note: See TracChangeset for help on using the changeset viewer.