Rework service, change module_method configuration
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Reseller Domain Service functions
|
||||
*
|
||||
* @package Domain
|
||||
* @category Controllers/Reseller
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_Reseller_Service_Domain extends Controller_Service {
|
||||
protected $secure_actions = array(
|
||||
'list'=>TRUE,
|
||||
);
|
||||
|
||||
public function action_list() {
|
||||
Block::factory()
|
||||
->title('Domain License Services')
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::factory()
|
||||
->jssort('adsl')
|
||||
->data($this->filter(ORM::factory('Service')->list_byplugin('DOMAIN'),$this->ao->RTM->customers($this->ao->RTM),'account_id','name()'))
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'name()'=>'Service',
|
||||
'plugin()->display("domain_expire")'=>'Expire',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
'date_next_invoice'=>'Next Invoice',
|
||||
'due(TRUE)'=>'Due Invoices',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -54,7 +54,7 @@ class Model_Service_Plugin_Domain extends Model_Service_Plugin {
|
||||
|
||||
public function service_view() {
|
||||
return View::factory('service/user/plugin/domain/view')
|
||||
->set('so',$this);
|
||||
->set('o',$this);
|
||||
}
|
||||
|
||||
public function username_value() {
|
||||
|
@@ -26,7 +26,7 @@ class Service_Domain_PlanetDomain extends Service_Domain {
|
||||
$output .= Form::input($this->login_pass_field,substr(md5($spdo->password_value()),0,8),array('type'=>'hidden','id'=>sprintf('p_%s_%s',$spdo->service_id,$t)));
|
||||
$output .= Form::input('page.next',sprintf('/newdnr/action/dns/getDNSDetails.jsp?domain.name=%s',$d),array('type'=>'hidden'));
|
||||
$output .= Form::close();
|
||||
$output .= Form::button('submit',_('Manage'),array('class'=>'form_button','value'=>sprintf('%s:%s',$spdo->service_id,$t)));
|
||||
$output .= Form::button('submit',_('Manage'),array('class'=>'btn btn-default','value'=>sprintf('%s:%s',$spdo->service_id,$t)));
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ class Service_Domain_TPP extends Service_Domain {
|
||||
$output .= Form::input($this->login_user_field,$spdo->username_value(),array('type'=>'hidden','id'=>sprintf('u_%s_%s',$spdo->service_id,$t)));
|
||||
$output .= Form::input($this->login_pass_field,substr(md5($spdo->password_value()),0,8),array('type'=>'hidden','id'=>sprintf('p_%s_%s',$spdo->service_id,$t)));
|
||||
$output .= Form::close();
|
||||
$output .= Form::button('submit',_('Manage'),array('class'=>'form_button','value'=>sprintf('%s:%s',$spdo->service_id,$t)));
|
||||
$output .= Form::button('submit',_('Manage'),array('class'=>'btn btn-default','value'=>sprintf('%s:%s',$spdo->service_id,$t)));
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
@@ -1,51 +1,26 @@
|
||||
<!-- //@todo To translate -->
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="2">Service Details</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 50%">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width: 40%;">Domain Name</td>
|
||||
<td style="width: 60%;" class="data"><?php echo $so->name(); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Domain Expire</td>
|
||||
<td class="data"><?php echo $so->display('domain_expire'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Domain Primary Name Servers</td>
|
||||
<td class="data"><?php echo $so->display('registrar_ns'); ?> <span style="small">(Last Sync: <?php echo $so->display('registrar_lastsync'); ?>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Domain Auth Password</td>
|
||||
<td class="data"><?php echo $so->display('registrar_auth_password'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Domain Type</td>
|
||||
<td class="data"><?php echo $so->display('registrar_type'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width: 50%">
|
||||
<table width="100%">
|
||||
<?php if ($x=$so->manage_button()) { ?>
|
||||
<tr>
|
||||
<td style="width: 40%;">Manage Registrar</td>
|
||||
<td style="width: 60%;" class="data"><?php echo $x; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if ($x=$so->manage_dns_button()) { ?>
|
||||
<tr>
|
||||
<td style="width: 40%;">Manage DNS</td>
|
||||
<td style="width: 60%;" class="data"><?php echo $x; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<fieldset class="span5">
|
||||
<legend>Service Details</legend>
|
||||
|
||||
<div class="dl-horizontal">
|
||||
|
||||
<dt>Domain Name</dt>
|
||||
<dd><?php echo $o->name(); ?></dd>
|
||||
|
||||
<dt>Domain Expire</dt>
|
||||
<dd><?php echo $o->display('domain_expire'); ?></dd>
|
||||
|
||||
<dt>Domain Auth Password</dt>
|
||||
<dd><?php echo $o->display('registrar_auth_password'); ?></dd>
|
||||
|
||||
<?php if ($x=$o->manage_button()) : ?>
|
||||
<dt>Registrar</dt>
|
||||
<dd><?php echo $x; ?></dd>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($x=$o->manage_dns_button()) : ?>
|
||||
<dt>DNS</dt>
|
||||
<dd><?php echo $x; ?></dd>
|
||||
<?php endif ?>
|
||||
|
||||
</div> <!-- dl-horizontal -->
|
||||
</fieldset>
|
||||
|
Reference in New Issue
Block a user