Internal overhaul
This commit is contained in:
@@ -13,20 +13,16 @@ class Model_Product_Plugin_Ssl extends Model_Product_Plugin {
|
||||
protected $_table_name = 'ssl';
|
||||
|
||||
// Our required abstract methods
|
||||
public function render_edit() {}
|
||||
|
||||
public function cost($annual=FALSE) {
|
||||
// @todo
|
||||
$x = 0;
|
||||
|
||||
return $annual ? $x*12 : $x;
|
||||
}
|
||||
|
||||
public function feature_summary() {
|
||||
// @todo This view should render based on the the results of this::allowance();
|
||||
return View::factory('product/plugin/ssl/feature_summary')
|
||||
->set('po',$this);
|
||||
}
|
||||
public function render_edit() {}
|
||||
|
||||
// @todo
|
||||
public function supplier() {
|
||||
return 'internal';
|
||||
}
|
||||
|
@@ -30,7 +30,10 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
|
||||
),
|
||||
);
|
||||
|
||||
protected $_save_message = TRUE;
|
||||
|
||||
// Required abstract functions
|
||||
|
||||
public function expire($format=FALSE) {
|
||||
return $this->_so->get_valid_to($format);
|
||||
}
|
||||
@@ -39,8 +42,11 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
|
||||
return ($this->cert AND $this->ca->loaded()) ? sprintf('%s:%s',$this->ca->subject(),$this->display('cert')) : $this->display('csr');
|
||||
}
|
||||
|
||||
public function password_value() {} // Not used
|
||||
public function username_value() {} // Not used
|
||||
public function password() {} // Not used
|
||||
|
||||
public function username() {} // Not used
|
||||
|
||||
// Local functions
|
||||
|
||||
private $_so = NULL;
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
<fieldset class="span6">
|
||||
<fieldset>
|
||||
<legend>SSL Features</legend>
|
||||
|
||||
<div class="dl-horizontal">
|
||||
|
||||
<dt>Type</dt>
|
||||
<dd><?php echo $po->display('extensions'); ?></dd>
|
||||
|
||||
<dd><?php echo $o->display('extensions'); ?></dd>
|
||||
</div> <!-- /dl-horizontal -->
|
||||
</fieldset>
|
@@ -1,17 +1,15 @@
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<fieldset>
|
||||
<legend>SSL Certificate Service Details</legend>
|
||||
|
||||
<div class="row">
|
||||
<?php echo Form::textarea('plugin[csr]',$o->service->plugin()->csr,array('class'=>'span6','label'=>'CSR','placeholder'=>'CSR','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->service->plugin()->csr))); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<div class="row">
|
||||
<?php echo Form::textarea('plugin[pk]',$o->service->plugin()->pk,array('class'=>'span6','label'=>'Private Key','placeholder'=>'Private Key','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->service->plugin()->pk))); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<div class="row">
|
||||
<?php echo Form::textarea('plugin[cert]',$o->service->plugin()->cert,array('class'=>'span6','label'=>'Public Certificate','placeholder'=>'Public Certificate','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->service->plugin()->cert))); ?>
|
||||
</div>
|
||||
</div> <!-- /row -->
|
||||
</fieldset>
|
||||
|
@@ -1,57 +1,60 @@
|
||||
<fieldset class="span5">
|
||||
<legend>Service Details</legend>
|
||||
<div class="span5">
|
||||
<fieldset>
|
||||
<legend>Service Details</legend>
|
||||
|
||||
<div class="dl-horizontal">
|
||||
<div class="dl-horizontal">
|
||||
<dt>DN</dt>
|
||||
<dd><?php echo $o->dn(); ?></dd>
|
||||
|
||||
<dt>DN</dt>
|
||||
<dd><?php echo $o->dn(); ?></dd>
|
||||
<dt>Serial Number</dt>
|
||||
<dd><?php echo $o->serial(); ?></dd>
|
||||
|
||||
<dt>Serial Number</dt>
|
||||
<dd><?php echo $o->serial(); ?></dd>
|
||||
<dt>Subject Key Id</dt>
|
||||
<dd><?php echo $o->ski(); ?></dd>
|
||||
|
||||
<dt>Subject Key Id</dt>
|
||||
<dd><?php echo $o->ski(); ?></dd>
|
||||
<dt>Issuer</dt>
|
||||
<dd>
|
||||
<?php if ($o->validCA() AND $o->authorised($o->ca)) : ?>
|
||||
<?php echo HTML::anchor(URL::link('reseller','ssl/edit/').$o->ca->id,$o->issuer()); ?>
|
||||
<?php else : ?>
|
||||
<?php echo $o->issuer(); ?>
|
||||
<?php endif ?>
|
||||
</dd>
|
||||
|
||||
<dt>Issuer</dt>
|
||||
<dd>
|
||||
<?php if ($o->validCA() AND $o->authorised($o->ca)) : ?>
|
||||
<?php echo HTML::anchor(URL::link('reseller','ssl/edit/').$o->ca->id,$o->issuer()); ?>
|
||||
<?php else : ?>
|
||||
<?php echo $o->issuer(); ?>
|
||||
<?php endif ?>
|
||||
</dd>
|
||||
<dt>Issuer Serial</dt>
|
||||
<dd><?php printf('%s (%s)',$o->aki_keyid(), $o->aki_serial()); ?></dd>
|
||||
|
||||
<dt>Issuer Serial</dt>
|
||||
<dd><?php printf('%s (%s)',$o->aki_keyid(), $o->aki_serial()); ?></dd>
|
||||
<dt>Valid From</dt>
|
||||
<dd><?php echo $o->valid_from(TRUE); ?></dd>
|
||||
|
||||
<dt>Valid From</dt>
|
||||
<dd><?php echo $o->valid_from(TRUE); ?></dd>
|
||||
<dt>Valid To</dt>
|
||||
<dd><?php echo $o->valid_to(TRUE); ?></dd>
|
||||
|
||||
<dt>Valid To</dt>
|
||||
<dd><?php echo $o->valid_to(TRUE); ?></dd>
|
||||
<dt>Hash</dt>
|
||||
<dd><?php echo $o->hash(); ?></dd>
|
||||
|
||||
<dt>Hash</dt>
|
||||
<dd><?php echo $o->hash(); ?></dd>
|
||||
<dt>Version</dt>
|
||||
<dd><?php echo $o->version(); ?></dd>
|
||||
|
||||
<dt>Version</dt>
|
||||
<dd><?php echo $o->version(); ?></dd>
|
||||
<dt>Algorithm</dt>
|
||||
<dd><?php echo $o->algorithm(); ?></dd>
|
||||
|
||||
<dt>Algorithm</dt>
|
||||
<dd><?php echo $o->algorithm(); ?></dd>
|
||||
</div> <!-- dl-horizontal -->
|
||||
</fieldset>
|
||||
</div> <!-- /span -->
|
||||
|
||||
</div> <!-- dl-horizontal -->
|
||||
</fieldset>
|
||||
<div class="span6">
|
||||
<fieldset>
|
||||
<legend>Certificate</legend>
|
||||
<pre><?php echo $o->cert; ?></pre>
|
||||
|
||||
<fieldset class="span6">
|
||||
<legend>Certificate</legend>
|
||||
<pre><?php echo $o->cert; ?></pre>
|
||||
<?php
|
||||
echo $o->download_button();
|
||||
if ($ao=Auth::instance()->get_user() AND ($ao->isAdmin() OR $ao->isReseller()) AND $o->service->status AND ($o->valid_to()-(Kohana::$config->load('ssl.min_renew_days')*86400) <= time()) AND $o->service->paid_to() > time()) :
|
||||
echo Form::open(URL::link('reseller','ssl/renew/'.$o->service->id));
|
||||
echo Form::button('submit','Renew',array('class'=>'btn btn-primary'));
|
||||
endif
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo $o->download_button();
|
||||
if ($ao=Auth::instance()->get_user() AND ($ao->isAdmin() OR $ao->isReseller()) AND $o->service->status AND ($o->valid_to()-(Kohana::$config->load('ssl.min_renew_days')*86400) <= time()) AND $o->service->paid_to() > time()) :
|
||||
echo Form::open(URL::link('reseller','ssl/renew/'.$o->service->id));
|
||||
echo Form::button('submit','Renew',array('class'=>'btn btn-primary'));
|
||||
endif
|
||||
?>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</div> <!-- /span -->
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="span9">
|
||||
<div class="span11">
|
||||
<fieldset>
|
||||
<legend>SSL CA Certificate Edit/Update</legend>
|
||||
|
||||
<div class="dl-horizontal">
|
||||
|
||||
<dt>Subject</dt>
|
||||
<dd><?php echo $o->subject(); ?></dd>
|
||||
|
||||
@@ -46,13 +46,11 @@
|
||||
|
||||
<dt>Key Algorithm<dt>
|
||||
<dd><?php echo $o->algorithm(); ?></dd>
|
||||
|
||||
</div> <!-- /dl-horizontal -->
|
||||
<br/>
|
||||
</fieldset>
|
||||
|
||||
<?php echo Form::textarea('sign_pk',$o->sign_pk,array('class'=>'span6','label'=>'Private Key','placeholder'=>'Private Key','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->sign_pk))); ?>
|
||||
<?php echo Form::textarea('sign_cert',$o->sign_cert,array('class'=>'span6','label'=>'Public Certificate','placeholder'=>'Public Certificate','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->sign_cert))); ?>
|
||||
<?php echo Form::textarea('sign_pk',$o->sign_pk,array('class'=>'span6','label'=>'Private Key','placeholder'=>'Private Key','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->sign_pk))); ?>
|
||||
<?php echo Form::textarea('sign_cert',$o->sign_cert,array('class'=>'span6','label'=>'Public Certificate','placeholder'=>'Public Certificate','style'=>'font-family: monospace;','rows'=>Form::textarea_rows($o->sign_cert))); ?>
|
||||
|
||||
<?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 -->
|
||||
|
Reference in New Issue
Block a user