File: /home/globfdxw/www/wp-content/plugins/wpforms-pdf/templates/access/file-password-required.php
<?php
/**
* PDF Password Form template.
*
* @since 1.0.0
*
* @var string $hash Hash from URL.
* @var string $error_message Error message (optional).
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php esc_html_e( 'Password Protected', 'wpforms-pdf' ); ?></title>
<?php wp_head(); ?>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Clear error message when form is submitted.
const form = document.querySelector('form');
form.addEventListener('submit', function(e) {
const error = document.querySelector('.wpforms-pdf-password-error');
if ( error ) {
error.style.display = 'none';
}
});
});
</script>
</head>
<body <?php body_class(); ?>>
<main>
<div class="wpforms-pdf-password-form-content wpforms-file-download-content">
<img src="<?php echo esc_url( WPFORMS_PDF_URL . 'assets/images/frontend/file-download/lock-alt.svg' ); ?>" alt="<?php esc_attr_e( 'File Protected', 'wpforms-pdf' ); ?>">
<h1><?php esc_html_e( 'Password Protected', 'wpforms-pdf' ); ?></h1>
<p><?php esc_html_e( 'This file is protected. Enter the password to access.', 'wpforms-pdf' ); ?></p>
<form method="post">
<div class="wpforms-file-password-form">
<input type="password" name="wpforms_pdf_password" placeholder="<?php esc_attr_e( 'Enter password', 'wpforms-pdf' ); ?>" required>
<input type="hidden" name="wpforms_pdf_hash" value="<?php echo esc_attr( $hash ); ?>">
<button type="submit"><?php esc_html_e( 'Submit', 'wpforms-pdf' ); ?></button>
</div>
</form>
<?php if ( ! empty( $error_message ) ) : ?>
<p class="wpforms-pdf-password-error"><?php echo esc_html( $error_message ); ?></p>
<?php endif; ?>
</div>
</main>
<?php wp_footer(); ?>
</body>
</html>