| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hurrytimer\Utils; |
| 4 |
|
| 5 |
class Form |
| 6 |
{ |
| 7 |
|
| 8 |
static function toggle($name, $value, $id) |
| 9 |
{ |
| 10 |
?> |
| 11 |
<input type="checkbox" |
| 12 |
name="<?php echo $name ?>" |
| 13 |
id="<?php echo $id ?>" |
| 14 |
class="js-hurrytimer-input-toggle" |
| 15 |
value="yes" |
| 16 |
<?php checked($value, 'yes') ?> |
| 17 |
/> |
| 18 |
<?php |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* @param $name |
| 23 |
* @param $value |
| 24 |
* |
| 25 |
* @return string |
| 26 |
*/ |
| 27 |
static function colorInput($name, $value) |
| 28 |
{ |
| 29 |
?> |
| 30 |
<span class="hurrytimer-color-preview"></span> |
| 31 |
<input |
| 32 |
type="text" |
| 33 |
name="<?php echo $name ?>" |
| 34 |
placeholder="Select color" |
| 35 |
autocomplete="off" |
| 36 |
class="hurrytimer-color-input" |
| 37 |
value="<?php echo $value ?>" /> |
| 38 |
<span class="dashicons dashicons-no-alt hurrytimer-color-clear"></span> |
| 39 |
<?php |
| 40 |
} |
| 41 |
} |