Explorar o código

Add maxlength for textarea

Visman %!s(int64=2) %!d(string=hai) anos
pai
achega
fac8a5e9dc

+ 2 - 0
app/Models/Pages/Admin/Parser/BBCode.php

@@ -564,6 +564,7 @@ class BBCode extends Parser
                     'value'     => $structure->handler,
                     'caption'   => 'Handler label',
                     'help'      => 'Handler info',
+                    'maxlength' => '65535',
                 ],
                 'text_handler' => [
                     'class'     => ['handler'],
@@ -571,6 +572,7 @@ class BBCode extends Parser
                     'value'     => $structure->text_handler,
                     'caption'   => 'Text handler label',
                     'help'      => 'Text handler info',
+                    'maxlength' => '65535',
                 ],
                 'recursive' => [
                     'type'    => 'radio',

+ 5 - 4
app/Models/Pages/Profile/Edit.php

@@ -463,10 +463,11 @@ class Edit extends Profile
         if ($this->rules->useSignature) {
             $fields = [];
             $fields['signature'] = [
-                'type'    => 'textarea',
-                'value'   => $this->curUser->signature,
-                'caption' => 'Signature',
-                'help'    => ['Sig max size', num($this->curUser->g_sig_length), num($this->curUser->g_sig_lines)],
+                'type'      => 'textarea',
+                'value'     => $this->curUser->signature,
+                'caption'   => 'Signature',
+                'help'      => ['Sig max size', num($this->curUser->g_sig_length), num($this->curUser->g_sig_lines)],
+                'maxlength' => $this->curUser->g_sig_length,
             ];
             $form['sets']['signature'] = [
                 'class'  => ['data-edit'],