Skip to content
Snippets Groups Projects
Commit 2a346d90 authored by Piotr Po's avatar Piotr Po
Browse files

Merge branch 'scope/fields' into 'master'

scope: added clone text field

See merge request !16
parents e9c36523 4df963a1
No related branches found
No related tags found
1 merge request!16scope: added clone text field
Pipeline #5832 passed with warnings with stages
in 1 minute and 28 seconds
# Changelog
## [2.4.5] - 2021-06-02
### Fixed
- Added text multiple field
- Added image input field
## [2.4.4] - 2021-04-26
### Fixed
- Added description_tip to Renderer
......
......@@ -2,7 +2,7 @@
namespace WPDesk\Forms\Field;
class ImageInputField extends \WPDesk\Forms\Field\BasicField {
class ImageInputField extends BasicField {
public function __construct() {
parent::__construct();
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment