| 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 |
| 11 |
if ( ! $license->activated ) { |
| 12 |
?> |
| 13 |
<div class="error inline"> |
| 14 |
<p> |
| 15 |
<strong><?php _e( 'Warning! You are <u>not</u> receiving plugin updates for the following plugin(s):', 'boxzilla' ); ?></strong> |
| 16 |
</p> |
| 17 |
<ul class="ul-square"> |
| 18 |
<?php |
| 19 |
foreach ( $this->extensions as $p ) { |
| 20 |
echo '<li>' . esc_html( $p->name() ) . '</li>'; |
| 21 |
} |
| 22 |
?> |
| 23 |
</ul> |
| 24 |
<p> |
| 25 |
<?php _e( 'To fix this, please activate your license using the form below.', 'boxzilla' ); ?> |
| 26 |
</p> |
| 27 |
</div> |
| 28 |
<?php |
| 29 |
} |
| 30 |
?> |
| 31 |
|
| 32 |
<?php |
| 33 |
foreach ( $this->notices as $notice ) { |
| 34 |
?> |
| 35 |
<div class="notice notice-<?php echo $notice['type']; ?> inline"> |
| 36 |
<p><?php echo $notice['message']; ?></p> |
| 37 |
</div> |
| 38 |
<?php |
| 39 |
} |
| 40 |
?> |
| 41 |
|
| 42 |
<form method="post"> |
| 43 |
<table class="form-table"> |
| 44 |
<tr valign="top"> |
| 45 |
<th><?php _e( 'License Key', 'boxzilla' ); ?></th> |
| 46 |
<td> |
| 47 |
<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 ); ?>" |
| 48 |
<?php |
| 49 |
if ( $this->license->activated ) { |
| 50 |
echo 'readonly'; |
| 51 |
} |
| 52 |
?> |
| 53 |
/> |
| 54 |
<input class="button" type="submit" name="action" value="<?php echo ( $this->license->activated ) ? 'deactivate' : 'activate'; ?>" /> |
| 55 |
<p class="help"> |
| 56 |
<?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/' ); ?> |
| 57 |
</p> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
<tr valign="top"> |
| 61 |
<th><?php _e( 'License Status', 'boxzilla' ); ?></th> |
| 62 |
<td> |
| 63 |
<?php |
| 64 |
if ( $license->activated ) { |
| 65 |
?> |
| 66 |
<p><span class="status positive"><?php _e( 'ACTIVE', 'boxzilla' ); ?></span> - <?php _e( 'you are receiving plugin updates', 'boxzilla' ); ?></p> |
| 67 |
<?php |
| 68 |
} else { |
| 69 |
?> |
| 70 |
<p><span class="status negative"><?php _e( 'INACTIVE', 'boxzilla' ); ?></span> - <?php _e( 'you are <strong>not</strong> receiving plugin updates', 'boxzilla' ); ?></p> |
| 71 |
<?php |
| 72 |
} |
| 73 |
?> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
</table> |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
<p> |
| 82 |
<input type="submit" class="button button-primary" name="action" value="<?php _e( 'Save Changes', 'boxzilla' ); ?>" /> |
| 83 |
</p> |
| 84 |
|
| 85 |
<input type="hidden" name="boxzilla_license_form" value="1" /> |
| 86 |
</form> |
| 87 |
|