diff --git a/dapp/models.py b/dapp/models.py index 17d900ba42e47ca452fc1cf7edd1d66996ee59d5..eb7e4da97e74eea6e54d3f426416a15b3e53a91c 100644 --- a/dapp/models.py +++ b/dapp/models.py @@ -9,7 +9,7 @@ You should have received a copy of the GNU General Public License along with thi """ from django.db import models -from api.models import Institution, Service +from api.models import Institution, Service, CustomUser from dapp import validators from dapp.managers import AccountManager, StatusManager @@ -33,6 +33,7 @@ class Account(models.Model): institution = models.ForeignKey(Institution, on_delete=models.PROTECT, null=True, blank=True) service = models.ForeignKey(Service, on_delete=models.PROTECT, null=True) clave = models.CharField(max_length=255, null=True, default='', blank=True) + owner = models.ForeignKey(CustomUser, on_delete=models.PROTECT, null=False) objects = AccountManager() def __str__(self): diff --git a/frontend/static/frontend/css/main.css b/frontend/static/frontend/css/main.css index 85d9d1a42906d7ab60611e637279caadb6c4eecc..4cf562c10e005cad446036b5a8bfe9dd6a69042c 100644 --- a/frontend/static/frontend/css/main.css +++ b/frontend/static/frontend/css/main.css @@ -7,4 +7,4 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ -@import url(https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,700,700i,800,800i);footer h2{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}html{font-size:1.125em}body{font-family:Raleway,Arial,sans-serif;font-size:1.125em;font-weight:300;background-color:#fff;line-height:1.45;color:#333;margin-top:0}.alert{display:none}p{margin-bottom:1.3em}h1,h2,h3,h4{margin:1em 0 .5em;font-weight:700;line-height:1.2}h1{margin-top:0;font-size:2.441em}h2{font-size:1.953em}h3{font-size:1.563em}h4{font-size:1.25em}.breadcrumb,.font_small,small{font-size:.8em}@media (max-width:662px){.breadcrumb,.font_small,small{font-size:1em}}@media (max-width:620px){h2{font-size:1.563em}body,html{font-size:1em}}.breadcrumb{background:0 0;padding:10px 0;margin-top:20px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"\00bb"}.fa{vertical-align:middle}.btn-primary{background-color:#0094d4;color:#fff;border-color:#0094d4;border-radius:50px;border-width:2px;font-weight:700;-webkit-transition:all .2s ease;transition:all .2s ease}.btn-primary:active,.btn-primary:active:hover,.btn-primary:focus,.btn-primary:hover{background-color:#fff;color:#0094d4;border-color:#0094d4}.btn-default{color:#0094d4;background-color:transparent;border-color:#0094d4;border-width:2px;border-style:solid;-webkit-border-image:initial;-o-border-image:initial;border-image:initial;padding:10px 16px;border-radius:50px;margin-top:2px}.btn-default:focus,.btn-default:hover{color:#fff;background-color:#0094d4;border-color:#0094d4}.modal-open .navbar-fixed-bottom,.modal-open .navbar-fixed-top{margin-right:15px}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65;border-color:#999;background-color:#999}.btn.disabled:hover,.btn[disabled]:hover,fieldset[disabled] .btn:hover{color:#fff;border-color:#999;background-color:#999}.visually-hidden{position:absolute!important;clip:rect(1px,1px,1px,1px);overflow:hidden;height:1px;width:1px;word-wrap:normal}.visually-hidden.focusable:active,.visually-hidden.focusable:focus{position:fixed!important;clip:auto;overflow:visible;height:auto;width:100%}a.skip-link{padding:20px;margin:0 auto;background-color:#0094d4;text-align:center;z-index:8000;color:#fff}button.toggle-button{background:0 0;border:0;height:30px}button.toggle-button:hover{color:#0094d4}.form-footer{margin:40px 0}.form-footer p{margin:0;margin-top:8px}@media (max-width:768px){.form-footer{text-align:center}}.form-required:after{background-image:url(../images/required.svg);background-size:10px 10px;content:"";display:inline-block;line-height:1;height:10px;width:10px}.navbar-header .logo{margin-right:-15px;padding-left:15px;padding-right:15px}@media (min-width:768px){.navbar-header .logo{margin-right:0;padding-left:0}}.navbar-header .logo img{height:100px;width:140px}.navbar-header .logo img:hover{opacity:.9}.navbar-default{background-color:transparent;border-color:transparent;padding-top:30px;-webkit-transition:padding .2s ease;transition:padding .2s ease}.navbar-default .navbar-nav li>a{color:#0094d4;font-weight:400}@media (min-width:768px){.navbar-default .navbar-nav li>a{color:#fff;padding-bottom:8px;padding-left:4px;padding-right:4px;margin-left:20px;border-bottom:2px solid transparent}}@media (max-width:768px){.navbar-default .navbar-nav li>a:focus,.navbar-default .navbar-nav li>a:hover{color:#0094d4;text-decoration:underline}}@media (min-width:768px){.navbar-default .navbar-nav li>a:focus,.navbar-default .navbar-nav li>a:hover{color:#fff;border-bottom:2px solid #fff}}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#fff;background-color:transparent;border-bottom:2px solid #fff}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#fff;background-color:transparent}.navbar-default .navbar-toggle{border-color:#fff}.navbar-default .navbar-toggle .icon-bar{background-color:#fff}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#fff}.navbar-default .navbar-toggle:focus .icon-bar,.navbar-default .navbar-toggle:hover .icon-bar{background-color:#2e2f30}@media (max-width:768px){.navbar-default{padding-top:0}.navbar-default .sin-toggle{position:absolute;margin-top:30px;top:0;right:20px}.navbar-default .navbar-collapse{-webkit-box-shadow:0 5px 5px 0 rgba(0,0,0,.2);box-shadow:0 5px 5px 0 rgba(0,0,0,.2);background-color:#fff}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#0094d4}}@media (min-width:768px){.navbar-default .navbar-nav li ul.dropdown-menu{padding:0;border:none;left:20px;margin-top:16px;border-radius:4px}.navbar-default .menu{margin-top:40px}}.navbar-default .navbar-nav li ul.dropdown-menu li a{border:none;padding:12px 18px;white-space:normal;background-color:#fff;color:#0094d4;margin-left:0}@media (min-width:768px){.navbar-default .navbar-nav li ul.dropdown-menu li a{font-size:1.125em}}.navbar-default .navbar-nav li ul.dropdown-menu li a:hover{border:none;text-decoration:underline}.navbar-default .navbar-nav li ul.dropdown-menu li a.is-active{color:#2e2f30;text-decoration:underline}@media (max-width:768px){.navbar-default .navbar-nav li ul.dropdown-menu li a{padding-left:50px}}.navbar-content{background:#fff;border-color:#e7e7e7}.navbar-content .navbar-toggle{border-color:#0094d4}.navbar-content .navbar-toggle .icon-bar{background-color:#0094d4}.navbar-content .navbar-toggle:focus,.navbar-content .navbar-toggle:hover{background-color:#0094d4}.navbar-content .navbar-toggle:focus .icon-bar,.navbar-content .navbar-toggle:hover .icon-bar{background-color:#fff}.navbar-content .navbar-nav li>a{color:#0094d4}@media (max-width:768px){.navbar-content .navbar-nav li>a:focus,.navbar-content .navbar-nav li>a:hover{color:#0094d4;text-decoration:underline}}@media (min-width:768px){.navbar-content .navbar-nav li>a:focus,.navbar-content .navbar-nav li>a:hover{color:#0094d4;border-bottom:2px solid #0094d4}}.navbar-content .navbar-nav>.active>a,.navbar-content .navbar-nav>.active>a:focus,.navbar-content .navbar-nav>.active>a:hover{color:#2e2f30;background-color:transparent;border-bottom:2px solid #2e2f30}@media (max-width:768px){.navbar-content .navbar-nav>.active>a,.navbar-content .navbar-nav>.active>a:focus,.navbar-content .navbar-nav>.active>a:hover{border-bottom:none}}.navbar-content .navbar-nav>.open>a,.navbar-content .navbar-nav>.open>a:focus,.navbar-content .navbar-nav>.open>a:hover{color:#0094d4}.navbar-content .navbar-nav>.open>a,.navbar-content .navbar-nav>.open>a:focus,.navbar-content .navbar-nav>.open>a:hover{color:#0094d4}.navbar-content .navbar-nav li ul.dropdown-menu{border-top:1px solid #0094d4;border-top-left-radius:0;border-top-right-radius:0}@media (min-width:768px){.navbar-content .navbar-nav li ul.dropdown-menu{margin-top:31px}}.navbar-content .navbar-nav li ul.dropdown-menu:before{border:none}.navbar-fondo{background:#fff;border-color:#e7e7e7;padding-top:0}.navbar-fondo .logo img{height:75px!important;margin-top:0}.navbar-fondo .navbar-toggle{border-color:#0094d4}.navbar-fondo .navbar-toggle .icon-bar{background-color:#0094d4}.navbar-fondo .navbar-toggle:focus,.navbar-fondo .navbar-toggle:hover{background-color:#0094d4}.navbar-fondo .navbar-toggle:focus .icon-bar,.navbar-fondo .navbar-toggle:hover .icon-bar{background-color:#fff}.navbar-fondo .menu{margin-top:25px}@media (min-width:768px){.navbar-fondo .menu{margin-top:20px}}.navbar-fondo .navbar-nav li>a{color:#0094d4}@media (max-width:768px){.navbar-fondo .navbar-nav li>a:focus,.navbar-fondo .navbar-nav li>a:hover{color:#0094d4;text-decoration:underline}}@media (min-width:768px){.navbar-fondo .navbar-nav li>a:focus,.navbar-fondo .navbar-nav li>a:hover{color:#0094d4;border-bottom:2px solid #0094d4}}.navbar-fondo .navbar-nav>.active>a,.navbar-fondo .navbar-nav>.active>a:focus,.navbar-fondo .navbar-nav>.active>a:hover{color:#2e2f30;background-color:transparent;border-bottom:2px solid #2e2f30}.navbar-fondo .navbar-nav>.open>a,.navbar-fondo .navbar-nav>.open>a:focus,.navbar-fondo .navbar-nav>.open>a:hover{color:#0094d4;background-color:transparent}.navbar-fondo .navbar-nav li ul.dropdown-menu{border-top:1px solid #0094d4;border-top-left-radius:0;border-top-right-radius:0}@media (min-width:768px){.navbar-fondo .navbar-nav li ul.dropdown-menu{margin-top:26px}}@media (max-width:768px){.navbar-fondo .sin-toggle{margin-top:0}}.navbar-fondo .navbar-nav li ul.dropdown-menu:before{border:none}.navbar-fondo .navbar-nav li ul.dropdown-menu li:last-child>a:focus,.navbar-fondo .navbar-nav li ul.dropdown-menu li:last-child>a:hover{background-color:transparent;color:#0094d4}.navbar-fondo .navbar-nav>.open>a,.navbar-fondo .navbar-nav>.open>a:focus,.navbar-fondo .navbar-nav>.open>a:hover{color:#0094d4}@media (max-width:992px){.navbar-default .navbar-nav li>a{margin-left:10px;font-size:.9em}}.navbar-default .navbar-nav li ul.dropdown-menu li.logout a{background-color:#d9534f;color:#fff}.navbar-default .navbar-nav li ul.dropdown-menu li.logout a:hover{background-color:#d9534f;color:#fff}footer{color:#fff;background-color:#2e2f30;text-align:center;padding:80px 0 60px 0;height:264px}footer ul{list-style:none;padding-left:0;margin-bottom:30px}footer ul li{position:relative;display:inline-block;margin:0 10px}footer ul li a{color:#2e2f30;font-size:16px;display:inline-block;background-color:#fff;border-radius:60px;width:50px;height:50px;padding:.55em 0;vertical-align:middle;-webkit-transition:all .2s ease;transition:all .2s ease}footer ul li a:focus,footer ul li a:hover{color:rgba(255,255,255,.8);color:#fff;background-color:#0094d4;-webkit-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2)}article .field--name-body{margin-bottom:50px;margin-left:auto;margin-right:auto;max-width:700px}article ol,article ul{margin-top:20px}article ol li,article ul li{margin-bottom:20px}article ol li ol,article ol li ul,article ul li ol,article ul li ul{margin-bottom:40px}article img{display:block;max-width:100%;height:auto;margin:30px auto;clear:both;border-radius:4px}article a img{border:1px solid #999}article a:focus img,article a:hover img{border:1px solid #2e2f30;-webkit-box-shadow:0 3px 0 0 #999;box-shadow:0 3px 0 0 #999}article .field--name-field-image img{margin-top:0;margin-bottom:50px;border-bottom:10px solid #0094d4}article .field--name-field-fecha{float:left;padding:10px}article .field--name-field-categoria{float:left;color:#fff;background-color:#0094d4;padding:10px}article .field--name-field-categoria a{color:#fff}.feedback,main form{margin:0 auto;margin-bottom:50px;max-width:700px}.feedback .btn-primary,main form .btn-primary{padding:10px 16px;font-size:18px;line-height:1.3333333}.feedback{text-align:center}.feedback img{margin-top:-30px}.feedback h1{margin-top:-30px}.feedback p{width:70%;margin:0 auto;margin-top:20px;margin-bottom:30px}#edit-preview{display:none}main section{margin-top:35px;padding:0 10px}main section section{margin-top:0}@media (max-width:768px){main section{margin-top:0}}main{margin-top:30px;margin-bottom:50px;padding:0 20px;min-height:-webkit-calc(100vh - 474px);min-height:calc(100vh - 474px)}main a{text-decoration:underline}main a.btn{text-decoration:none}main h2{position:relative;margin-bottom:50px}main h2:after{background-color:#755293;content:"";display:block;height:5px;left:0;bottom:-15px;position:absolute;width:50px}main h3{color:#755293;padding-left:1.5em;background-image:url(../images/bullet.svg);background-repeat:no-repeat;background-position:0}.diagonal-header{height:160px;content:"";background:url(../images/pattern.png),#3b76ba;background:url(../images/pattern.png),-webkit-gradient(linear,left top,left bottom,from(#3b76ba),color-stop(130%,#7dd2d9));background:url(../images/pattern.png),-webkit-linear-gradient(top,#3b76ba 0,#7dd2d9 130%);background:url(../images/pattern.png),linear-gradient(to bottom,#3b76ba 0,#7dd2d9 130%);-webkit-transform:skewY(1.5deg);-ms-transform:skewY(1.5deg);transform:skewY(1.5deg);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left}@media (max-width:768px){.diagonal-header{height:130px}}table[role=presentation] img{margin:0}.admin .btn-header{float:right;margin-top:-80px}@media (max-width:768px){.admin .btn-header{float:none;margin-top:0;width:100%}}@media (min-width:768px){.admin .modal .btn{min-width:200px}}.admin .table td{font-weight:500}.admin .table thead th.sorting_desc,.admin th.sorting_asc{border-bottom-color:#0094d4}.admin .table tbody{font-size:.8em}.admin .table tbody tr{border-bottom:2px}.admin .table tbody td{vertical-align:middle}.admin .table tbody .nombreCuenta{font-weight:700}.admin .table tbody .direccionCuenta{font-size:.9em}.admin .table tbody .btn{padding:6px 12px}.admin .table tbody .revision{font-style:italic;font-size:.9em;line-height:3em}.admin table.dataTable thead :after{color:#0094d4}.admin .dataTables_info,.admin .pagination,.admin table.dataTable thead :after{font-size:.8em;opacity:none}.admin .pagination>li.active a{background:#0094d4;border-color:#0094d4}@media (max-width:768px){.admin .dataTables_wrapper:first-child .row{margin-top:20px}.admin .dataTables_wrapper:first-child .row div label{width:100%}}button.eliminar{color:#d9534f;font-size:.8em;background:0 0;border-color:#d9534f}button.eliminar:hover{color:#fff;background:#d9534f;border-color:#d9534f}button.block{color:#d9534f;background:0 0;border-color:#d9534f}button.block:hover{color:#fff;background:#d9534f;border-color:#d9534f}@media (max-width:1200px){button.block{float:none}}.userHeader .mailClass,.userHeader button,.userHeader h2{display:inline-block}.userHeader h2{margin:10px}.userHeader h2:after{display:none}.userHeader .mailClass{font-size:1.5em;color:#999}@media (max-width:992px){.userHeader .mailClass{display:none}}.userHeader a{padding:10px}.userHeader button{margin-top:10px}form.filtros{width:100%;margin-bottom:20px;max-width:100%;border-bottom:1px solid #eee;padding-bottom:20px}form.filtros input,form.filtros select{margin-right:20px}.warning .fas,.warning svg{color:#d9534f}.quiereCarga{font-weight:700}.confirmar .modal-footer{text-align:center}.userBlocked{border:1px solid #ccc!important;border-radius:10px;background-color:#ccc!important;padding:0 10px}.userBlocked .mailClass{font-size:1.5em;color:#fff}.blocked{background-color:#ccc!important}.table>tbody>tr.warning>td{background-color:#fbf3c8!important}span.mwei{font-style:italic;float:right} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,700,700i,800,800i);footer h2{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}html{font-size:1.125em}body{font-family:Raleway,Arial,sans-serif;font-size:1.125em;font-weight:300;background-color:#fff;line-height:1.45;color:#333;margin-top:0}.alert{display:none}p{margin-bottom:1.3em}h1,h2,h3,h4{margin:1em 0 .5em;font-weight:700;line-height:1.2}h1{margin-top:0;font-size:2.441em}h2{font-size:1.953em}h3{font-size:1.563em}h4{font-size:1.25em}.breadcrumb,.font_small,small{font-size:.8em}@media (max-width:662px){.breadcrumb,.font_small,small{font-size:1em}}@media (max-width:620px){h2{font-size:1.563em}body,html{font-size:1em}}.breadcrumb{background:0 0;padding:10px 0;margin-top:20px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"\00bb"}.fa{vertical-align:middle}.btn-primary{background-color:#0094d4;color:#fff;border-color:#0094d4;border-radius:50px;border-width:2px;font-weight:700;-webkit-transition:all .2s ease;transition:all .2s ease}.btn-primary:active,.btn-primary:active:hover,.btn-primary:focus,.btn-primary:hover{background-color:#fff;color:#0094d4;border-color:#0094d4}.btn-default{color:#0094d4;background-color:transparent;border-color:#0094d4;border-width:2px;border-style:solid;-webkit-border-image:initial;-o-border-image:initial;border-image:initial;padding:10px 16px;border-radius:50px;margin-top:2px}.btn-default:focus,.btn-default:hover{color:#fff;background-color:#0094d4;border-color:#0094d4}.modal-open .navbar-fixed-bottom,.modal-open .navbar-fixed-top{margin-right:15px}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none;opacity:.65;border-color:#999;background-color:#999}.btn.disabled:hover,.btn[disabled]:hover,fieldset[disabled] .btn:hover{color:#fff;border-color:#999;background-color:#999}.visually-hidden{position:absolute!important;clip:rect(1px,1px,1px,1px);overflow:hidden;height:1px;width:1px;word-wrap:normal}.visually-hidden.focusable:active,.visually-hidden.focusable:focus{position:fixed!important;clip:auto;overflow:visible;height:auto;width:100%}a.skip-link{padding:20px;margin:0 auto;background-color:#0094d4;text-align:center;z-index:8000;color:#fff}button.toggle-button{background:0 0;border:0;height:30px}button.toggle-button:hover{color:#0094d4}.form-footer{margin:40px 0}.form-footer p{margin:0;margin-top:8px}@media (max-width:768px){.form-footer{text-align:center}}.form-required:after{background-image:url(../images/required.svg);background-size:10px 10px;content:"";display:inline-block;line-height:1;height:10px;width:10px}.navbar-header .logo{margin-right:-15px;padding-left:15px;padding-right:15px}@media (min-width:768px){.navbar-header .logo{margin-right:0;padding-left:0}}.navbar-header .logo img{height:100px;width:140px}.navbar-header .logo img:hover{opacity:.9}.navbar-default{background-color:transparent;border-color:transparent;padding-top:30px;-webkit-transition:padding .2s ease;transition:padding .2s ease}.navbar-default .navbar-nav li>a{color:#0094d4;font-weight:400}@media (min-width:768px){.navbar-default .navbar-nav li>a{color:#fff;padding-bottom:8px;padding-left:4px;padding-right:4px;margin-left:20px;border-bottom:2px solid transparent}}@media (max-width:768px){.navbar-default .navbar-nav li>a:focus,.navbar-default .navbar-nav li>a:hover{color:#0094d4;text-decoration:underline}}@media (min-width:768px){.navbar-default .navbar-nav li>a:focus,.navbar-default .navbar-nav li>a:hover{color:#fff;border-bottom:2px solid #fff}}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#fff;background-color:transparent;border-bottom:2px solid #fff}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#fff;background-color:transparent}.navbar-default .navbar-toggle{border-color:#fff}.navbar-default .navbar-toggle .icon-bar{background-color:#fff}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#fff}.navbar-default .navbar-toggle:focus .icon-bar,.navbar-default .navbar-toggle:hover .icon-bar{background-color:#2e2f30}@media (max-width:768px){.navbar-default{padding-top:0}.navbar-default .sin-toggle{position:absolute;margin-top:30px;top:0;right:20px}.navbar-default .navbar-collapse{-webkit-box-shadow:0 5px 5px 0 rgba(0,0,0,.2);box-shadow:0 5px 5px 0 rgba(0,0,0,.2);background-color:#fff}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#0094d4}}@media (min-width:768px){.navbar-default .navbar-nav li ul.dropdown-menu{padding:0;border:none;left:20px;margin-top:16px;border-radius:4px}.navbar-default .menu{margin-top:40px}}.navbar-default .navbar-nav li ul.dropdown-menu li a{border:none;padding:12px 18px;white-space:normal;background-color:#fff;color:#0094d4;margin-left:0}@media (min-width:768px){.navbar-default .navbar-nav li ul.dropdown-menu li a{font-size:1.125em}}.navbar-default .navbar-nav li ul.dropdown-menu li a:hover{border:none;text-decoration:underline}.navbar-default .navbar-nav li ul.dropdown-menu li a.is-active{color:#2e2f30;text-decoration:underline}@media (max-width:768px){.navbar-default .navbar-nav li ul.dropdown-menu li a{padding-left:50px}}.navbar-content{background:#fff;border-color:#e7e7e7}.navbar-content .navbar-toggle{border-color:#0094d4}.navbar-content .navbar-toggle .icon-bar{background-color:#0094d4}.navbar-content .navbar-toggle:focus,.navbar-content .navbar-toggle:hover{background-color:#0094d4}.navbar-content .navbar-toggle:focus .icon-bar,.navbar-content .navbar-toggle:hover .icon-bar{background-color:#fff}.navbar-content .navbar-nav li>a{color:#0094d4}@media (max-width:768px){.navbar-content .navbar-nav li>a:focus,.navbar-content .navbar-nav li>a:hover{color:#0094d4;text-decoration:underline}}@media (min-width:768px){.navbar-content .navbar-nav li>a:focus,.navbar-content .navbar-nav li>a:hover{color:#0094d4;border-bottom:2px solid #0094d4}}.navbar-content .navbar-nav>.active>a,.navbar-content .navbar-nav>.active>a:focus,.navbar-content .navbar-nav>.active>a:hover{color:#2e2f30;background-color:transparent;border-bottom:2px solid #2e2f30}@media (max-width:768px){.navbar-content .navbar-nav>.active>a,.navbar-content .navbar-nav>.active>a:focus,.navbar-content .navbar-nav>.active>a:hover{border-bottom:none}}.navbar-content .navbar-nav>.open>a,.navbar-content .navbar-nav>.open>a:focus,.navbar-content .navbar-nav>.open>a:hover{color:#0094d4}.navbar-content .navbar-nav>.open>a,.navbar-content .navbar-nav>.open>a:focus,.navbar-content .navbar-nav>.open>a:hover{color:#0094d4}.navbar-content .navbar-nav li ul.dropdown-menu{border-top:1px solid #0094d4;border-top-left-radius:0;border-top-right-radius:0}@media (min-width:768px){.navbar-content .navbar-nav li ul.dropdown-menu{margin-top:31px}}.navbar-content .navbar-nav li ul.dropdown-menu:before{border:none}.navbar-fondo{background:#fff;border-color:#e7e7e7;padding-top:0}.navbar-fondo .logo img{height:75px!important;margin-top:0}.navbar-fondo .navbar-toggle{border-color:#0094d4}.navbar-fondo .navbar-toggle .icon-bar{background-color:#0094d4}.navbar-fondo .navbar-toggle:focus,.navbar-fondo .navbar-toggle:hover{background-color:#0094d4}.navbar-fondo .navbar-toggle:focus .icon-bar,.navbar-fondo .navbar-toggle:hover .icon-bar{background-color:#fff}.navbar-fondo .menu{margin-top:25px}@media (min-width:768px){.navbar-fondo .menu{margin-top:20px}}.navbar-fondo .navbar-nav li>a{color:#0094d4}@media (max-width:768px){.navbar-fondo .navbar-nav li>a:focus,.navbar-fondo .navbar-nav li>a:hover{color:#0094d4;text-decoration:underline}}@media (min-width:768px){.navbar-fondo .navbar-nav li>a:focus,.navbar-fondo .navbar-nav li>a:hover{color:#0094d4;border-bottom:2px solid #0094d4}}.navbar-fondo .navbar-nav>.active>a,.navbar-fondo .navbar-nav>.active>a:focus,.navbar-fondo .navbar-nav>.active>a:hover{color:#2e2f30;background-color:transparent;border-bottom:2px solid #2e2f30}.navbar-fondo .navbar-nav>.open>a,.navbar-fondo .navbar-nav>.open>a:focus,.navbar-fondo .navbar-nav>.open>a:hover{color:#0094d4;background-color:transparent}.navbar-fondo .navbar-nav li ul.dropdown-menu{border-top:1px solid #0094d4;border-top-left-radius:0;border-top-right-radius:0}@media (min-width:768px){.navbar-fondo .navbar-nav li ul.dropdown-menu{margin-top:26px}}@media (max-width:768px){.navbar-fondo .sin-toggle{margin-top:0}}.navbar-fondo .navbar-nav li ul.dropdown-menu:before{border:none}.navbar-fondo .navbar-nav li ul.dropdown-menu li:last-child>a:focus,.navbar-fondo .navbar-nav li ul.dropdown-menu li:last-child>a:hover{background-color:transparent;color:#0094d4}.navbar-fondo .navbar-nav>.open>a,.navbar-fondo .navbar-nav>.open>a:focus,.navbar-fondo .navbar-nav>.open>a:hover{color:#0094d4}@media (max-width:992px){.navbar-default .navbar-nav li>a{margin-left:10px;font-size:.9em}}.navbar-default .navbar-nav li ul.dropdown-menu li.logout a{background-color:#d9534f;color:#fff}.navbar-default .navbar-nav li ul.dropdown-menu li.logout a:hover{background-color:#d9534f;color:#fff}footer{color:#fff;background-color:#2e2f30;text-align:center;padding:80px 0 60px 0;height:264px}footer ul{list-style:none;padding-left:0;margin-bottom:30px}footer ul li{position:relative;display:inline-block;margin:0 10px}footer ul li a{color:#2e2f30;font-size:16px;display:inline-block;background-color:#fff;border-radius:60px;width:50px;height:50px;padding:.55em 0;vertical-align:middle;-webkit-transition:all .2s ease;transition:all .2s ease}footer ul li a:focus,footer ul li a:hover{color:rgba(255,255,255,.8);color:#fff;background-color:#0094d4;-webkit-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2)}article .field--name-body{margin-bottom:50px;margin-left:auto;margin-right:auto;max-width:700px}article ol,article ul{margin-top:20px}article ol li,article ul li{margin-bottom:20px}article ol li ol,article ol li ul,article ul li ol,article ul li ul{margin-bottom:40px}article img{display:block;max-width:100%;height:auto;margin:30px auto;clear:both;border-radius:4px}article a img{border:1px solid #999}article a:focus img,article a:hover img{border:1px solid #2e2f30;-webkit-box-shadow:0 3px 0 0 #999;box-shadow:0 3px 0 0 #999}article .field--name-field-image img{margin-top:0;margin-bottom:50px;border-bottom:10px solid #0094d4}article .field--name-field-fecha{float:left;padding:10px}article .field--name-field-categoria{float:left;color:#fff;background-color:#0094d4;padding:10px}article .field--name-field-categoria a{color:#fff}.feedback,main form{margin:0 auto;margin-bottom:50px;max-width:700px}.feedback .btn-primary,main form .btn-primary{padding:10px 16px;font-size:18px;line-height:1.3333333}.feedback{text-align:center}.feedback img{margin-top:-30px}.feedback h1{margin-top:-30px}.feedback p{width:70%;margin:0 auto;margin-top:20px;margin-bottom:30px}#edit-preview{display:none}main section{margin-top:35px;padding:0 10px}main section section{margin-top:0}@media (max-width:768px){main section{margin-top:0}}main{margin-top:30px;margin-bottom:50px;padding:0 20px;min-height:-webkit-calc(100vh - 474px);min-height:calc(100vh - 474px)}main a{text-decoration:underline}main a.btn{text-decoration:none}main h2{position:relative;margin-bottom:50px}main h2:after{background-color:#755293;content:"";display:block;height:5px;left:0;bottom:-15px;position:absolute;width:50px}main h3{color:#755293;padding-left:1.5em;background-image:url(../images/bullet.svg);background-repeat:no-repeat;background-position:0}.diagonal-header{height:160px;content:"";background:url(../images/pattern.png),#3b76ba;background:url(../images/pattern.png),-webkit-gradient(linear,left top,left bottom,from(#3b76ba),color-stop(130%,#7dd2d9));background:url(../images/pattern.png),-webkit-linear-gradient(top,#3b76ba 0,#7dd2d9 130%);background:url(../images/pattern.png),linear-gradient(to bottom,#3b76ba 0,#7dd2d9 130%);-webkit-transform:skewY(1.5deg);-ms-transform:skewY(1.5deg);transform:skewY(1.5deg);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left}@media (max-width:768px){.diagonal-header{height:130px}}table[role=presentation] img{margin:0}.admin .btn-header{float:right;margin-top:-80px}@media (max-width:768px){.admin .btn-header{float:none;margin-top:0;width:100%}}@media (min-width:768px){.admin .modal .btn{min-width:200px}}.admin .table td{font-weight:500}.admin .table thead th.sorting_desc,.admin th.sorting_asc{border-bottom-color:#0094d4}.admin .table tbody{font-size:.8em}.admin .table tbody tr{border-bottom:2px}.admin .table tbody td{vertical-align:middle}.admin .table tbody .nombreCuenta{font-weight:700}.admin .table tbody .direccionCuenta{font-size:.9em}.admin .table tbody .btn{padding:6px 12px}.admin .table tbody .revision{font-style:italic;font-size:.9em;line-height:3em}.admin table.dataTable thead :after{color:#0094d4}.admin .dataTables_info,.admin .pagination,.admin table.dataTable thead :after{font-size:.8em;opacity:none}.admin .pagination>li.active a{background:#0094d4;border-color:#0094d4}@media (max-width:768px){.admin .dataTables_wrapper:first-child .row{margin-top:20px}.admin .dataTables_wrapper:first-child .row div label{width:100%}}button.eliminar{color:#d9534f;font-size:.8em;background:0 0;border-color:#d9534f}button.eliminar:hover{color:#fff;background:#d9534f;border-color:#d9534f}button.block{color:#d9534f;background:0 0;border-color:#d9534f}button.block:hover{color:#fff;background:#d9534f;border-color:#d9534f}@media (max-width:1200px){button.block{float:none}}.userHeader .mailClass,.userHeader button,.userHeader h2{display:inline-block}.userHeader h2{margin:10px}.userHeader h2:after{display:none}.userHeader .mailClass{font-size:1.5em;color:#999}@media (max-width:992px){.userHeader .mailClass{display:none}}.userHeader a{padding:10px}.userHeader button{margin-top:10px}form.filtros{width:100%;margin-bottom:20px;max-width:100%;border-bottom:1px solid #eee;padding-bottom:20px}form.filtros input,form.filtros select{margin-right:20px}.warning .fas,.warning svg{color:#d9534f}.quiereCarga{font-weight:700}.confirmar .modal-footer{text-align:center}.userBlocked{border:1px solid #ccc!important;border-radius:10px;background-color:#ccc!important;padding:0 10px}.userBlocked .mailClass{font-size:1.5em;color:#fff}.blocked{background-color:#ccc!important}.table>tbody>tr.warning>td{background-color:#fbf3c8!important}span.mwei{font-style:italic;float:right}.alert ul li { list-style: none;} \ No newline at end of file diff --git a/frontend/templates/dapp/account_list.html b/frontend/templates/dapp/account_list.html index 3d43edfe0709517f4168b82ccfb54e8fac0d9288..279a575cf74b14de90b3ddfac51ccb80df81bb68 100644 --- a/frontend/templates/dapp/account_list.html +++ b/frontend/templates/dapp/account_list.html @@ -1,12 +1,3 @@ -<!-- -Copyright 2019 de la Dirección General de Sistemas Informáticos – SecretarÃa Legal y Técnica - Nación. - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ ---> {% extends 'header.html' %} {% load i18n %} {% load static %} @@ -36,12 +27,14 @@ You should have received a copy of the GNU General Public License along with thi <div> <div><h1 class="page-header">Cuentas</h1></div> <div> - <div style="margin-right: 266px;"> + <div {% if services %} style="margin-right: 266px;" {% endif %}> <a href="#" class="btn-default btn btn-lg btn-header" id="agregarNuevaCuenta" data-toggle="modal" data-target="#modalNuevaCuenta">+ Agregar nueva cuenta</a></li> </div> - <div> - <a href="#" class="btn-default btn btn-lg btn-header" id="agregarCuentaExistente" data-toggle="modal" data-target="#modalCuentaExistente">+ Agregar cuenta existente</a></li> - </div> + {% if services %} + <div> + <a href="#" class="btn-default btn btn-lg btn-header" id="agregarCuentaExistente" data-toggle="modal" data-target="#modalCuentaExistente">+ Agregar cuenta existente</a></li> + </div> + {% endif %} </div> </div> <div class="table-responsive"> @@ -73,21 +66,26 @@ You should have received a copy of the GNU General Public License along with thi {{ item.account.address }} </div> </td> - <td>{{ item.account.status.descripcion }}</td> + <td> + {% if item.status.id == 1 %} + {{ item.status.descripcion }} + {% else %} + {{ item.account.status.descripcion }} + {% endif %} + </td> <td>{{ item.account.balance }} <span class="mwei">Wei</span></td> <td>{{ item.account.tope }} <span class="mwei">Wei</span></td> <td> - {% if item.account.status.descripcion == 'Sin verificar' %} - <button type="button" id="btn-verificar" clave="{{ item.account.clave }}" id-account="{{ item.account.id }}" class="btn btn-primary" data-toggle="modal" data-target="#modalInstrucciones">Verificar mi cuenta</button> - {% else %} - {% if item.account.status.descripcion == 'Satisfecho' or item.account.status.descripcion == 'Lista para gestion' %} - <button type="submit" class="btn btn-primary">Quiero más carga</button> + {% if item.status.id == 2 %} + {% if item.account.status.descripcion == 'Sin verificar' %} + <button type="button" id="btn-verificar" clave="{{ item.account.clave }}" id-account="{{ item.account.id }}" class="btn btn-primary" data-toggle="modal" data-target="#modalInstrucciones">Verificar mi cuenta</button> + {% else %} + {% if item.account.status.descripcion == 'Satisfecho' or item.account.status.descripcion == 'Lista para gestion' %} + <button type="submit" class="btn btn-primary">Quiero más carga</button> + {% endif %} {% endif %} {% endif %} - <!-- - Comentado a pedido 18/12/2018 18:30 hs - pkumagae - <button type="button" id="{{ item.account.id }}" class="btn btn-default pull-right" data-toggle="modal" data-target="#modalEditarCuenta">Editar</button> - --> + <button type="button" id="{{ item.account.id }}" customuser-account-id="{{ item.id }}" class="btn btn-default pull-right" data-toggle="modal" data-target="#modalEditarCuenta">Editar</button> </td> </form> </tr> @@ -106,7 +104,6 @@ You should have received a copy of the GNU General Public License along with thi <div class="modal" id="modalInstrucciones" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg modal-content" role="document"> - <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h2 class="modal-title">Instrucciones para verificar mi cuenta</h2> @@ -132,7 +129,7 @@ You should have received a copy of the GNU General Public License along with thi </div> <div class="modal-body"> <a href="#" class="btn-default btn btn-lg btn-header" id="agregarNuevaCuenta" data-toggle="modal" data-target="#modalNuevaCuenta">+ Agregar nueva cuenta</a> - <a href="#" class="btn-default btn btn-lg btn-header" id="agregarNuevaCuenta" data-toggle="modal" data-target="#modalCuentaExistente">+ Agregar cuenta existente</a> + <a href="#" class="btn-default btn btn-lg btn-header" id="agregarCuentaExistente" data-toggle="modal" data-target="#modalCuentaExistente">+ Agregar cuenta existente</a> </div> <div class="modal-footer"> <button type="button" class="btn btn-default btn-lg" data-dismiss="modal">Cancelar</button> @@ -199,7 +196,7 @@ You should have received a copy of the GNU General Public License along with thi <div class="form-group form-group-lg"> <label for="institucion" class="form-required">Servicio </label> <select class="form-control" id="service" name="service"> - <option>Seleccione</option> + <option value="">Seleccione</option> {% for service in services %} <option value="{{ service.id }}">{{ service.name }}</option> {% endfor %} @@ -235,15 +232,15 @@ You should have received a copy of the GNU General Public License along with thi <h2 class="modal-title">Editar cuenta</h2> </div> <div class="modal-body"> - <div class="alert alert-danger" role="alert"> - <p>Comprobá los siguientes errores del formulario:</p> - <ul></ul> - </div> - <div class="form-group form-group-lg"> - <label for="direccionCuenta-edit">Dirección</label> - <a role="button" target="_blank" data-container="body" data-toggle="popover" data-placement="right" data-content="Para saber tu dirección debés tener instalado el núcleo de BFA. Visitá nuestro <a href='https://gitlab.bfa.ar/' target='_blank'>GitLab</a> para saber cómo instalar el núcleo y obtenerla."><i class="far fa-question-circle" aria-hidden="true"></i><span class="sr-only">Más información</span></a> - <input class="form-control" type="text" id="direccionCuenta-edit" name="direccionCuenta-edit" value="-" size="60" placeholder="0x + 40 caractéres hexadecimales" maxlength="42" required="required" aria-required="true" readonly disabled> - </div> + <div class="alert alert-danger" role="alert"> + <p>Comprobá los siguientes errores del formulario:</p> + <ul></ul> + </div> + <div class="form-group form-group-lg"> + <label for="direccionCuenta-edit">Dirección</label> + <a role="button" target="_blank" data-container="body" data-toggle="popover" data-placement="right" data-content="Para saber tu dirección debés tener instalado el núcleo de BFA. Visitá nuestro <a href='https://gitlab.bfa.ar/' target='_blank'>GitLab</a> para saber cómo instalar el núcleo y obtenerla."><i class="far fa-question-circle" aria-hidden="true"></i><span class="sr-only">Más información</span></a> + <input class="form-control" type="text" id="direccionCuenta-edit" name="direccionCuenta-edit" value="-" size="60" placeholder="0x + 40 caractéres hexadecimales" maxlength="42" required="required" aria-required="true" readonly disabled> + </div> </div> <div class="modal-footer"> <form id="form-delete-account" method="post"> @@ -259,37 +256,6 @@ You should have received a copy of the GNU General Public License along with thi </div> - <div class="modal fade" id="modalEditarCuentaBloqueada" tabindex="-1" role="dialog"> - <div class="modal-dialog modal-lg" role="document"> - <form class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h2 class="modal-title">Editar cuenta</h2> - </div> - <div class="modal-body"> - <div class="alert alert-danger" role="alert"> - <p>Comprobá los siguientes errores del formulario:</p> - <ul></ul> - </div> - <div class="form-group form-group-lg"> - <label for="nombreCuenta-blocked" class="form-required">Nombre de la cuenta (alias)</label> - <input class="form-control" type="text" id="nombreCuenta-blocked" name="nombreCuenta-blocked" value="Nombre cuenta #1" size="60" maxlength="255" - required="required" aria-required="true" disabled> - </div> - <div class="form-group form-group-lg"> - <label for="direccionCuenta-blocked" class="form-required">Dirección </label> - <a role="button" target="_blank" data-container="body" data-toggle="popover" data-placement="right" data-content="Para saber tu dirección debés tener instalado el núcleo de BFA. Visitá nuestro <a href='https://gitlab.bfa.ar/' target='_blank'>GitLab</a> para saber cómo instalar el núcleo y obtenerla."><i class="far fa-question-circle" aria-hidden="true"></i><span class="sr-only">Más información</span></a> - <input class="form-control" type="text" id="direccionCuenta-blocked" name="direccionCuenta-blocked" value="0x6546546542desf34234652346524232ase32" size="60" placeholder="0x + 40 caractéres hexadecimales" maxlength="42" required="required" aria-required="true" disabled> - </div> - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default eliminar pull-left" data-dismiss="modal">Borrar cuenta</button> - <button type="button" class="btn btn-default btn-lg" data-dismiss="modal">Cancelar</button> - <!-- <button type="submit" id="agregar" class="btn btn-primary btn-lg">Guardar cambios</button> --> - </div> - </form> - </div> - </div> {% include 'footer.html' %} <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js"></script> @@ -435,14 +401,11 @@ You should have received a copy of the GNU General Public License along with thi $('#modalEditarCuenta').on('shown.bs.modal', function(e) { - var address_id = $(e.relatedTarget).attr('id'); + $('#direccionCuenta-edit').val($('#address-'+$(e.relatedTarget).attr('id')).val()); - $('#direccionCuenta-edit').val($('#address-'+address_id).val()); + $('#delete-account-id').val($(e.relatedTarget).attr('id')); - - $('#delete-account-id').val(address_id); - - $('#form-delete-account').attr('action', '/accounts/delete/'+address_id+'/'); + $('#form-delete-account').attr('action', '/accounts/delete/'+$(e.relatedTarget).attr('customuser-account-id')+'/'); }); $('#modalCuentaExistente').on('shown.bs.modal', function(){ @@ -453,17 +416,11 @@ You should have received a copy of the GNU General Public License along with thi $('#modalInstrucciones').on('shown.bs.modal', function(e) { - var button = e.relatedTarget; - - var account_id = $(button).attr('id-account'); - - $('#label-cuenta').html($('#address-'+account_id).val()); - $('#label-clave').html($(button).attr('clave')); + $('#label-cuenta').html($('#address-'+$(e.relatedTarget).attr('id-account')).val()); + $('#label-clave').html($(e.relatedTarget).attr('clave')); $('#label-contract-address').html($('#distillery_address').val()); }); - </script> - {% endblock %} \ No newline at end of file diff --git a/frontend/templates/django_registration/activation_email_body.html b/frontend/templates/django_registration/activation_email_body.html index 7fda46a61c41ad2ef60c26c676364ee3caa712c3..e689adc0f39c89d05a04c8ed81eb67aeaa5d5e47 100644 --- a/frontend/templates/django_registration/activation_email_body.html +++ b/frontend/templates/django_registration/activation_email_body.html @@ -170,8 +170,7 @@ <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="400" style="margin: auto;" class="email-container"> <tr> <td style="padding: 30px; text-align: center; border-bottom: #DDD 1px solid" bgcolor="#ffffff" width="100px"> - <a href="https://bfa.ar"><img src="data:image/png;base64,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 -" width="139" height="100" alt="NIC Argentina" border="0" style="background: #dddddd; color: #555555;"></a> + <a href="https://bfa.ar"><img src="https://bfa.ar/themes/bfa/logo.svg" width="139" height="100" alt="NIC Argentina" border="0" style="background: #ffffff; color: #555555;"></a> </td> </tr> </table> diff --git a/frontend/templates/django_registration/admin_email_subject.txt b/frontend/templates/django_registration/admin_email_subject.txt index a84e6d3141f8cd517d96051fbc1d652b869a5e66..ed42ca577526193093229a67d8002708ce6eaf87 100644 --- a/frontend/templates/django_registration/admin_email_subject.txt +++ b/frontend/templates/django_registration/admin_email_subject.txt @@ -1,10 +1 @@ -{# -Copyright 2019 de la Dirección General de Sistemas Informáticos – SecretarÃa Legal y Técnica - Nación. - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ -#} Poppins | Nuevo usuario registrado \ No newline at end of file diff --git a/frontend/templates/django_registration/approve_account_body.html b/frontend/templates/django_registration/approve_account_body.html new file mode 100644 index 0000000000000000000000000000000000000000..ee5ec856cadcfe8e12957a496d3dac581e9e21d3 --- /dev/null +++ b/frontend/templates/django_registration/approve_account_body.html @@ -0,0 +1,212 @@ +{% autoescape off %} + +<!DOCTYPE html> +<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="x-apple-disable-message-reformatting"> + <title>Blockchain Federal Argentina</title> + <style> + html, + body { + margin: 0 auto !important; + padding: 0 !important; + height: 100% !important; + width: 100% !important; + } + * { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + } + div[style*="margin: 16px 0"] { + margin: 0 !important; + } + table, + td { + mso-table-lspace: 0pt !important; + mso-table-rspace: 0pt !important; + } + table { + border-spacing: 0 !important; + border-collapse: collapse !important; + table-layout: fixed !important; + margin: 0 auto !important; + } + table table table { + table-layout: auto; + } + img { + -ms-interpolation-mode:bicubic; + } + *[x-apple-data-detectors], /* iOS */ + .x-gmail-data-detectors, /* Gmail */ + .x-gmail-data-detectors *, + .aBn { + border-bottom: 0 !important; + cursor: default !important; + color: inherit !important; + text-decoration: none !important; + font-size: inherit !important; + font-family: inherit !important; + line-height: inherit !important; + } + .a6S { + display: none !important; + opacity: 0.01 !important; + } + img.g-img + div { + display: none !important; + } + .button-link { + text-decoration: none !important; + } + @media only screen and (min-device-width: 320px) and (max-device-width: 374px) { + .email-container { + min-width: 320px !important; + } + } + @media only screen and (min-device-width: 375px) and (max-device-width: 413px) { + .email-container { + min-width: 375px !important; + } + } + @media only screen and (min-device-width: 414px) { + .email-container { + min-width: 414px !important; + } + } + + </style> + <!-- CSS Reset : END --> + + <!-- Progressive Enhancements : BEGIN --> + <style> + + /* What it does: Hover styles for buttons */ + .button-td, + .button-a { + transition: all 100ms ease-in; + } + .button-td:hover, + .button-a:hover, .button-a:visited { + color: #FFFFFF !important; + background: #0094d4 !important; + border-color: #0094d4 !important; + } + + /* Media Queries */ + @media screen and (max-width: 600px) { + + .email-container { + width: 100% !important; + margin: auto !important; + } + + /* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */ + .fluid { + max-width: 100% !important; + height: auto !important; + margin-left: auto !important; + margin-right: auto !important; + } + + /* What it does: Forces table cells into full-width rows. */ + .stack-column, + .stack-column-center { + display: block !important; + width: 100% !important; + max-width: 100% !important; + direction: ltr !important; + } + /* And center justify these ones. */ + .stack-column-center { + text-align: center !important; + } + + /* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */ + .center-on-narrow { + text-align: center !important; + display: block !important; + margin-left: auto !important; + margin-right: auto !important; + float: none !important; + } + table.center-on-narrow { + display: inline-block !important; + } + + /* What it does: Adjust typography on small screens to improve readability */ + .email-container p { + font-size: 17px !important; + } + } + + </style> + <!-- Progressive Enhancements : END --> + + <!-- What it does: Makes background images in 72ppi Outlook render at correct size. --> + <!--[if gte mso 9]> + <xml> + <o:OfficeDocumentSettings> + <o:AllowPNG/> + <o:PixelsPerInch>96</o:PixelsPerInch> + </o:OfficeDocumentSettings> + </xml> + <![endif]--> + +</head> +<body width="100%" style="margin: 0; mso-line-height-rule: exactly;"> + <center style="width: 100%; text-align: left;"> + + <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#EEEEEE"> + <tr> + <td> + + <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="400" style="margin: auto;" class="email-container"> + <tr> + <td style="padding: 30px; text-align: center; border-bottom: #DDD 1px solid" bgcolor="#ffffff" width="100px"> + <a href="https://bfa.ar"><img src="https://bfa.ar/themes/bfa/logo.svg" width="139" height="100" alt="NIC Argentina" border="0" style="background: #ffffff; color: #555555;"></a> + </td> + </tr> + </table> + <table role="presentation" cellspacing="0" cellpadding="" border="0" align="center" width="400" style="margin: auto;" class="email-container"> + <tr> + <td bgcolor="#ffffff" style="padding: 30px 30px; font-family: sans-serif; font-size: 16px; line-height: 190%; color: #555555; text-align: center;"> + <h1>Cuenta agregada</h1> + <p>El usuario {{ username }} ha agregado la cuenta {{ address }}. Para aprobar al usuario ingrese al siguiente link:</p> + </td> + </tr> + <tr> + <td bgcolor="#ffffff" style="margin-top: 15px; padding: 0 40px 40px; font-family: sans-serif; font-size: 15px; line-height: 140%; color: #555555; border-bottom: #DDD 1px solid"> + <!-- Button : BEGIN --> + <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: auto"> + <tr> + <td style="border-radius: 50px; background: #1C5D82; text-align: center;" class="button-td"> + <a href="{{ scheme }}://{{ site }}/accounts/approve/{{ account_id }}/" style="color:#ffffff; background: #0094d4; border: 15px solid #0094d4; font-family: sans-serif; font-size: 16px; line-height: 110%; text-align: center; text-decoration: none; display: block; border-radius: 50px; " class="button-a"> + <span style="color:#ffffff !important; font-weight: bold">Aprobar</span> + </a> + </td> + </tr> + </table> + </td> + </tr> + </table> + <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px; font-family: sans-serif; color: #333333; font-size: 14px; line-height: 140%;"> + <tr> + <td style="padding: 20px; width: 100%; font-family: sans-serif; font-size: 14px; line-height: 140%; text-align: center; color: #333333;" class="x-gmail-data-detectors"> + <span style="font-weight: bold !important;">Blockchain Federal Argentina</span><br> + <a href="https://bfa.ar" style=" color: #333333; text-decoration: underline !important;">https://bfa.ar</a> + </td> + </tr> + </table> + + </td> + </tr> + </table> + </center> +</body> +</html> + +{% endautoescape %} \ No newline at end of file diff --git a/frontend/templates/django_registration/approve_account_body.txt b/frontend/templates/django_registration/approve_account_body.txt deleted file mode 100644 index 850b4b4c9a04a3ea4afca6609aeca7acb5382447..0000000000000000000000000000000000000000 --- a/frontend/templates/django_registration/approve_account_body.txt +++ /dev/null @@ -1,17 +0,0 @@ -{# -Copyright 2019 de la Dirección General de Sistemas Informáticos – SecretarÃa Legal y Técnica - Nación. - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ -#} -{% autoescape off %} - -El usuario {{ username }} ha agregado la cuenta {{ address }}. Para aprobar al usuario ingrese al siguiente link: - -{{ scheme }}://{{ site }}/accounts/approve/{{ account_id }}/ - - -{% endautoescape %} \ No newline at end of file diff --git a/frontend/templates/django_registration/approve_account_subject.txt b/frontend/templates/django_registration/approve_account_subject.txt index 46a021c5e5b04e3ea39ea1d2295646dfb71464c7..58c8498216f5f1c5cb03f17bb74487df00b2f336 100644 --- a/frontend/templates/django_registration/approve_account_subject.txt +++ b/frontend/templates/django_registration/approve_account_subject.txt @@ -1,10 +1 @@ -{# -Copyright 2019 de la Dirección General de Sistemas Informáticos – SecretarÃa Legal y Técnica - Nación. - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ -#} Nueva cuenta BFA registrada \ No newline at end of file diff --git a/frontend/templates/registration/change_password.html b/frontend/templates/registration/change_password.html index 2fe7037b9aebc1e1002f02fbbfb41199d4b403d4..fd8ec76cdb0b794a86871fb605d1f5fd77457688 100644 --- a/frontend/templates/registration/change_password.html +++ b/frontend/templates/registration/change_password.html @@ -34,7 +34,7 @@ <div class="input-group"> <input class="form-control" type="password" id="new_password1" name="new_password1" size="60" maxlength="255" required="required" aria-required="true"> <div class="input-group-addon"> - <button id="toggle-password" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> + <button id="toggle-password1" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> </div> </div> </div> @@ -43,7 +43,7 @@ <div class="input-group"> <input class="form-control" type="password" id="new_password2" name="new_password2" size="60" maxlength="255" required="required" aria-required="true"> <div class="input-group-addon"> - <button id="toggle-newPassword" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> + <button id="toggle-password2" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> </div> </div> </div> @@ -99,5 +99,36 @@ } }); + + $("#toggle-password1").on("click",function(a){ + + a.preventDefault(); + + if("text"==$("#new_password1").attr("type")){ + $("#new_password1").attr("type","password") + $("#toggle-password1 .toggle-icon").removeClass("fa-eye-slash"); + $("#toggle-password1 .toggle-icon").addClass("fa-eye"); + }else{ + $("#new_password1").attr("type","text") + $("#toggle-password1 .toggle-icon").addClass("fa-eye-slash"); + $("#toggle-password1 .toggle-icon").removeClass("fa-eye"); + } + }); + + $("#toggle-password2").on("click",function(a){ + + a.preventDefault(); + + if("text"==$("#new_password2").attr("type")){ + $("#new_password2").attr("type","password") + $("#toggle-password2 .toggle-icon").removeClass("fa-eye-slash"); + $("#toggle-password2 .toggle-icon").addClass("fa-eye"); + }else{ + $("#new_password2").attr("type","text") + $("#toggle-password2 .toggle-icon").addClass("fa-eye-slash"); + $("#toggle-password2 .toggle-icon").removeClass("fa-eye"); + } + }); + </script> {% endblock %} diff --git a/frontend/templates/registration/forgot_password_confirm.html b/frontend/templates/registration/forgot_password_confirm.html index 83fe82c90407a9fbf080a7c3f9f180da72f7a74f..37c61574cb8462ba2777ecd3f4376c277859e42c 100644 --- a/frontend/templates/registration/forgot_password_confirm.html +++ b/frontend/templates/registration/forgot_password_confirm.html @@ -32,18 +32,18 @@ <div class="form-group form-group-lg col-sm-12"> <label for="password" class="form-required">Nueva Contraseña</label> <div class="input-group"> - <input class="form-control" type="password" id="pwd" name="new_password1" size="60" maxlength="255" required="required" aria-required="true"> + <input class="form-control" type="password" id="new_password1" name="new_password1" size="60" maxlength="255" required="required" aria-required="true"> <div class="input-group-addon"> - <button id="toggle-password" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> + <button id="toggle-password1" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> </div> </div> </div> <div class="form-group form-group-lg col-sm-12"> <label for="newPassword" class="form-required">Nueva contraseña (Confirmación)</label> <div class="input-group"> - <input class="form-control" type="password" id="newPwd" name="new_password2" size="60" maxlength="255" required="required" aria-required="true"> + <input class="form-control" type="password" id="new_password2" name="new_password2" size="60" maxlength="255" required="required" aria-required="true"> <div class="input-group-addon"> - <button id="toggle-newPassword" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> + <button id="toggle-password2" class="toggle-button"><i class="fa fa-eye fa-lg toggle-icon"></i><span class="sr-only">Mostrar y ocultar contraseña</span></button> </div> </div> </div> @@ -58,7 +58,82 @@ </div> </main> + {% include 'footer.html' %} + <script> + + + + var container = $('div.alert'); + + $("form").validate({ + focusInvalid: false, + errorContainer: container, + errorLabelContainer: $("ul", container), + wrapper: 'li', + highlight: function(element) { + $(element).closest('.form-group').addClass('has-error'); + }, + unhighlight: function(element) { + $(element).closest('.form-group').removeClass('has-error'); + }, + messages: { + new_password1: { + required: "Ingresá una contraseña", + minlength: "La contraseña debe tener al menos 8 caracteres" + }, + new_password2: { + required: "Ingresá la confirmación de la contraseña", + minlength: "La confirmación de la contraseña debe tener al menos 8 caracteres", + equalTo: "Ingresá el mismo valor en la confirmación" + } + }, + rules:{ + new_password1: { + required: true, + minlength: 8, + maxlength: 40 + }, + new_password2: { + required: true, + equalTo: '#new_password1' + } + + } + }); + + + $("#toggle-password1").on("click",function(a){ + + a.preventDefault(); + + if("text"==$("#new_password1").attr("type")){ + $("#new_password1").attr("type","password") + $("#toggle-password1 .toggle-icon").removeClass("fa-eye-slash"); + $("#toggle-password1 .toggle-icon").addClass("fa-eye"); + }else{ + $("#new_password1").attr("type","text") + $("#toggle-password1 .toggle-icon").addClass("fa-eye-slash"); + $("#toggle-password1 .toggle-icon").removeClass("fa-eye"); + } + }); + + $("#toggle-password2").on("click",function(a){ + + a.preventDefault(); + + if("text"==$("#new_password2").attr("type")){ + $("#new_password2").attr("type","password") + $("#toggle-password2 .toggle-icon").removeClass("fa-eye-slash"); + $("#toggle-password2 .toggle-icon").addClass("fa-eye"); + }else{ + $("#new_password2").attr("type","text") + $("#toggle-password2 .toggle-icon").addClass("fa-eye-slash"); + $("#toggle-password2 .toggle-icon").removeClass("fa-eye"); + } + }); + + </script> </body> </html> diff --git a/frontend/templates/registration/forgot_password_email_body.html b/frontend/templates/registration/forgot_password_email_body.html index 0427285692852ac1a64352bce7f9e967edc4c864..13cf60892d4933346c9ca15c2beb1f2f545ac736 100644 --- a/frontend/templates/registration/forgot_password_email_body.html +++ b/frontend/templates/registration/forgot_password_email_body.html @@ -167,8 +167,7 @@ <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="400" style="margin: auto;" class="email-container"> <tr> <td style="padding: 30px; text-align: center; border-bottom: #DDD 1px solid" bgcolor="#ffffff" width="100px"> - <a href="https://bfa.ar"><img src="data:image/png;base64,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 -" width="139" height="100" alt="NIC Argentina" border="0" style="background: #dddddd; color: #555555;"></a> + <a href="https://bfa.ar"><img src="https://bfa.ar/themes/bfa/logo.svg" width="139" height="100" alt="NIC Argentina" border="0" style="background: #ffffff; color: #555555;"></a> </td> </tr> </table> diff --git a/frontend/templates/registration/login.html b/frontend/templates/registration/login.html index d055832414dfedf788fc7de5b1707ea038b326c8..0e2c022864c7a2c01a64cb130134d83141ad2553 100644 --- a/frontend/templates/registration/login.html +++ b/frontend/templates/registration/login.html @@ -36,7 +36,7 @@ <div class="alert alert-danger" role="alert"> - <p>El usuario y/o contraseña que ingresaste son inválidos. <a href="#">¿Olvidaste tu contraseña?</a></p> + <p>El usuario y/o contraseña que ingresaste son inválidos. <a href="/password_reset/">¿Olvidaste tu contraseña?</a></p> <ul></ul> </div> diff --git a/frontend/views.py b/frontend/views.py index c3468b46a95f6e6c208359b1e5c9e7134d265e51..0e070249e27042e1b32a8ff50dff369808afb6cb 100644 --- a/frontend/views.py +++ b/frontend/views.py @@ -52,6 +52,7 @@ class RegistrationView(RegistrationView): Handle POST requests: instantiate a form instance with the passed POST variables and then check if it's valid. """ + form = self.get_form() if form.is_valid(): @@ -126,7 +127,7 @@ class RegistrationView(RegistrationView): try: user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL, html_message=message) - except Exception: + except Exception as e: pass @@ -224,10 +225,11 @@ class CustomUserAccountCreateView(LoginRequiredMixin, CreateView): send_mail( render_to_string('django_registration/approve_account_subject.txt'), - render_to_string('django_registration/approve_account_body.txt', body_context), + render_to_string('django_registration/approve_account_body.html', body_context), settings.DEFAULT_FROM_EMAIL, list(account_users.values_list('email', flat=True)), fail_silently=False, + html_message=render_to_string('django_registration/approve_account_body.html', body_context) ) messages.success(request, (_('existing_account_added') % (account.address))) @@ -248,7 +250,54 @@ class AccountDeleteView(LoginRequiredMixin, DeleteView): model = CustomUserAccount success_url = '/accounts/list/' + def post(self, request, *args, **kwargs): + + try: + + with transaction.atomic(): + customuser_account = self.get_object() + custom_user = CustomUser.objects.get(user_id=request.user.id) + + if customuser_account.account.owner == custom_user: + + accounts = CustomUserAccount.objects.filter(account_id=customuser_account.account_id) + + if accounts.count() > 1: + + error_message = 'Los siguientes usuarios tienen vinculada la cuenta, deben desvincularla para poder ser borrada: <br/><ul>' + + for a in accounts: + if a.user.user.id != request.user.id: + error_message = error_message + '<li>' + a.user.user.username + ' - ' + a.user.user.email + '</li>' + + error_message = error_message + '</ul>' + + messages.error(request, error_message, extra_tags='danger') + else: + account = Account.objects.get(pk=customuser_account.account_id) + + account_address = customuser_account.account.address + + customuser_account.delete() + account.delete() + service = Service.objects.get(pk=account.service_id) + service.delete() + + messages.success(request, _('cuenta_borrada') % account_address) + else: + customuser_account.delete() + messages.success(request, _('cuenta_desvinculada') % customuser_account.account.address) + except Exception as e: + client.captureException() + messages.error(request, _('error_borrar_cuenta'), extra_tags='danger') + logger.error(str(e)) + + + return HttpResponseRedirect(self.success_url) + + +@login_required(login_url='/accounts/login/') def require_ether(request): try: petitorio = PetitorioEtherCuenta() @@ -278,6 +327,8 @@ class CaptchaLoginView(LoginView): form = self.get_form() if form.is_valid(): + return self.form_valid(form) + ''' Begin reCAPTCHA validation ''' recaptcha_response = request.POST.get('g-recaptcha-response') data = { @@ -299,6 +350,9 @@ class CaptchaLoginView(LoginView): @csrf_exempt def get_service_address(request): + if not request.POST['service']: + return JsonResponse({'status': 'success', 'address': ''}) + account = Account.objects.filter(service=Service.objects.get(pk=request.POST['service'])) return JsonResponse({'status':'success', 'address': account.values().first()['address']}) @@ -312,7 +366,6 @@ def approve_account(request, pk): return HttpResponseRedirect('/accounts/approved/') def account_approved(request): - return render(request, 'django_registration/account_approved.html') @@ -333,18 +386,23 @@ def update_user(request): return render(request, 'django_registration/update_user.html', context) else: - user.first_name = request.POST['first_name'] - user.last_name = request.POST['last_name'] - user.email = request.POST['email'] - user.save() + try: + with transaction.atomic(): - custom_user.cuit = request.POST['cuit'] - custom_user.organization = request.POST['organization'] - custom_user.rol = request.POST['rol'] - custom_user.section_id = request.POST['section'] - custom_user.save() + user.first_name = request.POST['first_name'] + user.last_name = request.POST['last_name'] + user.email = request.POST['email'] + user.save() - messages.success(request, _('user_updated')) + custom_user.cuit = request.POST['cuit'] + custom_user.organization = request.POST['organization'] + custom_user.rol = request.POST['rol'] + custom_user.section_id = request.POST['section'] + custom_user.save() + + messages.success(request, _('user_updated')) + except Exception: + messages.error(request, _('user_update_error'), extra_tags='danger') return HttpResponseRedirect('/mis_datos/') diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo index cdfd3daabd565290dd3fb5a9da395327559eff16..6acd14ee47a2649d2844080090aa7df67945e2c2 100644 Binary files a/locale/en/LC_MESSAGES/django.mo and b/locale/en/LC_MESSAGES/django.mo differ diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index f34a4d07d7ed790e090c6f52caa37a10116cefde..8074572a0b91d832945f32603153facf241726b2 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-18 15:06-0300\n" +"POT-Creation-Date: 2019-01-31 11:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -27,39 +27,39 @@ msgstr "" msgid "%(address)s is not a valid address" msgstr "" -#: frontend/forms.py:22 +#: frontend/forms.py:21 msgid "public" msgstr "" -#: frontend/forms.py:23 +#: frontend/forms.py:22 msgid "private" msgstr "" -#: frontend/forms.py:24 +#: frontend/forms.py:23 msgid "academic" msgstr "" -#: frontend/forms.py:25 +#: frontend/forms.py:24 msgid "person" msgstr "" -#: frontend/forms.py:28 +#: frontend/forms.py:27 msgid "first_name" msgstr "" -#: frontend/forms.py:29 +#: frontend/forms.py:28 msgid "last_name" msgstr "" -#: frontend/forms.py:31 +#: frontend/forms.py:30 msgid "email" msgstr "" -#: frontend/forms.py:38 +#: frontend/forms.py:37 msgid "ya_existe_usuario_email" msgstr "" -#: frontend/forms.py:41 +#: frontend/forms.py:40 msgid "ya_existe_usuario_username" msgstr "" @@ -86,16 +86,16 @@ msgstr "" msgid "cancelar" msgstr "" -#: frontend/templates/dapp/account_list.html:19 +#: frontend/templates/dapp/account_list.html:10 msgid "cuentas" msgstr "" -#: frontend/templates/dapp/account_list.html:95 -#: frontend/templates/dapp/account_list.html:100 +#: frontend/templates/dapp/account_list.html:93 +#: frontend/templates/dapp/account_list.html:98 msgid "no_se_encontraron_cuentas" msgstr "" -#: frontend/templates/dapp/account_list.html:215 +#: frontend/templates/dapp/account_list.html:212 msgid "no_se_encontraron_cuentas_existentes" msgstr "" @@ -143,32 +143,32 @@ msgstr "" msgid "password_reset_complete" msgstr "" -#: frontend/views.py:72 frontend/views.py:298 +#: frontend/views.py:72 frontend/views.py:344 msgid "invalid_captcha" msgstr "No reCAPTCHA" -#: frontend/views.py:99 +#: frontend/views.py:98 msgid "error_register" msgstr "" -#: frontend/views.py:177 +#: frontend/views.py:176 msgid "account_added" msgstr "" -#: frontend/views.py:179 +#: frontend/views.py:178 msgid "existing_account" msgstr "" -#: frontend/views.py:181 +#: frontend/views.py:180 msgid "address_not_valid" msgstr "" -#: frontend/views.py:184 frontend/views.py:186 frontend/views.py:189 +#: frontend/views.py:183 frontend/views.py:185 frontend/views.py:188 #: frontend/views.py:240 frontend/views.py:243 msgid "error_create_view" msgstr "" -#: frontend/views.py:184 +#: frontend/views.py:183 msgid "existing_service" msgstr "" @@ -180,18 +180,34 @@ msgstr "" msgid "user_already_has_account" msgstr "" -#: frontend/views.py:259 +#: frontend/views.py:286 +msgid "cuenta_borrada" +msgstr "" + +#: frontend/views.py:290 +msgid "cuenta_desvinculada" +msgstr "" + +#: frontend/views.py:293 +msgid "error_borrar_cuenta" +msgstr "" + +#: frontend/views.py:305 msgid "ether_solicitado" msgstr "" -#: frontend/views.py:262 +#: frontend/views.py:308 msgid "error_peticion_ether" msgstr "" -#: frontend/views.py:351 +#: frontend/views.py:403 msgid "user_updated" msgstr "" -#: frontend/views.py:365 +#: frontend/views.py:405 +msgid "user_update_error" +msgstr "" + +#: frontend/views.py:420 msgid "password_changed" msgstr "" diff --git a/locale/es/LC_MESSAGES/django.mo b/locale/es/LC_MESSAGES/django.mo index 6b614a627db8ceb5226669a2de9014e2c36a993b..50643e4f77afbbb39b333d814624535a3939c0d5 100644 Binary files a/locale/es/LC_MESSAGES/django.mo and b/locale/es/LC_MESSAGES/django.mo differ diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index a5ffff5f808afceeb7f8c0a4d8e6866cf8b61b18..3fe005f4a2f5bf26174bba8bfc12b2686490f1da 100644 --- a/locale/es/LC_MESSAGES/django.po +++ b/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-01-18 15:06-0300\n" +"POT-Creation-Date: 2019-01-31 11:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -27,39 +27,39 @@ msgstr "" msgid "%(address)s is not a valid address" msgstr "" -#: frontend/forms.py:22 +#: frontend/forms.py:21 msgid "public" msgstr "Público" -#: frontend/forms.py:23 +#: frontend/forms.py:22 msgid "private" msgstr "Privado" -#: frontend/forms.py:24 +#: frontend/forms.py:23 msgid "academic" msgstr "Académico" -#: frontend/forms.py:25 +#: frontend/forms.py:24 msgid "person" msgstr "Persona" -#: frontend/forms.py:28 +#: frontend/forms.py:27 msgid "first_name" msgstr "Nombre" -#: frontend/forms.py:29 +#: frontend/forms.py:28 msgid "last_name" msgstr "Apellido" -#: frontend/forms.py:31 +#: frontend/forms.py:30 msgid "email" msgstr "E-Mail" -#: frontend/forms.py:38 +#: frontend/forms.py:37 msgid "ya_existe_usuario_email" msgstr "Ya existe un registro con ese E-mail" -#: frontend/forms.py:41 +#: frontend/forms.py:40 msgid "ya_existe_usuario_username" msgstr "Ya existe un registro con ese usuario" @@ -86,16 +86,16 @@ msgstr "Agregar" msgid "cancelar" msgstr "Cancelar" -#: frontend/templates/dapp/account_list.html:19 +#: frontend/templates/dapp/account_list.html:10 msgid "cuentas" msgstr "Cuentas" -#: frontend/templates/dapp/account_list.html:95 -#: frontend/templates/dapp/account_list.html:100 +#: frontend/templates/dapp/account_list.html:93 +#: frontend/templates/dapp/account_list.html:98 msgid "no_se_encontraron_cuentas" msgstr "TodavÃa no tenés cuentas asociadas a tu usuario." -#: frontend/templates/dapp/account_list.html:215 +#: frontend/templates/dapp/account_list.html:212 msgid "no_se_encontraron_cuentas_existentes" msgstr "No se encontraron cuentas existentes para agregar" @@ -143,32 +143,32 @@ msgstr "¿Olvidaste tu contraseña?" msgid "password_reset_complete" msgstr "Tu contraseña ha sido cambiada" -#: frontend/views.py:72 frontend/views.py:298 +#: frontend/views.py:72 frontend/views.py:344 msgid "invalid_captcha" msgstr "Completá el captcha" -#: frontend/views.py:99 +#: frontend/views.py:98 msgid "error_register" msgstr "Ocurrió un error al realizar el registro" -#: frontend/views.py:177 +#: frontend/views.py:176 msgid "account_added" msgstr "Cuenta %s agregada" -#: frontend/views.py:179 +#: frontend/views.py:178 msgid "existing_account" msgstr "La cuenta %s ya se encuentra registrada" -#: frontend/views.py:181 +#: frontend/views.py:180 msgid "address_not_valid" msgstr "La dirección %s no es válida" -#: frontend/views.py:184 frontend/views.py:186 frontend/views.py:189 +#: frontend/views.py:183 frontend/views.py:185 frontend/views.py:188 #: frontend/views.py:240 frontend/views.py:243 msgid "error_create_view" msgstr "Ocurrió un error al intentar agregar la cuenta" -#: frontend/views.py:184 +#: frontend/views.py:183 msgid "existing_service" msgstr "Ya existe un servicio llamado %s" @@ -180,20 +180,36 @@ msgstr "La cuenta existente %s fue agregada" msgid "user_already_has_account" msgstr "La cuenta %s ya ha sido vinculada" -#: frontend/views.py:259 +#: frontend/views.py:286 +msgid "cuenta_borrada" +msgstr "La cuenta %s ha sido borrada" + +#: frontend/views.py:290 +msgid "cuenta_desvinculada" +msgstr "La cuenta %s ha sido desvinculada" + +#: frontend/views.py:293 +msgid "error_borrar_cuenta" +msgstr "Ocurrió un error al intentar borrar la cuenta" + +#: frontend/views.py:305 msgid "ether_solicitado" msgstr "" "Su solicitud de carga para la cuenta %s será evaluada por los " "administradores. Nos contactaremos a la brevedad." -#: frontend/views.py:262 +#: frontend/views.py:308 msgid "error_peticion_ether" msgstr "No se pudo realizar la petición" -#: frontend/views.py:351 +#: frontend/views.py:403 msgid "user_updated" msgstr "Usuario modificado" -#: frontend/views.py:365 +#: frontend/views.py:405 +msgid "user_update_error" +msgstr "Ocurrió un error al intentar modificar el usuario" + +#: frontend/views.py:420 msgid "password_changed" msgstr "Contraseña modificada. Por favor ingresá nuevamente" diff --git a/logica_cuentas/services.py b/logica_cuentas/services.py index a6f7792eff951e39aa5d2659779054e40c78d495..8855c2a78a351f78ec87d53b4c1e3e25de2db146 100644 --- a/logica_cuentas/services.py +++ b/logica_cuentas/services.py @@ -26,6 +26,7 @@ class AltaCuentaEthereum: tope_manager = TopeEsperado.objects verificador_cuenta = VerificacionCuenta() relacion_sin_verificar = RelacionUsuarioAccountStatus.objects.get_sin_verificar_relacion + relacion_verificada = RelacionUsuarioAccountStatus.objects.get_relacion_verificada def alta_cuenta_ethereum(self, address, institution, service, user, tope=0): if self.relacion_manager.cant_cuentas_sin_verificar_por_user(user) > 4: @@ -33,11 +34,11 @@ class AltaCuentaEthereum: with transaction.atomic(): self.account_manager.create(address=address, institution=institution, - service=service) + service=service, owner=user) account = self.account_manager.filter(address=address).first() self.tope_manager.create(valor=tope, account=account) clave = self.verificador_cuenta.iniciar_verificacion(account) - funcion = self.relacion_sin_verificar + funcion = self.relacion_verificada self.relacion_manager.create(user=user, account=account, status=funcion()) return account, clave