Admin service updates for ssl, adsl
This commit is contained in:
@@ -32,15 +32,6 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
);
|
||||
|
||||
// Required abstract functions
|
||||
public function admin_update() {
|
||||
return View::factory('service/admin/adsl/update')
|
||||
->set('mediapath',Route::get('default/media'))
|
||||
->set('so',$this);
|
||||
}
|
||||
|
||||
/**
|
||||
* When does this service expire
|
||||
*/
|
||||
public function expire() {
|
||||
// @todo This should work out if the invoices are currently due, then the expire is the invoice date, otherwise the next invoice date.
|
||||
return NULL;
|
||||
@@ -50,6 +41,33 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
return $this->service_number;
|
||||
}
|
||||
|
||||
public function admin_update() {
|
||||
Script::factory()
|
||||
->type('stdin')
|
||||
->data('
|
||||
$(document).ready(function() {
|
||||
$("#service_connect_date_label").datepicker({
|
||||
autoclose : true,
|
||||
startDate : now,
|
||||
format : "dd-M-yyyy",
|
||||
todayBtn : true,
|
||||
}).on("hide",function(ev) {
|
||||
$("input[id=service_connect_date]").val(ev.date.valueOf()/1000);
|
||||
});
|
||||
$("#service_contract_date_label").datepicker({
|
||||
autoclose : true,
|
||||
startDate : now,
|
||||
format : "dd-M-yyyy",
|
||||
todayBtn : true,
|
||||
}).on("hide",function(ev) {
|
||||
$("input[id=service_contract_date]").val(ev.date.valueOf()/1000);
|
||||
});
|
||||
});
|
||||
');
|
||||
|
||||
return parent::admin_update();
|
||||
}
|
||||
|
||||
public function product() {
|
||||
if ($this->provided_adsl_plan_id)
|
||||
return $this->adsl_plan;
|
||||
|
@@ -1,46 +0,0 @@
|
||||
<!-- @todo NEEDS TO BE TRANSLATED -->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="head" colspan="2">Plugin Details</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 40%;">Service Number</td>
|
||||
<td style="width: 60%;" class="data"><?php echo Form::input('plugin[service_number]',$so->service_number); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Address</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_address]',$so->service_address); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Connect Date</td>
|
||||
<td class="data">
|
||||
<?php echo Form::input('plugin[service_connect_date]',$so->service_connect_date,array('id'=>'service_connect_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_connect_date')")); ?>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Password</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_password]',$so->service_password); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service IP Address</td>
|
||||
<td class="data"><?php echo Form::input('plugin[ipaddress]',$so->ipaddress); ?></td>
|
||||
</tr>
|
||||
</table>
|
45
modules/adsl/views/service/admin/plugin/adsl/edit.php
Normal file
45
modules/adsl/views/service/admin/plugin/adsl/edit.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<?php echo Form::input('plugin[service_number]',$o->service_number,array('class'=>'span2','label'=>'Service Number','placeholder'=>'Service Number')); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<?php echo Form::input('plugin[service_address]',$o->service_address,array('class'=>'span6','label'=>'Service Address','placeholder'=>'Service Address')); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span5 input-append date" id="service_connect_date_label">
|
||||
<?php echo Form::input('service_connect_date_label',$o->display('service_connect_date'),array('class'=>'span2','label'=>'Service Connected','add-on'=>'<i class="icon-calendar"></i>','disabled')); ?>
|
||||
</div>
|
||||
|
||||
<?php echo Form::hidden('plugin[service_connect_date]',$o->service_connect_date,array('id'=>'service_connect_date')); ?>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span5 input-append date" id="service_contract_date_label">
|
||||
<?php echo Form::input('service_contract_date_label',$o->display('service_contract_date'),array('class'=>'span2','label'=>'Contract Start Date','add-on'=>'<i class="icon-calendar"></i>','disabled')); ?>
|
||||
</div>
|
||||
|
||||
<?php echo Form::hidden('plugin[service_contract_date]',$o->service_contract_date,array('id'=>'service_contract_date')); ?>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<?php echo Form::input('plugin[service_username]',$o->service_username,array('class'=>'span6','label'=>'Service Username','placeholder'=>'Service Username')); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<?php echo Form::input('plugin[service_password]',$o->service_password,array('class'=>'span6','label'=>'Service Password','placeholder'=>'Service Password')); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<?php echo Form::input('plugin[ipaddress]',$o->ipaddress,array('class'=>'span6','label'=>'Service IP Address','placeholder'=>'Service IP Address')); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
Reference in New Issue
Block a user