Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
djnro
Commits
6639fd6a
Commit
6639fd6a
authored
Nov 16, 2012
by
Leonidas Poulopoulos
Browse files
Added mask to password field with sneak option. Fixed small bug with servers view page
parent
cdea64f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
static/js/showpass.js
0 → 100644
View file @
6639fd6a
/*
* @name Twitter Bootstrap Show Password
* @descripton
* @version 0.6
* @requires Jquery 1.8.1
*
* @author Jeroen van Meerendonk
* @author-email jeroen@cyneek.com
* @author-website http://cyneek.com
*
* @author Joseba Juániz
* @author-email joseba@cyneek.com
* @author-website http://cyneek.com
* @licens MIT License - http://www.opensource.org/licenses/mit-license.php
*/
(
function
(
$
){
$
.
fn
.
extend
({
showPassword
:
function
()
{
var
input_password
=
$
(
this
);
console
.
log
(
input_password
)
//create the icon and assign
var
icon_password
=
$
(
'
<span tabindex="100" class="add-on"><i class="icon-eye-open"></i></span>
'
).
css
(
'
cursor
'
,
'
help
'
).
tooltip
({
trigger
:
'
click
'
});
icon_password
.
attr
(
'
data-original-title
'
,
$
(
this
).
attr
(
'
value
'
));
input_password
.
on
({
input
:
function
()
{
icon_password
.
attr
(
'
data-original-title
'
,
$
(
this
).
attr
(
'
value
'
));
}
});
// Create the wrap and append the icon
input_password
.
wrap
(
'
<div class="input-append" />
'
).
after
(
icon_password
);
}
});
})(
jQuery
);
\ No newline at end of file
templates/edumanage/monlocauthpar_edit.html
View file @
6639fd6a
...
...
@@ -10,7 +10,13 @@
<script
type=
"text/javascript"
src=
"http://maps.googleapis.com/maps/api/js?sensor=false"
></script>
<script
src=
"/static/js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/showpass.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#id_passwp
'
).
showPassword
();
});
</script>
{% endblock %}
...
...
@@ -60,7 +66,7 @@
<div
class=
"control-group {% if form.passwp.errors %} error {% endif %}"
>
<label
class=
"control-label"
for=
"id_passwp"
><b>
{% trans "Password" %}
</b></label>
<div
class=
"controls"
>
{{
form.passwp
}}
<input
type=
"password"
maxlength=
"24"
name=
"passwp"
id=
"id_passwp"
{%
if
edit
%}
value=
'{{form.instance.passwp}}'
{%
endif
%}
{%
if
form.
data.
passwp
%}
value=
'{{form.data.passwp}}'
{%
endif
%}
>
{% if form.passwp.errors %}
<span
class=
"help-inline"
>
{{ form.passwp.errors|join:", " }}
</span>
{% endif %}
<span
class=
"help-block"
>
{{ form.passwp.help_text }}
</span>
</div>
...
...
templates/edumanage/server_details.html
View file @
6639fd6a
...
...
@@ -77,12 +77,6 @@
{{ server.status_server }}
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
for=
"id_secret"
>
{% trans "Secret" %}
</label>
<div
class=
"controls"
>
{{ server.secret }}
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
for=
"id_proto"
>
{% trans "Protocol" %}
</label>
<div
class=
"controls"
>
...
...
@@ -91,7 +85,7 @@
</div>
<div
class=
"control-group"
>
<div
class=
"controls"
>
<a
class=
"btn btn-primary"
href=
"{% url edit-servers serv
ic
e.pk %}"
>
{% trans "Edit" %}
</a>
<a
class=
"btn btn-primary"
href=
"{% url edit-servers serve
r
.pk %}"
>
{% trans "Edit" %}
</a>
</div>
</div>
</div>
...
...
templates/edumanage/servers.html
View file @
6639fd6a
...
...
@@ -130,7 +130,7 @@ $("#delserverSubmit").click(function(){
<td>
{{server.get_ertype_display}}
</td>
<td>
{{server.port}}
</td>
<td>
{{server.proto}}
</td>
<td
style=
"text-align: center;"
><a
href=
"{% url edit-servers server.pk %}"
class=
"btn btn-small"
>
{% trans "edit" %}
</a>
<a
href=
"#"
id=
"del_server_{{server.pk}}"
data-servername=
"{{server.name}}"
class=
"btn btn-small btn-warning"
>
{% trans "delete" %}
</a></td>
<td
style=
"text-align: center;"
><a
href=
"{% url edit-servers server.pk %}"
class=
"btn btn-small"
>
{% trans "edit" %}
</a>
<a
href=
"#"
id=
"del_server_{{server.pk}}"
data-servername=
"{{server.
get_
name}}"
class=
"btn btn-small btn-warning"
>
{% trans "delete" %}
</a></td>
</tr>
{% endfor %}
</tbody>
...
...
templates/edumanage/servers_edit.html
View file @
6639fd6a
...
...
@@ -7,8 +7,14 @@
{% endblock %}
{% block extrahead %}
<script
type=
"text/javascript"
src=
"/static/js/jquery.min.js"
></script>
<script
src=
"/static/js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"/static/js/showpass.js"
></script>
<script
type=
"text/javascript"
src=
"//maps.googleapis.com/maps/api/js?sensor=false"
></script>
<script
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#id_secret
'
).
showPassword
();
});
</script>
{% endblock %}
{% block homeactive %}{% endblock %}
{% block serversactive %}class="active"{% endblock %}
...
...
@@ -93,7 +99,7 @@
<div
class=
"control-group {% if form.secret.errors %} error {% endif %}"
>
<label
class=
"control-label"
for=
"id_secret"
><b>
{% trans "Secret" %}
</b></label>
<div
class=
"controls"
>
{{
form.secret
}}
<input
type=
"password"
maxlength=
"16"
name=
"secret"
id=
"id_secret"
{%
if
edit
%}
value=
'{{form.instance.secret}}'
{%
endif
%}
{%
if
form.
data.
secret
%}
value=
'{{form.data.secret}}'
{%
endif
%}
>
{% if form.secret.errors %}
<span
class=
"help-inline"
>
{{ form.secret.errors|join:", " }}
</span>
{% endif %}
<span
class=
"help-block"
>
{{ form.secret.help_text }}
</span>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment