File ManagerCurrent Directory: wp-content/plugins/backwpup/components/formLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: text.php <?php use BackWPup\Utils\BackWPupHelpers; /** * @var string $name Unique name of the field to handle value when form is submitted to PHP. * @var string $label The field label. Default: "". * @var string $type The type of the input. Values: "text", "number", "email", "password"… Default: "text". * @var bool $required Optional. True to set the field as required. Default: false. * @var string $value Optional. The field value. Default: "". * @var string $tooltip Optional. The tooltip content. Default: "". * @var string $tooltip_pos Optional. The tooltip position. Default: "center". * @var bool $invalid Optional. True to set the field as invalid. Default: false. * @var int $min Optional. The minimum value. Only for type number fields. * @var int $max Optional. The maximum value. Only for type number fields. * @var string $trigger Optional. The javascript class. Default: "". * @var string $identifier Optional. The field identifier. Default: null. */ # Name if (!isset($name)) { throw new Exception("Attribute 'name' is required on Text field"); } # Defaults $label = $label ?? ""; $type = $type ?? "text"; $value = $value ?? ""; $required = $required ?? false; $invalid = $invalid ?? false; $id = isset($identifier) ? " id='".esc_attr($identifier)."'" : null; $tooltip_pos = $tooltip_pos ?? "center"; # JS actions $trigger = isset($trigger) ? "js-backwpup-$trigger" : ""; # Classes $container_classes = "block relative border rounded font-title focus-within:border-secondary-base"; $container_contextual_classes = $invalid ? "border-danger" : "border-grey-500"; $text_classes = "input-base-label absolute left-4 flex items-center gap-2 transition-all top-2 text-xs"; $text_contextual_classes = $invalid ? "text-danger" : "text-grey-700"; ?> <label class="<?php echo BackWPupHelpers::clsx($container_classes, $container_contextual_classes); ?>"> <input name="<?=esc_attr($name)?>" type="<?php echo esc_attr($type); ?>" <?php echo $id; ?> class="<?php echo BackWPupHelpers::clsx("input-base text-lg w-full", $trigger); ?>" placeholder="" <?php if ($required) : ?>required<?php endif; ?> value="<?php echo esc_attr($value); ?>" <?php if (isset($min) && $type === "number") : ?>min="<?php echo esc_attr($min); ?>" <?php endif; ?> <?php if (isset($max) && $type === "number") : ?>max="<?php echo esc_attr($max); ?>" <?php endif; ?>> <p class="<?php echo $text_classes; ?> <?php echo $text_contextual_classes; ?>"> <?php echo $label; ?> <?php isset($tooltip) && BackWPupHelpers::component("tooltip", ["content" => $tooltip, "icon_size" => "small", "position" => $tooltip_pos]); ?> </p> </label> Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)Diradd.phpFile1.54 KB Rename | Delete | Editbutton.phpFile3.82 KB Rename | Delete | Editcheckbox.phpFile3.04 KB Rename | Delete | Edithidden.phpFile499.00 B Rename | Delete | Editsearch.phpFile1.18 KB Rename | Delete | Editselect.phpFile2.65 KB Rename | Delete | Edittext.phpFile2.68 KB Rename | Delete | Edittoggle.phpFile1.72 KB Rename | Delete | Edit