1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-21 17:04:21 +01:00

adding a little js for min lenght search

* impose a min lenght of 3 chars on searches, at least on the client
side...
This commit is contained in:
kakwa 2016-07-05 20:26:29 +02:00
parent 43e4231be8
commit 9a5aa03de6
3 changed files with 6 additions and 6 deletions

View File

@ -15,9 +15,9 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<a class="navbar-brand navbar-right" href='/logout'><span class="glyphicon glyphicon-off"></span> Logout</a>
<form method='GET' action='/searchuser' class="navbar-form navbar-right" role="search">
<form method='GET' action='/searchuser' class="navbar-form navbar-right" role="search" data-toggle="validator">
<div class="form-group">
<input type="text" class="form-control" name="searchstring" placeholder="Search User">
<input type="text" class="form-control" data-minlength="3" name="searchstring" placeholder="Search User" data-error="Too short">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>

View File

@ -3,10 +3,10 @@
<%block name="core">
<div class="row clearfix">
<div class="col-md-12 column">
<form method='get' action='/searchadmin' role="form" class="form-inline">
<form method='get' action='/searchadmin' role="form" class="form-inline" data-toggle="validator">
<div class="form-group">
<label for="searchstring">Search user to modify/delete</label>
<input type="text" class="form-control" id="searchstring" name="searchstring" placeholder="Search User">
<input type="text" class="form-control" data-minlength="3" data-error="Too short" id="searchstring" name="searchstring" placeholder="Search User">
</div>
<div class="form-group">
<label for="submit">Submit</label>

View File

@ -3,10 +3,10 @@
<%block name="core">
<div class="row clearfix">
<div class="col-md-12 column">
<form method='get' action='/searchuser' role="form" class="form-inline">
<form method='get' action='/searchuser' role="form" class="form-inline" data-toggle="validator">
<div class="form-group">
<label for="searchstring">Search user</label>
<input type="text" id="searchstring" class="form-control" name="searchstring" placeholder="Search User">
<input type="text" id="searchstring" data-minlength="3" data-error="Too short" class="form-control" name="searchstring" placeholder="Search User">
</div>
<div class="form-group">
<label for="submit">Submit</label>