From: Chuck Scott Date: Fri, 21 Jun 2019 15:46:06 +0000 (-0400) Subject: Adding TextArea to admin interface elements X-Git-Tag: v3.0.0^2~17 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=d25ac18c11abf4be8772cd361313e5ea99a5724c;p=WP-Plugins%2Fglm-serverstats.git Adding TextArea to admin interface elements --- diff --git a/views/adminServerStatsConfig.html b/views/adminServerStatsConfig.html index 8d37a90..5f90b66 100755 --- a/views/adminServerStatsConfig.html +++ b/views/adminServerStatsConfig.html @@ -152,7 +152,9 @@ 'field' => 'cookie_message', 'label' => 'Cookies Notice Text', 'required' => true, - 'height' => 100 + 'height' => 50, + 'rows' => 5, + 'maxwidth' => '900px' ]} {include file="ui/f6/textarea.html"} diff --git a/views/ui/f6/text.html b/views/ui/f6/text.html index 87c5474..bd8aee2 100644 --- a/views/ui/f6/text.html +++ b/views/ui/f6/text.html @@ -13,7 +13,7 @@ 'label' => string Label text for this field, 'placeholder' => string Placeholder string, 'required' => boolean True if required, - 'maxwidth' => integer Size of input field in characters, + '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, 'errtext' => string Error text that appears when the field doesn't validate @@ -44,7 +44,7 @@ {if $fieldData.required}required{/if} {if isset($fieldData.helptext)}aria-describedby="{$fieldData.field}_HelpText"{/if} {if isset($fieldData.required)}required{/if} placeholder="{$fieldData.placeholder}" - {if isset($fieldData.maxwidth)}style="max-width: {$fieldData.maxwidth}rem"{/if} + {if isset($fieldData.maxwidth)}style="max-width: {$fieldData.maxwidth}"{/if} {if isset($fieldData.maxlength)}max-length="{$fieldData.maxwidth}"{/if} /> {if isset($fieldData.helptext)}

{$fieldData.helptext}

{/if} diff --git a/views/ui/f6/textarea.html b/views/ui/f6/textarea.html index 6b77350..4598d5c 100644 --- a/views/ui/f6/textarea.html +++ b/views/ui/f6/textarea.html @@ -13,7 +13,8 @@ 'label' => string Label text for this field, 'placeholder' => string Placeholder string, 'required' => boolean True if required, - 'maxwidth' => integer Size of input field in characters, + '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, 'errtext' => string Error text that appears when the field doesn't validate @@ -40,18 +41,29 @@ {else} {* Using simple field *}
{/if}