From 8719408078e680fe2bf4ce1e0442f115d554f982 Mon Sep 17 00:00:00 2001
From: potreb <potreb@gmail.com>
Date: Wed, 2 Jun 2021 12:00:45 +0200
Subject: [PATCH] scope: added clone text field

---
 src/Field/ImageInputField.php |  2 +-
 templates/input-image.php     | 11 +++--------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/Field/ImageInputField.php b/src/Field/ImageInputField.php
index dd4226c..95d4bb6 100644
--- a/src/Field/ImageInputField.php
+++ b/src/Field/ImageInputField.php
@@ -2,7 +2,7 @@
 
 namespace WPDesk\Forms\Field;
 
-class ImageInputField extends \WPDesk\Forms\Field\BasicField {
+class ImageInputField extends BasicField {
 
 	public function __construct() {
 		parent::__construct();
diff --git a/templates/input-image.php b/templates/input-image.php
index 8b805c6..18fba1b 100644
--- a/templates/input-image.php
+++ b/templates/input-image.php
@@ -4,8 +4,7 @@
  * @var string              $name_prefix
  * @var string              $value
  */
-?>
-<?php
+
 $media_container_id = 'media_' . sanitize_key( $field->get_id() );
 ?>
 <div class="media-input-wrapper" id="<?php echo $media_container_id; ?>">
@@ -18,14 +17,10 @@ $media_container_id = 'media_' . sanitize_key( $field->get_id() );
 		<?php endif; ?>
     </div>
     <p class="hide-if-no-js">
-        <a class="upload-custom-img <?php if ( $value ) {
-			echo 'hidden';
-		} ?>" href="<?php echo $value ?>">
+        <a class="upload-custom-img <?php if ( $value ): ?>hidden<?php endif ?>" href="<?php echo $value ?>">
 			<?php _e( 'Set image', 'wp-forms' ) ?>
         </a>
-        <a class="delete-custom-img <?php if ( ! $value ) {
-			echo 'hidden';
-		} ?>" href="#">
+        <a class="delete-custom-img <?php if ( ! $value ): ?>hidden<?php endif ?>" href="#">
 			<?php _e( 'Remove image', 'wp-forms' ) ?>
         </a>
     </p>
-- 
GitLab