Hi,

PFA patch to fix the issue where we have hard coded limit of 4000
characters in Backform Textarea control, with new implementation we won't
limit input unless and until maxlength is provided in particular field.
RM#2877

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/static/js/backform.pgadmin.js 
b/web/pgadmin/static/js/backform.pgadmin.js
index 865746f..acde87b 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -273,7 +273,8 @@
   _.extend(
     Backform.TextareaControl.prototype, {
       defaults: _.extend(
-        Backform.TextareaControl.prototype.defaults, {rows: 5, helpMessage: 
null}
+        Backform.TextareaControl.prototype.defaults,
+        {rows: 5, helpMessage: null, maxlength: null}
       ),
       events : {
         "change textarea": "onChange",
@@ -287,7 +288,10 @@
         '<div class="<%=Backform.controlsClassName%>">',
         '  <textarea ',
         '    class="<%=Backform.controlClassName%> <%=extraClasses.join(\' 
\')%>" name="<%=name%>"',
-        '    maxlength="<%=maxlength%>" placeholder="<%-placeholder%>" 
<%=disabled ? "disabled" : ""%>',
+        '  <% if (maxlength) { %>',
+        '    maxlength="<%=maxlength%>"',
+        '  <% } %>',
+        '    placeholder="<%-placeholder%>" <%=disabled ? "disabled" : ""%>',
         '    rows=<%=rows ? rows : ""%>',
         '    <%=required ? "required" : ""%>><%-value%></textarea>',
         '  <% if (helpMessage && helpMessage.length) { %>',

Reply via email to