Upload folder via GUI - inc

This commit is contained in:
Git Manager GUI
2026-04-13 18:52:46 +02:00
parent 9c47501712
commit 09ac38e9fa
31 changed files with 2058 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
if (!defined('ABSPATH')) exit;
class WMF_Field_Range extends WMF_Field_Base {
public $type='range'; public $label='Schieberegler'; public $icon='dashicons-leftright'; public $category='auswahl';
public function defaults() { return array_merge(parent::defaults(),array('min'=>'0','max'=>'100','step'=>'1','show_value'=>'1')); }
public function render($field,$value='') {
$val=$value!==''?$value:($field['min']??0); ?>
<div class="<?php echo esc_attr($this->wrapper_classes($field)); ?>"<?php echo $this->conditional_attrs($field); ?> data-field-id="<?php echo esc_attr($field['id']); ?>">
<?php $this->render_label($field); ?>
<div class="wmf-range-wrap">
<input type="range" id="<?php echo esc_attr($field['id']); ?>" name="wmf_fields[<?php echo esc_attr($field['id']); ?>]" value="<?php echo esc_attr($val); ?>" min="<?php echo esc_attr($field['min']??0); ?>" max="<?php echo esc_attr($field['max']??100); ?>" step="<?php echo esc_attr($field['step']??1); ?>" class="wmf-range-input">
<?php if(!empty($field['show_value'])&&$field['show_value']==='1'): ?>
<span class="wmf-range-value"><?php echo esc_html($val); ?></span>
<?php endif; ?>
</div>
<?php $this->render_description($field); ?>
</div><?php
}
public function sanitize($v,$f) { return is_numeric($v)?$v+0:$f['min']??0; }
}