Changeset 3229045
- Timestamp:
- 01/27/2025 03:36:53 AM (14 months ago)
- Location:
- compress-pdf
- Files:
-
- 4 edited
-
tags/1.0.0/includes/classes/CommonComponents.php (modified) (4 diffs)
-
tags/1.0.0/includes/classes/FormBuilder.php (modified) (3 diffs)
-
trunk/includes/classes/CommonComponents.php (modified) (4 diffs)
-
trunk/includes/classes/FormBuilder.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
compress-pdf/tags/1.0.0/includes/classes/CommonComponents.php
r3222633 r3229045 4 4 class CROSS_SERVICE_SOLUTIONS_CommonComponents { 5 5 // Text Input Component 6 public static function text_input_component($name, $label, $id = '', $required = true, $hint = '' ) {6 public static function text_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 7 7 ob_start(); 8 8 ?> 9 9 <label class="solution__label"> 10 10 <span><?php echo esc_html($label); ?></span> 11 <input type="text" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($id); ?>" class="solution__input" <?php echo $required ? 'required' : ''; ?> /> 11 <input type="text" 12 name="<?php echo esc_attr($name); ?>" 13 id="<?php echo esc_attr($id); ?>" 14 placeholder="<?php echo esc_attr($placeholder); ?>" 15 class="solution__input" 16 <?php echo $required ? 'required' : ''; ?> /> 12 17 <?php if ($hint): ?> 13 18 <span class="solution__hint"><?php echo esc_html($hint); ?></span> … … 19 24 20 25 // Text Area Input Component 21 public static function textarea_input_component($name, $label, $id = '', $required = true, $hint = '' ) {26 public static function textarea_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 22 27 ob_start(); 23 28 ?> 24 29 <label class="solution__label"> 25 30 <span><?php echo esc_html($label); ?></span> 26 <textarea name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($id); ?>" class="solution__textarea" <?php echo $required ? 'required' : ''; ?>></textarea> 31 <textarea name="<?php echo esc_attr($name); ?>" 32 placeholder="<?php echo esc_attr($placeholder); ?>" 33 id="<?php echo esc_attr($id); ?>" 34 class="solution__textarea" 35 <?php echo $required ? 'required' : ''; ?> 36 ></textarea> 27 37 <?php if ($hint): ?> 28 38 <span class="solution__hint"><?php echo esc_html($hint); ?></span> … … 34 44 35 45 // Number Input Component 36 public static function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false ) {46 public static function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false, $placeholder = '') { 37 47 ob_start(); 38 48 ?> … … 50 60 class="<?php echo esc_attr($input_class); ?>" 51 61 value="<?php echo esc_attr($default); ?>" 62 placeholder="<?php echo esc_attr($placeholder); ?>" 52 63 <?php echo ($min !== null) ? 'min="' . esc_attr($min) . '"' : ''; ?> 53 64 <?php echo ($max !== null) ? 'max="' . esc_attr($max) . '"' : ''; ?> -
compress-pdf/tags/1.0.0/includes/classes/FormBuilder.php
r3222633 r3229045 18 18 'required' => array(), 19 19 'multiple' => array(), 20 'placeholder' => array(), 20 21 'min' => array(), 21 22 'max' => array() … … 26 27 'id' => array(), 27 28 'required' => array(), 29 'placeholder' => array(), 28 30 ), 29 31 'select' => array( … … 63 65 } 64 66 65 public function text_input_component($name, $label, $id = '', $required = true, $hint = '' ) {66 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::text_input_component($name, $label, $id, $required, $hint );67 public function text_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 68 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::text_input_component($name, $label, $id, $required, $hint, $placeholder); 67 69 return $this; 68 70 } 69 71 70 public function textarea_input_component($name, $label, $id = '', $required = true, $hint = '' ) {71 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::textarea_input_component($name, $label, $id, $required, $hint );72 public function textarea_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 73 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::textarea_input_component($name, $label, $id, $required, $hint, $placeholder); 72 74 return $this; 73 75 } 74 76 75 public function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false ) {76 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::number_input_component($name, $label, $id, $min, $max, $default, $required, $hint, $use_slider );77 public function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false, $placeholder = '') { 78 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::number_input_component($name, $label, $id, $min, $max, $default, $required, $hint, $use_slider, $placeholder); 77 79 return $this; 78 80 } -
compress-pdf/trunk/includes/classes/CommonComponents.php
r3222633 r3229045 4 4 class CROSS_SERVICE_SOLUTIONS_CommonComponents { 5 5 // Text Input Component 6 public static function text_input_component($name, $label, $id = '', $required = true, $hint = '' ) {6 public static function text_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 7 7 ob_start(); 8 8 ?> 9 9 <label class="solution__label"> 10 10 <span><?php echo esc_html($label); ?></span> 11 <input type="text" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($id); ?>" class="solution__input" <?php echo $required ? 'required' : ''; ?> /> 11 <input type="text" 12 name="<?php echo esc_attr($name); ?>" 13 id="<?php echo esc_attr($id); ?>" 14 placeholder="<?php echo esc_attr($placeholder); ?>" 15 class="solution__input" 16 <?php echo $required ? 'required' : ''; ?> /> 12 17 <?php if ($hint): ?> 13 18 <span class="solution__hint"><?php echo esc_html($hint); ?></span> … … 19 24 20 25 // Text Area Input Component 21 public static function textarea_input_component($name, $label, $id = '', $required = true, $hint = '' ) {26 public static function textarea_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 22 27 ob_start(); 23 28 ?> 24 29 <label class="solution__label"> 25 30 <span><?php echo esc_html($label); ?></span> 26 <textarea name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($id); ?>" class="solution__textarea" <?php echo $required ? 'required' : ''; ?>></textarea> 31 <textarea name="<?php echo esc_attr($name); ?>" 32 placeholder="<?php echo esc_attr($placeholder); ?>" 33 id="<?php echo esc_attr($id); ?>" 34 class="solution__textarea" 35 <?php echo $required ? 'required' : ''; ?> 36 ></textarea> 27 37 <?php if ($hint): ?> 28 38 <span class="solution__hint"><?php echo esc_html($hint); ?></span> … … 34 44 35 45 // Number Input Component 36 public static function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false ) {46 public static function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false, $placeholder = '') { 37 47 ob_start(); 38 48 ?> … … 50 60 class="<?php echo esc_attr($input_class); ?>" 51 61 value="<?php echo esc_attr($default); ?>" 62 placeholder="<?php echo esc_attr($placeholder); ?>" 52 63 <?php echo ($min !== null) ? 'min="' . esc_attr($min) . '"' : ''; ?> 53 64 <?php echo ($max !== null) ? 'max="' . esc_attr($max) . '"' : ''; ?> -
compress-pdf/trunk/includes/classes/FormBuilder.php
r3222633 r3229045 18 18 'required' => array(), 19 19 'multiple' => array(), 20 'placeholder' => array(), 20 21 'min' => array(), 21 22 'max' => array() … … 26 27 'id' => array(), 27 28 'required' => array(), 29 'placeholder' => array(), 28 30 ), 29 31 'select' => array( … … 63 65 } 64 66 65 public function text_input_component($name, $label, $id = '', $required = true, $hint = '' ) {66 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::text_input_component($name, $label, $id, $required, $hint );67 public function text_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 68 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::text_input_component($name, $label, $id, $required, $hint, $placeholder); 67 69 return $this; 68 70 } 69 71 70 public function textarea_input_component($name, $label, $id = '', $required = true, $hint = '' ) {71 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::textarea_input_component($name, $label, $id, $required, $hint );72 public function textarea_input_component($name, $label, $id = '', $required = true, $hint = '', $placeholder = '') { 73 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::textarea_input_component($name, $label, $id, $required, $hint, $placeholder); 72 74 return $this; 73 75 } 74 76 75 public function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false ) {76 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::number_input_component($name, $label, $id, $min, $max, $default, $required, $hint, $use_slider );77 public function number_input_component($name, $label, $id = '', $min = null, $max = null, $default = '', $required = true, $hint = '', $use_slider = false, $placeholder = '') { 78 $this->elements[] = CROSS_SERVICE_SOLUTIONS_CommonComponents::number_input_component($name, $label, $id, $min, $max, $default, $required, $hint, $use_slider, $placeholder); 77 79 return $this; 78 80 }
Note: See TracChangeset
for help on using the changeset viewer.