From: Steve Sutton Date: Tue, 23 Jul 2019 15:07:55 +0000 (-0400) Subject: Updating ui elements from serverstats X-Git-Tag: v2.12.7^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c71e8605bbb63d8acc34a5b3e3396aa402fbe5ac;p=WP-Plugins%2Fglm-member-db.git Updating ui elements from serverstats brining in updates from serverstats --- diff --git a/views/ui/f6/checkbox.html b/views/ui/f6/checkbox.html index 4cbfb313..ff3db27b 100644 --- a/views/ui/f6/checkbox.html +++ b/views/ui/f6/checkbox.html @@ -1,41 +1,41 @@ {* - Foundation 6 Checkbox Input Field - All parameters are required. - Only 0ne of $data or $field may be used. - Do not list fields if they're false. (We're not checking for false) + Foundation 6 - Checkbox Input Field {$ui = [ - 'value' => string Value of the element - 'field' => string Name of field that holds the data if not using data abstract, - 'label' => string Label text for this field, - 'active' => string Text for active state - 'inactive' => string text for inactive state - 'required' => boolean True if required, - 'helpText' => string Help text for this input, - 'errortext' => string Error text that appears when the field doesn't validate, + 'field' => string Required Name of field that holds the data if not using data abstract, + 'value' => string Required True/False, 0/1 + 'label' => string Required Label text for this field, + '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, + 'tip' => string Tool Tip text 'dataError' => string Error from data Abstract Class ]} *} +
- +
-
- + {if isset($ui.tip)} + ? + {/if} +
-
- {if isset($ui.dataError) && $ui.dataError}{$ui.dataError}{/if} - {if isset($ui.errorText)}{$ui.errorText}{/if} - {if isset($ui.helpText)}{$ui.helpText}{/if} +
+ {if !empty($ui.helpText)}{$ui.helpText}{/if} + {if !empty($ui.dataError)}{$ui.dataError}{/if} + {if !empty($ui.errorText)}{$ui.errorText}{/if}
diff --git a/views/ui/f6/form-start.html b/views/ui/f6/form-start.html index f8a39a02..9e4084ab 100644 --- a/views/ui/f6/form-start.html +++ b/views/ui/f6/form-start.html @@ -1,16 +1,38 @@ {* - Foundation 6 Form Start + Foundation 6 UI - Form Start + {$ui = [ - 'id' => string Form id - 'action' => string URL - 'method' => string Method POST or GET - 'File' => Bool 0 or 1 + 'action' => string Required URL + 'method' => string Required Method "post" or "get" + 'id' => string Form id + 'file' => boolean If including file upload set to true + 'validate' => boolean If true, include Abide Form Validation + 'validateFocusMsg' => boolean If true focuses on validateMessage on error + 'validateID' => string Unique text that will be added to the validate message container to ensure that it is unique + 'validateMessage' => string Message to show for a validation error, Defaults to "There are some errors in your form." ]} *} +
+{if !empty($ui.validate)} + + {if !empty($ui.validateFocusMsg)} + + {/if} +{/if} + diff --git a/views/ui/f6/number.html b/views/ui/f6/number.html index c7b44271..e5aca69d 100644 --- a/views/ui/f6/number.html +++ b/views/ui/f6/number.html @@ -1,63 +1,56 @@ {* - Foundation 6 Number Input Field - All parameters are required. - Only 0ne of $data or $field may be used. - DO NOT include fields if they're false. (We're not checking for false) + Foundation 6 UI - Number Input Field - {$fieldData = [ - 'data' => array Data from data abstract if using that, - 'field' => string Name of field that holds the data if not using data abstract, - 'label' => string Label text for this field, - 'placeholder' => string Placeholder string, - 'suffix' => string Suffix text to add after input field, - 'min' => integer Minimum numeric value - 'max' => integer Maximum numeric value - 'maxWidth' => integer Size of input field in characters, - 'message' => string Message string to display between label and input, - 'helpText' => string Help text for this input, - 'errortext' => string Error text that appears when the field doesn't validate + Do not include fields if they're false. (We're not checking for false) + + {$ui = [ + 'field' => string Required Name of field that holds the data if not using data abstract, + 'value' => array Required Value of this number field + 'label' => string Required Label text for this field, + 'placeholder' => string Placeholder string, + 'suffix' => string Suffix text to add after input field, + 'min' => integer Minimum numeric value + 'max' => integer Maximum numeric value + '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, + 'errorText' => string Error text that appears when the field doesn't validate ]} *} - - -{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)} -
-
- Field Error: Required field information not supplied! -
-
+{if empty($ui.width)} + {$ui.width = 5} {else} - {if isset($fieldData.data)} {* If using data abstract *} -
-
- -
-
- Yes - {if $data.fieldFail.$field}{$data.fieldFail.$field}{/if} -
-
+ {$ui.width = $ui.width * .55 + 2.5} +{/if} + +
+ {if (!isset($ui.value) && !isset($ui.field)) || !isset($ui.label)} + Field Error: Required field information not supplied! {else} -
-
diff --git a/views/ui/f6/submit.html b/views/ui/f6/submit.html index 9c08345c..6925d1b8 100644 --- a/views/ui/f6/submit.html +++ b/views/ui/f6/submit.html @@ -9,16 +9,21 @@ warning = yellow {$ui = [ - 'id' => string Optional The id for button, - 'type' => string Optional Type for button, - 'label' => string Required Name of the Button Label, - 'class' => string Default Primary class (primary, secondary, alert, success, warning) + 'class' => string Required One of "primary", "secondary", "alert", "success", and "warning" and any addtional desired classes + 'label' => string Required Label text for this field, + 'submit' => boolean True if this is a submit button + 'id' => string Optional ID for this button + 'cancel' => string Optional URL for cancel button ]} *} - + +
+ + {if !empty($ui.cancel)}Cancel{/if} +
diff --git a/views/ui/f6/text.html b/views/ui/f6/text.html index eca39ae6..65c22120 100644 --- a/views/ui/f6/text.html +++ b/views/ui/f6/text.html @@ -37,19 +37,19 @@ id="{$ui.field}" name="{$ui.field}" value="{$ui.value|escape}" - {if isset($ui.pattern) && $ui.pattern}pattern="{$ui.pattern}"{/if} - {if $ui.required}required{/if} - {if isset($ui.placeholder) && $ui.placeholder}placeholder="{$ui.placeholder}"{/if} - {if isset($ui.errorText)}aria-errormessage="{$ui.field}_ErrorText"{/if} - {if isset($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if} - {if isset($ui.maxWidth)}style="max-width: {$ui.maxWidth}"{/if} - {if isset($ui.maxLength)}max-length="{$ui.maxLength}"{/if} + {if !empty($ui.pattern)}pattern="{$ui.pattern}"{/if} + {if !empty($ui.required)}required{/if} + {if !empty($ui.placeholder)}placeholder="{$ui.placeholder}"{/if} + {if !empty($ui.errorText)}aria-errormessage="{$ui.field}_ErrorText"{/if} + {if !empty($ui.helpText)}aria-describedby="{$ui.field}_HelpText"{/if} + {if !empty($ui.maxWidth)}style="max-width: {$ui.maxWidth}"{/if} + {if !empty($ui.maxLength)}max-length="{$ui.maxLength}"{/if} />
-
- {if isset($ui.dataError) && $ui.dataError}{$ui.dataError}{/if} - {if isset($ui.errorText)}{$ui.errorText}{/if} - {if isset($ui.helpText)}{$ui.helpText}{/if} +
+ {if !empty($ui.dataError)}{$ui.dataError}{/if} + {if !empty($ui.errorText)}{$ui.errorText}{/if} + {if !empty($ui.helpText)}{$ui.helpText}
{/if}
{/if}