This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
memberdb/application/views/child/user/add_edit.php

81 lines
3.7 KiB
PHP
Raw Normal View History

2014-10-22 11:22:47 +00:00
<fieldset>
<legend>Register Child</legend>
<div class="form-group">
<label class="col-md-2 control-label" for="Title">Name</label>
<div class="row">
<div class="col-md-2">
<?php echo Form::input('first_name',$o->display('first_name'),array('class'=>'form-control','placeholder'=>'First Name','required','nocg'=>TRUE)); ?>
</div>
<div class="col-md-3">
<?php echo Form::input('family_name',$o->display('family_name'),array('class'=>'form-control','placeholder'=>'Family Name','required','nocg'=>TRUE)); ?>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="Title">DOB</label>
<div class="col-md-2">
<div class="input-group date" id="dob" data-date-format="dd-mm-yyyy" data-provide="datepicker" data-date-start-view="year" data-date-calendar-weeks="true" data-date-autoclose="true" data-date-today-highlight="true" data-date-end-date="0d">
<?php echo Form::input('dob',$o->display('dob'),array('class'=>'form-control','placeholder'=>'DOB','required','nocg'=>TRUE,'readonly')); ?>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
<div class="col-md-3">
Age: <strong><?php echo $o->age(); ?></strong><br/>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="Title">Requested Days</label>
<div class="col-md-10">
<table class="table-bordered">
<thead>
<tr>
<th>&nbsp;</th>
<?php foreach ($so->open_days() as $d => $open) : ?>
<th class="text-center" style="width: 3em;"><?php echo substr(StaticList_Day::get($d),0,2); ?></th>
<?php endforeach ?>
<th class="text-center">Start Date</th>
<th class="text-center">End Date</th>
</tr>
</thead>
<tbody>
<?php foreach ($o->subitems() as $rco) : ?>
<tr>
<?php echo Form::hidden('room[child_id]',$rco->child_id); ?>
<?php echo Form::hidden('room[code]',$rco->code); ?>
<td class="col-md-3"><?php echo StaticList_Room_Children::get($rco->code); ?></td>
<?php foreach ($so->open_days() as $d => $open) : ?>
<td class="text-center <?php echo $open ? 'bg-success' : 'bg-danger'; ?>">
<?php echo Form::checkbox('room[d_'.$d.']',TRUE,$rco->day($d) ? TRUE : FALSE,array('nocg'=>TRUE,$open ? '': 'disabled')); ?>
<?php echo Form::hidden(sprintf('room[R][%s]',$d),$rco->day($d)); ?>
</td>
<?php endforeach ?>
<td>
<div class="input-group date" id="date_start" data-date-format="dd-mm-yyyy" data-provide="datepicker" data-date-start-view="year" data-date-autoclose="true" data-date-today-highlight="true" data-date-start-date="0d">
<?php echo Form::input('room[date_start]',$rco->date_start ? $rco->display('date_start') : Site::Date(time()),array('class'=>'form-control','placeholder'=>'Start','required','nocg'=>TRUE,'readonly')); ?>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</td>
<td>
<div class="input-group date" id="date_stop" data-date-format="dd-mm-yyyy" data-provide="datepicker" data-date-start-view="year" data-date-autoclose="true" data-date-today-highlight="true" data-date-start-date="0d">
<?php echo Form::input('room[date_stop]',$rco->date_stop ? $rco->display('date_stop') : $o->date_enrol_max(TRUE),array('class'=>'form-control','placeholder'=>'End','required','nocg'=>TRUE,'readonly')); ?>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</div>
</fieldset>
<div class="row">
<div class="col-md-offset-1">
<button type="submit" class="btn btn-primary">Save changes</button>
<button type="button" class="btn btn-default">Cancel</button>
</div>
</div>