Adjust licenses settings page markup
This commit is contained in:
@@ -53,44 +53,46 @@ class SP_Settings_Licenses extends SP_Settings_Page {
|
|||||||
public function output() {
|
public function output() {
|
||||||
?>
|
?>
|
||||||
<?php wp_nonce_field( 'sp_license_nonce', 'sp_license_nonce' ); ?>
|
<?php wp_nonce_field( 'sp_license_nonce', 'sp_license_nonce' ); ?>
|
||||||
<div class="sp-licenses-wrapper">
|
<div class="sp-modules-wrapper">
|
||||||
<?php
|
<div class="sp-modules-main">
|
||||||
foreach ( $this->licenses as $id => $license ) {
|
<?php
|
||||||
$key = get_site_option( 'sportspress_' . $id . '_license_key' );
|
foreach ( $this->licenses as $id => $license ) {
|
||||||
$key = trim( $key );
|
$key = get_site_option( 'sportspress_' . $id . '_license_key' );
|
||||||
$status = get_site_option( 'sportspress_' . $id . '_license_status', false );
|
$key = trim( $key );
|
||||||
?>
|
$status = get_site_option( 'sportspress_' . $id . '_license_status', false );
|
||||||
<div class="sp-settings-section sp-settings-section-license_options">
|
?>
|
||||||
<h3><?php echo $license['name']; ?></h3>
|
<div class="sp-settings-section sp-settings-section-license_options">
|
||||||
<table class="form-table sp-licenses-table">
|
<h3><?php echo $license['name']; ?></h3>
|
||||||
<tbody>
|
<table class="form-table sp-licenses-table">
|
||||||
<tr>
|
<tbody>
|
||||||
<th scope="row" class="titledesc">
|
<tr>
|
||||||
<?php _e( 'License Key', 'sportspress' ); ?>
|
<th scope="row" class="titledesc">
|
||||||
<?php if ( $key && $status && 'valid' == $status ) { ?>
|
<?php _e( 'License Key', 'sportspress' ); ?>
|
||||||
<i class="dashicons dashicons-yes sp-desc-active"></i>
|
<?php if ( $key && $status && 'valid' == $status ) { ?>
|
||||||
<?php } else { ?>
|
<i class="dashicons dashicons-yes sp-desc-active"></i>
|
||||||
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Enter the license key from your purchase receipt.', 'sportspress' ); ?>"></i>
|
<?php } else { ?>
|
||||||
<?php } ?>
|
<i class="dashicons dashicons-editor-help sp-desc-tip" title="<?php _e( 'Enter the license key from your purchase receipt.', 'sportspress' ); ?>"></i>
|
||||||
</th>
|
<?php } ?>
|
||||||
<td>
|
</th>
|
||||||
<?php if ( false !== $status && 'valid' == $status ) { ?>
|
<td>
|
||||||
<p>
|
<?php if ( false !== $status && 'valid' == $status ) { ?>
|
||||||
<input type="text" name="sp_license_key_<?php echo $id; ?>" size="40" value="<?php esc_attr_e( $key ); ?>" readonly="readonly">
|
<p>
|
||||||
<input name="sp_license_deactivate_<?php echo $id; ?>" class="button button-secondary button-small" type="submit" value="<?php esc_attr_e( 'Deactivate', 'sportspress' ); ?>" />
|
<input type="text" name="sp_license_key_<?php echo $id; ?>" size="40" value="<?php esc_attr_e( $key ); ?>" readonly="readonly">
|
||||||
</p>
|
<input name="sp_license_deactivate_<?php echo $id; ?>" class="button button-secondary button-small" type="submit" value="<?php esc_attr_e( 'Deactivate', 'sportspress' ); ?>" />
|
||||||
<?php } else { ?>
|
</p>
|
||||||
<p>
|
<?php } else { ?>
|
||||||
<input type="text" name="sp_license_key_<?php echo $id; ?>" size="40">
|
<p>
|
||||||
<input name="sp_license_activate_<?php echo $id; ?>" class="button button-primary button-small" type="submit" value="<?php esc_attr_e( 'Activate', 'sportspress' ); ?>" />
|
<input type="text" name="sp_license_key_<?php echo $id; ?>" size="40">
|
||||||
</p>
|
<input name="sp_license_activate_<?php echo $id; ?>" class="button button-primary button-small" type="submit" value="<?php esc_attr_e( 'Activate', 'sportspress' ); ?>" />
|
||||||
<?php } ?>
|
</p>
|
||||||
</td>
|
<?php } ?>
|
||||||
</tr>
|
</td>
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
<?php } ?>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user