Browse Source

Add mask to phone, cpf and cep

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

43
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>
@ -201,20 +202,17 @@
</footer> </footer>
</div> </div>
{% block foot_js %} {% block foot_js %}
<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/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 type="text/javascript">
</script> $(function () {
<script type="text/javascript">
$(function () {
$('.dateinput').fdatepicker({ $('.dateinput').fdatepicker({
// TODO localize // TODO localize
format: 'dd/mm/yyyy', format: 'dd/mm/yyyy',
@ -223,12 +221,19 @@
todayBtn: true todayBtn: true
}); });
}); });
</script> </script>
<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 %} {% block extra_js %}
{% endblock %}
{% endblock %}
{% endblock foot_js %} {% endblock foot_js %}
</body> </body>
</html> </html>

Loading…
Cancel
Save