Internal overhaul

This commit is contained in:
Deon George
2013-11-28 17:41:34 +11:00
parent 0ed5e5163d
commit f8a5b153cf
91 changed files with 1570 additions and 1619 deletions

View File

@@ -69,12 +69,9 @@ class Controller_Reseller_Charge extends Controller_Charge {
->type('stdin')
->data('
$(document).ready(function() {
var nowTemp = new Date();
var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
$("#date_charge_label").datepicker({
autoclose : true,
endDate : now,
endDate : new Date(),
format : "dd-M-yyyy",
todayBtn : true,
}).on("hide",function(ev) {

View File

@@ -1,31 +1,28 @@
<div class="row">
<div class="span9 offset1">
<div class="span11">
<fieldset>
<legend>Charge Details</legend>
<fieldset>
<legend>Charge Details</legend>
<div class="input-append date" id="date_charge_label">
<?php echo Form::input('date_charge_label',$o->display('date_charge'),array('class'=>'span2','label'=>'Date of Charge','add-on'=>'<i class="icon-calendar"></i>','disabled')); ?>
</div>
<div class="input-append date" id="date_charge_label">
<?php echo Form::input('date_charge_label',$o->display('date_charge'),array('class'=>'span2','label'=>'Date of Charge','add-on'=>'<i class="icon-calendar"></i>','disabled')); ?>
</div>
<?php echo Form::hidden('date_charge',$o->date_charge); ?>
<?php echo Form::input('account_id_label',$o->account->name(),array('class'=>'span5','label'=>'Account','placeholder'=>'Account','data-provide'=>'typeahead','required')); ?>
<?php echo Form::hidden('account_id',$o->account_id); ?>
<?php echo Form::select('service_id',$o->account_id ? $o->account->service->list_select() : array(),$o->service_id,array('class'=>'span5','label'=>'Service')); ?>
<?php echo StaticList_SweepType::form('sweep_type',is_null($o->sweep_type) ? 6 : $o->sweep_type,FALSE,array('label'=>'Sweep')); ?>
<?php echo StaticList_ItemType::form('type',is_null($o->type) ? 6 : $o->type,FALSE,array('label'=>'Item Type')); ?>
<?php echo Form::hidden('date_charge',$o->date_charge); ?>
<?php echo Form::input('account_id_label',$o->account->name(),array('class'=>'span5','label'=>'Account','placeholder'=>'Account','data-provide'=>'typeahead','required')); ?>
<?php echo Form::hidden('account_id',$o->account_id); ?>
<?php echo Form::select('service_id',$o->account_id ? $o->account->service->list_select() : array(),$o->service_id,array('class'=>'span5','label'=>'Service')); ?>
<?php echo StaticList_SweepType::form('sweep_type',is_null($o->sweep_type) ? 6 : $o->sweep_type,FALSE,array('label'=>'Sweep')); ?>
<?php echo StaticList_ItemType::form('type',is_null($o->type) ? 6 : $o->type,FALSE,array('label'=>'Item Type')); ?>
<?php echo Form::input('quantity',$o->quantity,array('class'=>'span1','label'=>'Quantity','placeholder'=>'Quantity')); ?>
<?php echo Form::input('amount',$o->amount,array('class'=>'span1','label'=>'Amount','placeholder'=>'Total',)); ?>
<?php echo StaticList_YesNo::form('taxable',is_null($o->taxable) ? TRUE : $o->taxable,FALSE,array('label'=>'Taxable','class'=>'span1')); ?>
<?php echo Form::input('description',$o->description,array('class'=>'span5','label'=>'Description','placeholder'=>'Any notes about this charge?')); ?>
<?php echo Form::input('quantity',$o->quantity,array('class'=>'span1','label'=>'Quantity','placeholder'=>'Quantity')); ?>
<?php echo Form::input('amount',$o->amount,array('class'=>'span1','label'=>'Amount','placeholder'=>'Total',)); ?>
<?php echo StaticList_YesNo::form('taxable',is_null($o->taxable) ? TRUE : $o->taxable,FALSE,array('label'=>'Taxable','class'=>'span1')); ?>
<?php echo Form::input('description',$o->description,array('class'=>'span5','label'=>'Description','placeholder'=>'Any notes about this charge?')); ?>
<!-- @todo Use JS to dynamically add more lines as required -->
<?php for ($i=0;$i<10;$i++) :
echo Form::input("attributes[$i]",isset($o->attributes[$i]) ? $o->attributes[$i] : "",array('class'=>'span5','label'=>'Attributes'));
endfor ?>
</fieldset>
<!-- @todo Use JS to dynamically add more lines as required -->
<?php for ($i=0;$i<10;$i++) :
echo Form::input("attributes[$i]",isset($o->attributes[$i]) ? $o->attributes[$i] : "",array('class'=>'span5','label'=>'Attributes'));
endfor ?>
</fieldset>
<?php echo Form::button('submit','Submit',array('class'=>'btn btn-primary')); ?>
</div> <!-- /span -->
</div> <!-- /row -->
<?php echo Form::button('submit','Submit',array('class'=>'btn btn-primary')); ?>
</div> <!-- /span -->