Misc fixes and new function service_change
This commit is contained in:
@@ -27,6 +27,9 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
'service_connect_date'=>array(
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
'service_contract_date'=>array(
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
);
|
||||
|
||||
// Required abstract functions
|
||||
@@ -76,11 +79,11 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
}
|
||||
|
||||
public function contract_date_start() {
|
||||
return Config::date($this->service_connect_date);
|
||||
return Config::date($this->service_contract_date);
|
||||
}
|
||||
|
||||
public function contract_date_end() {
|
||||
return Config::date(strtotime(sprintf('+%s months',$this->contract_term),$this->service_connect_date));
|
||||
return Config::date(strtotime(sprintf('+%s months',$this->contract_term),$this->service_contract_date));
|
||||
}
|
||||
|
||||
public function hasOffpeak() {
|
||||
|
@@ -21,6 +21,16 @@
|
||||
<script type="text/javascript">defaults['service_connect_date'] = '%s';</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Contract Date</td>
|
||||
<td class="data">
|
||||
<?php echo Form::input('plugin[service_contract]',$so->service_contract_date,array('id'=>'service_contract_date')); ?>
|
||||
<?php echo HTML::anchor('#',
|
||||
HTML::image($mediapath->uri(array('file'=>'img/calendar.png')),array('alt'=>_('Calendar'),'style'=>'cursor: pointer;')),
|
||||
array('title'=>'Click to popup a dialog to select a date graphically','onclick'=>"dateSelector('service_contract_date')")); ?>
|
||||
<script type="text/javascript">defaults['service_contract_date'] = '%s';</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Username</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_username]',$so->service_username); ?></td>
|
||||
|
Reference in New Issue
Block a user