Moved HTML to a single file
This commit is contained in:
parent
0f18570827
commit
b3b4e92fe1
|
@ -81,27 +81,7 @@ class WC_Integration_MaxMind_Geolocation extends WC_Integration {
|
||||||
public function admin_options() {
|
public function admin_options() {
|
||||||
parent::admin_options();
|
parent::admin_options();
|
||||||
|
|
||||||
$database_path = esc_attr( $this->database_service->get_database_path() );
|
include dirname( __FILE__ ) . '/views/html-admin-options.php';
|
||||||
$label = esc_html__( 'Database File Path', 'woocommerce' );
|
|
||||||
$description = esc_html__( 'The path to the MaxMind database file that was downloaded by the integration.', 'woocommerce' );
|
|
||||||
|
|
||||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
|
||||||
echo <<<INPUT
|
|
||||||
<table class="form-table">
|
|
||||||
<tr valign="top">
|
|
||||||
<th scope="row" class="titledesc">
|
|
||||||
<label>{$label}</label>
|
|
||||||
</th>
|
|
||||||
<td class="forminp">
|
|
||||||
<fieldset>
|
|
||||||
<legend class="screen-reader-text"><span>{$label}</span></legend>
|
|
||||||
<input class="input-text regular-input" type="text" value="{$database_path}" readonly>
|
|
||||||
<p class="description">{$description}</p>
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
INPUT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Admin View: Page - Admin options.
|
||||||
|
*
|
||||||
|
* @package WooCommerce\Integrations
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined( 'ABSPATH' ) || exit;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table class="form-table">
|
||||||
|
<tr valign="top">
|
||||||
|
<th scope="row" class="titledesc">
|
||||||
|
<label><?php esc_html_e( 'Database File Path', 'woocommerce' ); ?></label>
|
||||||
|
</th>
|
||||||
|
<td class="forminp">
|
||||||
|
<fieldset>
|
||||||
|
<legend class="screen-reader-text"><span><?php esc_html_e( 'Database File Path', 'woocommerce' ); ?></span></legend>
|
||||||
|
<input class="input-text regular-input" type="text" value="<?php echo esc_attr( $this->database_service->get_database_path() ); ?>" readonly>
|
||||||
|
<p class="description"><?php esc_html_e( 'The path to the MaxMind database file that was downloaded by the integration.', 'woocommerce' ); ?></p>
|
||||||
|
</fieldset>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
Loading…
Reference in New Issue