From: Chuck Scott Date: Fri, 21 Jun 2019 15:49:35 +0000 (-0400) Subject: Changed textarea element to editor X-Git-Tag: v3.0.0^2~16 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b9378950b0f49c268ff719f17f3cd52a71fdc297;p=WP-Plugins%2Fglm-serverstats.git Changed textarea element to editor --- diff --git a/views/adminServerStatsConfig.html b/views/adminServerStatsConfig.html index 5f90b66..2f96823 100755 --- a/views/adminServerStatsConfig.html +++ b/views/adminServerStatsConfig.html @@ -156,7 +156,7 @@ 'rows' => 5, 'maxwidth' => '900px' ]} - {include file="ui/f6/textarea.html"} + {include file="ui/f6/editor.html"} diff --git a/views/ui/f6/editor.html b/views/ui/f6/editor.html new file mode 100644 index 0000000..4598d5c --- /dev/null +++ b/views/ui/f6/editor.html @@ -0,0 +1,70 @@ +{* + Foundation 6 Text Area Input Field + All parameters are required. + Do not list parameters if they're false. (We're not checking for false) + If supplying field data (formData) from the data abstract, supply a + name of that in the "field" parameter. Also then certain parameters like + "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, + '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, + 'required' => boolean True if required, + '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 + ]} +*} + +{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)} +
+
+ Field Error: Required field information not supplied! +
+
+{else} + {if isset(${$fieldData.data})} {* If using data abstract *} +
+
+ +
+
+ + {if $data.fieldFail.$field}{$data.fieldFail.$field}{/if} +
+
+ {else} {* Using simple field *} +
+ +
+ {/if} +{/if} diff --git a/views/ui/f6/f6-editor.html b/views/ui/f6/f6-editor.html deleted file mode 100644 index f1a09b6..0000000 --- a/views/ui/f6/f6-editor.html +++ /dev/null @@ -1,28 +0,0 @@ -{* Foundation 6 Editor *} -{* setup $data *} -{* setup $field *} -{* setup $fieldLabel *} -
-
- -
-
- {if isset($data) && $data.fieldData.$field} - {assign var="textAreaContent" value=$data.fieldData.$field} - {else} - {$textAreaContent = ''} - {/if} - {wp_editor( - $textAreaContent, - {$field}, - json_decode('{ - "media_buttons": true, - "quicktags": false, - "textarea_name": {$field}, - "editor_height": 250 - }', true) - )} -
- {if $data.fieldFail.$field}{$data.fieldFail.$field}{/if} -
-
diff --git a/views/ui/f6/f6-section-name.html b/views/ui/f6/f6-section-name.html deleted file mode 100644 index 56525a3..0000000 --- a/views/ui/f6/f6-section-name.html +++ /dev/null @@ -1,19 +0,0 @@ -{* - Foundation 6 - Form Section Title - All parameters are required. -*} -{* $title Title of Section *} - -{if $title==false} -
-
- Field Error: Required field information not supplied! -
-
-{else} -
-
-
{$fieldLabel}: -
-
-{/if} \ No newline at end of file diff --git a/views/ui/f6/f6-text.html b/views/ui/f6/f6-text.html deleted file mode 100644 index 0cece8c..0000000 --- a/views/ui/f6/f6-text.html +++ /dev/null @@ -1,39 +0,0 @@ -{* - Foundation 6 Text Input Field - All parameters are required. - One of $data or $field must be false - Set parameters to false if not used. -*} -{* $data Data Array from data abstract results - If simple field data, not used *} -{* $field Simple data field name - If using data abstract, not used *} -{* $fieldLabel Input Label text *} -{* $placeholder Placeholder text *} -{* $required True if field is required, defaults to false *} -{* $message Message to be displayed with field *} - -{if ($data==false && $field==false) || $fieldLabel==false} -
-
- Field Error: Required field information not supplied! -
-
-{else} - {if $data!=false} {* If using data abstract *} -
-
- -
-
- - {if $data.fieldFail.$field}{$data.fieldFail.$field}{/if} -
-
- {else} {* Using simple field *} -
- -
- {/if} -{/if} diff --git a/views/ui/f6/textarea.html b/views/ui/f6/textarea.html deleted file mode 100644 index 4598d5c..0000000 --- a/views/ui/f6/textarea.html +++ /dev/null @@ -1,70 +0,0 @@ -{* - Foundation 6 Text Area Input Field - All parameters are required. - Do not list parameters if they're false. (We're not checking for false) - If supplying field data (formData) from the data abstract, supply a - name of that in the "field" parameter. Also then certain parameters like - "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, - '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, - 'required' => boolean True if required, - '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 - ]} -*} - -{if (!isset($fieldData.data) && !isset($fieldData.field)) || !isset($fieldData.label)} -
-
- Field Error: Required field information not supplied! -
-
-{else} - {if isset(${$fieldData.data})} {* If using data abstract *} -
-
- -
-
- - {if $data.fieldFail.$field}{$data.fieldFail.$field}{/if} -
-
- {else} {* Using simple field *} -
- -
- {/if} -{/if}