| 1 |
<?php |
| 2 |
// prevent direct file access |
| 3 |
defined( 'ABSPATH' ) or exit; |
| 4 |
|
| 5 |
/** @var Boxzilla\Licensing\License $license */ |
| 6 |
?> |
| 7 |
|
| 8 |
<h2><?php _e( 'License & Plugin Updates', 'boxzilla' ); ?></h2> |
| 9 |
|
| 10 |
<?php if( ! $license->activated ) { ?> |
| 11 |
<div class="error inline"> |
| 12 |
<p> |
| 13 |
<strong><?php _e( 'Warning! You are <u>not</u> receiving plugin updates for the following plugin(s):', 'boxzilla' ); ?></strong> |
| 14 |
</p> |
| 15 |
<ul class="ul-square"> |
| 16 |
<li><?php echo join( '</li><li>', $this->extensions->map(function($p) { return $p->name(); }) ); ?></li> |
| 17 |
</ul> |
| 18 |
<p> |
| 19 |
To fix this, please activate your license using the form below. |
| 20 |
</p> |
| 21 |
</div> |
| 22 |
<?php } ?> |
| 23 |
|
| 24 |
<?php foreach( $this->notices as $notice ) { ?> |
| 25 |
<div class="notice notice-<?php echo $notice['type']; ?> inline"> |
| 26 |
<p><?php echo $notice['message']; ?></p> |
| 27 |
</div> |
| 28 |
<?php } ?> |
| 29 |
|
| 30 |
<form method="post"> |
| 31 |
<table class="form-table"> |
| 32 |
<tr valign="top"> |
| 33 |
<th><?php _e( 'License Key', 'boxzilla' ); ?></th> |
| 34 |
<td> |
| 35 |
<input size="40" name="boxzilla_license_key" placeholder="<?php esc_attr_e( 'Enter your license key..', 'boxzilla' ); ?>" value="<?php echo esc_attr( $this->license->key ); ?>" <?php if( $this->license->activated ) { echo 'readonly'; } ?> /> |
| 36 |
<input class="button" type="submit" name="action" value="<?php echo ( $this->license->activated ) ? 'deactivate' : 'activate'; ?>" /> |
| 37 |
<p class="help"> |
| 38 |
<?php echo sprintf( __( 'The license key received when purchasing your premium Boxzilla plan. <a href="%s">You can find it here</a>.', 'boxzilla' ), 'https://platform.boxzillaplugin.com/' ); ?> |
| 39 |
</p> |
| 40 |
</td> |
| 41 |
</tr> |
| 42 |
<tr valign="top"> |
| 43 |
<th><?php _e( 'License Status', 'boxzilla' ); ?></th> |
| 44 |
<td> |
| 45 |
<?php |
| 46 |
if( $license->activated ) { ?> |
| 47 |
<p><span class="status positive"><?php _e( 'ACTIVE', 'boxzilla' ); ?></span> - <?php _e( 'you are receiving plugin updates', 'boxzilla' ); ?></p> |
| 48 |
<?php } else { ?> |
| 49 |
<p><span class="status negative"><?php _e( 'INACTIVE', 'boxzilla' ); ?></span> - <?php _e( 'you are <strong>not</strong> receiving plugin updates', 'boxzilla' ); ?></p> |
| 50 |
<?php } ?> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
</table> |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
<p> |
| 59 |
<input type="submit" class="button button-primary" name="action" value="<?php _e( 'Save Changes' ); ?>" /> |
| 60 |
</p> |
| 61 |
|
| 62 |
<input type="hidden" name="boxzilla_license_form" value="1" /> |
| 63 |
</form> |
| 64 |
|