From: Steve Sutton Date: Thu, 27 Jun 2019 20:42:14 +0000 (-0400) Subject: Redo smarty ui element X-Git-Tag: v2.12.4^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=91e6b0e375401db87c72e2cf77eb7a4c07c22f79;p=WP-Plugins%2Fglm-member-db.git Redo smarty ui element starting with text --- diff --git a/views/ui/f6/text.html b/views/ui/f6/text.html index cf5bfb52..e102e2ed 100644 --- a/views/ui/f6/text.html +++ b/views/ui/f6/text.html @@ -7,8 +7,8 @@ "required" will be supplied by the abstract rather than in a parameter in this array. - {$fieldData = [ - 'data' => array Data from data abstract if using that, + {$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, 'placeholder' => string Placeholder string, @@ -16,58 +16,37 @@ 'maxWidth' => string Size of input field using standard style notation ('900px', '15rem', ...), 'maxlength' => integer Maximum number of characters that may be entered, 'helpText' => string Help text for this input, - 'errortext' => string Error text that appears when the field doesn't validate + 'errortext' => string Error text that appears when the field doesn't validate, + 'dataError' => string Error from data Abstract Class ]} *} -{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)} +{if !isset($ui.field) || !isset($ui.label)}
Field Error: Required field information not supplied!
{else} - {if isset($fieldData.data)} {* If using data abstract *} - {$field = $fieldData.field} - {$data = $fieldData.data} -
-
- - - {if $data.fieldFail.$field}{$data.fieldFail.$field}{/if} - {if isset($fieldData.helpText)}

{$fieldData.helpText}

{/if} - {if isset($fieldData.errorText)}{$fieldData.errorText}{/if} -
-
- {else} {* Using simple field *} -
- +
+
+ + + {if $ui.dataError}{$ui.dataErrror}{/if} + {if isset($ui.helpText)}

{$ui.helpText}

{/if} + {if isset($ui.errorText)}{$ui.errorText}{/if}
- {/if} +
{/if}