You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/12/17 20:22:16 UTC

[29/50] [abbrv] allura git commit: [#7919] Set maxlength for input fields

[#7919] Set maxlength for input fields


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/c23844fc
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/c23844fc
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/c23844fc

Branch: refs/heads/db/8034
Commit: c23844fc543a8c59977bdb0893d10ce2cc74e854
Parents: 5c218d8
Author: Heith Seewald <he...@gmail.com>
Authored: Tue Dec 8 17:56:24 2015 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Wed Dec 16 13:55:38 2015 -0600

----------------------------------------------------------------------
 Allura/allura/ext/admin/templates/project_install_tool.html | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/c23844fc/Allura/allura/ext/admin/templates/project_install_tool.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/project_install_tool.html b/Allura/allura/ext/admin/templates/project_install_tool.html
index eb4ce21..0e6d98d 100644
--- a/Allura/allura/ext/admin/templates/project_install_tool.html
+++ b/Allura/allura/ext/admin/templates/project_install_tool.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
-{#<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>#}
-{#<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>#}
 {% set full_url = h.absurl(c.project.url()) %}
 
 <h1> Installing {{ tool.tool_label }} </h1>
 {% if tool_name == 'subproject' %}
     {% set mount_point_re = h.re_mount_points['re_project_name']|safe %}
+    {% set max_length = 15 %}
 {% else %}
     {% set mount_point_re = h.re_mount_points['re_relaxed_tool_mount_point']|safe
     if g.entry_points['tool'][tool_name].relaxed_mount_points
     else h.re_mount_points['re_tool_mount_point']|safe %}
+    {% set max_length = 62 %}
 {% endif %}
 
 <form method="post" action="{{ full_url }}admin/update_mounts" id="install_form">
@@ -25,8 +25,7 @@
     <div class="grid-13">
         <input id="id_url_input" type="text" name="new.mount_point"
                title="The url for this tool relative to {{ full_url }} " class="new_mount_point validate_input"
-               value="{{ tool.default_mount_point }}" data-regex="{{ mount_point_re }}"
-               maxlength="{% 14 if tool_name == 'subproject' else 62 %}">
+               value="{{ tool.default_mount_point }}" data-regex="{{ mount_point_re }}" maxlength="{{ max_length}}">
         <span id="url_error_message" class="modal-form-error"></span>
         <p><span id="full-url-preview">
             {{ full_url }} <strong style="color:orange">
@@ -98,7 +97,6 @@
         }
         else if (mp_exists) {
             submit_button.attr('disabled', true);
-            var exists_msg = "";
             $(url_error).text("A tool with that path already exists");
             mp.setCustomValidity('Mount point already exists');
             url_error.className = "modal-form-error";