Browse Source

Add mask to phone, cpf and cep

pull/98/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
98ce45689b
  1. 19
      templates/base.html

19
templates/base.html

@ -27,6 +27,7 @@
<script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script> <script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation-datepicker/js/foundation-datepicker.js' %}"></script> <script type="text/javascript" src="{% static 'foundation-datepicker/js/foundation-datepicker.js' %}"></script>
<script type="text/javascript" src="{% static 'jQuery-runner/build/jquery.runner.js' %}"></script> <script type="text/javascript" src="{% static 'jQuery-runner/build/jquery.runner.js' %}"></script>
<script type="text/javascript" src="{% static 'jquery-mask-plugin/dist/jquery.mask.js' %}"></script>
{% endblock %} {% endblock %}
</head> </head>
@ -206,12 +207,9 @@
<script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script> <script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script>
<script src="{% static 'tinymce/tinymce.min.js' %}"></script> <script src="{% static 'tinymce/tinymce.min.js' %}"></script>
<script> <script>tinymce.init({selector:'textarea'});</script>
tinymce.init({selector:'textarea'});
</script> <script>$(document).foundation();</script>
<script>
$(document).foundation();
</script>
<script type="text/javascript"> <script type="text/javascript">
$(function () { $(function () {
@ -225,8 +223,15 @@
}); });
</script> </script>
{% block extra_js %} <script>
$(document).ready(function(){
$('.telefone').mask("(99) 9999-9999", {placeholder:"(__)____ -____"});
$('.cpf').mask("000.000.000-00", {placeholder:"___.___.___-__"});
$('.cep').mask("00000-000", {placeholder:"_____-___"});
});
</script>
{% block extra_js %}
{% endblock %} {% endblock %}
{% endblock foot_js %} {% endblock foot_js %}

Loading…
Cancel
Save