From bf3dfc25e42f996aa13f0bd3e2d2f8b950dd5164 Mon Sep 17 00:00:00 2001 From: ailsoncgt Date: Wed, 5 Oct 2016 15:41:36 -0300 Subject: [PATCH] Phone mask to rester user templates #14 --- core/templates/register_user.html | 3 +++ users/templates/users/create.html | 8 ++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/core/templates/register_user.html b/core/templates/register_user.html index 8857765..4fc40ee 100644 --- a/core/templates/register_user.html +++ b/core/templates/register_user.html @@ -56,6 +56,9 @@ {% elif field.auto_id == 'id_cpf' %} {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} + + {% elif field.auto_id == 'id_phone' %} + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} {% else %} {% render_field field class='form-control' %} {{ field.help_text }} diff --git a/users/templates/users/create.html b/users/templates/users/create.html index 96571b9..eeda35a 100644 --- a/users/templates/users/create.html +++ b/users/templates/users/create.html @@ -68,6 +68,14 @@ {% endif %} {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarCpf(this,event);' %} + + {% elif field.auto_id == 'id_phone' %} + {% if field.field.required %} + + {% else %} + + {% endif %} + {% render_field field class='form-control' onkeypress='campoNumerico(this,event); formatarTelefone(this,event);' %} {% else %} {% if field.field.required %} -- libgit2 0.21.2