allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [09/50] [abbrv] allura git commit: [#7919] Set maxlength for input fields
Date Fri, 08 Jan 2016 19:30:14 GMT
[#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/6030a3c6
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6030a3c6
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6030a3c6

Branch: refs/heads/master
Commit: 6030a3c646a4748c5e01e49cd990eb3019188c09
Parents: 744d528
Author: Heith Seewald <heiths@gmail.com>
Authored: Tue Dec 8 17:56:24 2015 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Fri Jan 8 14:06:15 2016 -0500

----------------------------------------------------------------------
 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/6030a3c6/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";


Mime
View raw message