import { __ } from '@wordpress/i18n';
import { formIcon, listIcon, calenderCheckIcon, calenderEditedIcon, userIcon, desktopIcon } from '../icon';
import { gfpDateFormat, gfpIsEmpty } from '../../helper';
const EntryDetails = (props) => {
const entryData = gutenaFormsEntryDetails?.entry_data;
return(
{ __( 'Entry Details' ) }
-
{ formIcon() }
{ __( 'Form :', 'gutena-forms' ) }
{ entryData.form_name }
-
{ listIcon() }
{ __( 'Entry ID :', 'gutena-forms' ) }
{ entryData.entry_id }
-
{ calenderCheckIcon() }
{ __( 'Submitted :', 'gutena-forms' ) }
{ gfpDateFormat( entryData.added_time, '@' ) }
-
{ calenderEditedIcon() }
{ __( 'Modified :', 'gutena-forms' ) }
{ gfpDateFormat( entryData.modified_time, '@' ) }
{ ! gfpIsEmpty( entryData.user_display_name ) && (
-
{ userIcon() }
{ __( 'User :', 'gutena-forms' ) }
{ entryData.user_display_name }
)}
{/* -
{ desktopIcon() }
{ __( 'User IP', 'gutena-forms' ) } :
{ entryData.ip_address }192.258.521
*/}
);
}
export default EntryDetails;
/**
* @package Freemius
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
* @since 2.2.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'fs_get_plugins' ) ) {
/**
* @author Leo Fajardo (@leorw)
* @since 2.2.1
*
* @param bool $delete_cache
*
* @return array
*/
function fs_get_plugins( $delete_cache = false ) {
$cached_plugins = wp_cache_get( 'plugins', 'plugins' );
if ( ! is_array( $cached_plugins ) ) {
$cached_plugins = array();
}
$plugin_folder = '';
if ( isset( $cached_plugins[ $plugin_folder ] ) ) {
$plugins = $cached_plugins[ $plugin_folder ];
} else {
if ( ! function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugins = get_plugins();
if ( $delete_cache && is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
wp_cache_delete( 'plugins', 'plugins' );
}
}
return $plugins;
}
}import { Icon } from '@wordpress/components';
import CrownIcon from '../crownIcon';
const StateFieldIcon = () => (
(
<>
>
) }
/>
);
export default StateFieldIcon;
import { registerBlockType } from '@wordpress/blocks';
import metadata from './block.json';
import Icon from './icon';
registerBlockType( metadata, {
edit: () => null,
save: () => null,
icon: Icon,
} );
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "gutena/text-field",
"version": "1.0.0",
"title": "Text Field",
"parent": [ "gutena/forms" ],
"category": "gutena",
"icon": "text",
"description": "Standalone text input field for Gutena Forms.",
"keywords": [ "text field", "input", "gutena forms" ],
"attributes": {
"nameAttr": {
"type": "string",
"default": ""
},
"fieldName": {
"type": "string",
"default": "Name"
},
"placeholder": {
"type": "string",
"default": ""
},
"isRequired": {
"type": "boolean",
"default": false
},
"defaultValue": {
"type": "string",
"default": ""
},
"maxlength": {
"type": "number",
"default": 0
},
"autocomplete": {
"type": "boolean",
"default": false
},
"description": {
"type": "string",
"default": ""
},
"errorRequiredMsg": {
"type": "string",
"default": "Field is required"
},
"fieldType": {
"type": "string",
"default": "text"
}
},
"supports": {
"align": [ "wide", "full" ],
"html": false,
"spacing": {
"margin": true,
"padding": true
}
},
"textdomain": "gutena-forms",
"editorScript": "file:./index.js"
}