From 922bf0894a5aa221972a7eaa668f2e3e169e0eec Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 2 Aug 2019 15:12:45 -0400 Subject: [PATCH] Bring in changes from Chuck Bringing in changes from the serverstats plugin ui elements. --- views/ui/f6/editor.html | 6 +++--- views/ui/f6/number.html | 38 +++++++++++++++++++++++++++++++++----- views/ui/f6/text.html | 3 ++- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/views/ui/f6/editor.html b/views/ui/f6/editor.html index e8ad5b05..559aa45e 100644 --- a/views/ui/f6/editor.html +++ b/views/ui/f6/editor.html @@ -12,10 +12,10 @@ For full list use: ['buttons' => 'link,strong,code,del,fullscreen,em,li,img,ol,block,ins,more,ul,spell,close'] Default (false) dissables HTML/TEXT tabs, true enables all. 'teeny' => boolean Use limited version of editor if true. - 'required' => boolean True if required, - 'helpText' => string Help text for this input, + 'required' => boolean True if required, + 'helpText' => string Help text for this input, 'errorText' => string Error text that appears when the field doesn't validate, - 'dataError' => string Error from data Abstract Class + 'dataError' => string Error from data Abstract Class 'tip' => string Tool Tip text ]} *} diff --git a/views/ui/f6/number.html b/views/ui/f6/number.html index 9377d224..695d84c6 100644 --- a/views/ui/f6/number.html +++ b/views/ui/f6/number.html @@ -11,6 +11,7 @@ 'suffix' => string Suffix text to add after input field, 'min' => integer Minimum numeric value 'max' => integer Maximum numeric value + 'step' => integer Step size when using up/down buttons (spinner) 'width' => integer Size of input field in characters, 'message' => string Message string to display between label and input, 'helpText' => string Help text for this input, @@ -24,6 +25,31 @@ {$ui.width = $ui.width * .55 + 2.5} {/if} +{* If min or max values are supplied, add validator to check that *} +{if isset($ui.min) || isset($ui.max)} + {$usingNumberValidator = true} + +{/if} +
{if (!isset($ui.value) && !isset($ui.field)) || !isset($ui.label)} Field Error: Required field information not supplied! @@ -32,7 +58,7 @@
@@ -52,9 +80,9 @@
+ {if !empty($ui.errorText)}{$ui.errorText}{/if} {if !empty($ui.helpText)}{$ui.helpText}{/if} - {if !empty($ui.errorText)}{$ui.errorText}{/if}
{/if} - + \ No newline at end of file diff --git a/views/ui/f6/text.html b/views/ui/f6/text.html index 5d4eb59a..65382d7f 100644 --- a/views/ui/f6/text.html +++ b/views/ui/f6/text.html @@ -7,6 +7,7 @@ 'field' => string Required Name of field that holds the data or formData array, 'value' => string Required Value of this text element 'label' => string Required Label text for this field, + 'type' => string Type attribute for input. Defaults to text 'pattern' => string Pattern attribute ( number, etc. ) 'placeholder' => string Placeholder string, 'required' => boolean True if required, @@ -34,7 +35,7 @@