<div class="row">
                        <div class="col-sm-11">
                            <div class="page-title-box">
                                    <h2 class="page-title">Create kds</h2>
                            </div><!--end page-title-box-->
                        </div><!--end col-->
                        <div class="col-sm-1">
        <div class="page-title-box">
            <h2 class="page-title"><a href="kds_users"><button  class='btn btn-danger' type="button">Back</button></a></h2>
        </div><!--end page-title-box-->
    </div><!--end col-->
                    </div>
                    
                    <div class="row" >
                        <div class="col-sm-12">
                            <div class="card">
                                <div class="card-body">
                                    <?php echo $this->Form->create('User',['type' => 'file']); ?>
                                   
                                    <div class="form-group row">
                                        
                                        <div class="col-sm-8">
                                            <?php 
                                                echo $this->Form->input('username', array('div'=>array('class'=>'form-group'), 'label'=>array('class'=>'form-label'), 'class'=>'form-control','required'=>'required'));
                                                echo $this->Form->input('password', array('div'=>array('class'=>'form-group'), 'label'=>array('class'=>'form-label'), 'class'=>'form-control','required'=>'required'));
                                                
                                                $options=[''=>'Select location'];
                                                foreach($locations as $location){
                                                    $options[$location['Location']['id']] = $location['Location']['name'];
                                                }
                                                echo $this->Form->input('location', array('div'=>array('class'=>'form-group'), 'label'=>'Select Location', 'class'=>'form-control', 'between'=>'<span class="desc"></span><div class="controls">', 'after'=>'</div>','options'=>$options,'id'=>'location','required'=>true));
                                                $roleoptions=['Preparation'=>'Preparation','Expo'=>'Expo'];
                                                echo $this->Form->input('role', array('div'=>array('class'=>'form-group'), 'label'=>'Select Role', 'class'=>'form-control', 'between'=>'<span class="desc"></span><div class="controls">', 'after'=>'</div>','options'=>$roleoptions,'id'=>'role','required'=>true));
                                                ?>
                                                <label><strong>Stations</strong></label>
                                                <div id="stationContainer" class="row mb-2">
                                                    <?php 
                                                    foreach($stations as $station){
                                                    $id = $station['Pos_printer']['id'];
                                                    $name = $station['Pos_printer']['name'];  
                                                    ?>
                                                    <div class="col-md-3">
                                                        <input type="checkbox" name="station_ids[<?=$id?>]" value="<?=$id?>" id="station_<?=$id?>">
                                                        <label for="station_<?=$id?>"><?=$name?></label>
                                                    </div>
                                                    <?php } ?>
                                                </div>
                                              
                                        </div>
                                    </div>
                                    <a href="kds_users"><button  class='btn btn-danger' type="button">Cancel</button></a>
                                    <?php echo $this->Form->button('Save', array('class'=>'btn btn-success', 'type'=>'submit', 'id' => 'submitBtn')); ?>
                                    
                                </div>
                            </div>
                        </div> 
                    </div>