Commits

Martín Mulone  committed 787a102

Customize Users

  • Participants
  • Parent commits 2179024

Comments (0)

Files changed (11)

File controllers/default.py

         response.view = 'default/user_login.html'
     elif request.args(0) in  ['register']:
         response.view = 'default/user_register.html'
+    elif request.args(0) in  ['profile']:
+        response.view = 'default/user_profile.html'
+    elif request.args(0) in  ['request_reset_password']:
+        response.view = 'default/user_request_reset_password.html'
 
     return dict(form=auth())
 

File databases/storage.sqlite

Binary file modified.

File languages/es.py

 '(something like "it-it")': '(algo como "it-it")',
 'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
 'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
+'About': 'Acerca de',
 'about': 'acerca de',
-'About': 'Acerca de',
 'About application': 'Acerca de la aplicación',
 'Access Control': 'Access Control',
 'additional code for your application': 'código adicional para su aplicación',
 'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
 'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
 'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
+'Administrative interface': 'Interfaz administrativa',
 'Administrative Interface': 'Administrative Interface',
-'Administrative interface': 'Interfaz administrativa',
 'Administrator Password:': 'Contraseña del Administrador:',
 'Ajax Recipes': 'Ajax Recipes',
 'and rename it (required):': 'y renombrela (requerido):',
 'Deploy on Google App Engine': 'Instale en Google App Engine',
 'Deployment Recipes': 'Deployment Recipes',
 'Description': 'Descripción',
+'design': 'modificar',
 'DESIGN': 'DISEÑO',
-'design': 'modificar',
 'Design for': 'Diseño para',
 'Documentation': 'Documentación',
 "Don't know what to do?": "Don't know what to do?",
 'done!': 'listo!',
 'Download': 'Download',
 'E-mail': 'Correo electrónico',
+'edit': 'editar',
 'EDIT': 'EDITAR',
-'edit': 'editar',
 'Edit': 'Editar',
 'Edit application': 'Editar aplicación',
 'edit controller': 'editar controlador',
 'Edit current record': 'Edite el registro actual',
+'Edit Profile': 'Editar Perfil',
 'edit profile': 'editar perfil',
-'Edit Profile': 'Editar Perfil',
 'Edit This App': 'Edite esta App',
 'Editing file': 'Editando archivo',
 'Editing file "%s"': 'Editando archivo "%s"',
 'Email and SMS': 'Email and SMS',
 'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
 'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
+'errors': 'errores',
 'Errors': 'Errors',
-'errors': 'errores',
 'export as csv file': 'exportar como archivo CSV',
 'exposes': 'expone',
 'extends': 'extiende',
 'Introduction': 'Introduction',
 'Invalid action': 'Acción inválida',
 'Invalid email': 'Correo inválido',
+'invalid expression': 'invalid expression',
 'invalid password': 'contraseña inválida',
 'Invalid Query': 'Consulta inválida',
 'invalid request': 'solicitud inválida',
 'Log in': 'Log in',
 'Logged in': 'Logged in',
 'Logged out': 'Logged out',
+'Login': 'Inicio de sesión',
 'login': 'inicio de sesión',
-'Login': 'Inicio de sesión',
 'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
 'logout': 'fin de sesión',
 'Logout': 'Fin de sesión',
 'Main Menu': 'Menú principal',
 'Menu Model': 'Modelo "menu"',
 'merge': 'combinar',
+'Models': 'Modelos',
 'models': 'modelos',
-'Models': 'Modelos',
 'Modules': 'Módulos',
 'modules': 'módulos',
 'My Sites': 'My Sites',
 'pack all': 'empaquetar todo',
 'pack compiled': 'empaquete compiladas',
 'Password': 'Contraseña',
+'Password again': 'Password again',
 "Password fields don't match": "Password fields don't match",
 'Peeking at file': 'Visualizando archivo',
 'please input your password again': 'please input your password again',
 'record does not exist': 'el registro no existe',
 'record id': 'id de registro',
 'Record ID': 'ID de Registro',
+'register': 'registrese',
 'Register': 'Registrese',
-'register': 'registrese',
 'Registration identifier': 'Registration identifier',
 'Registration key': 'Contraseña de Registro',
 'Registration successful': 'Registration successful',
 'Reset Password key': 'Reset Password key',
 'Resolve Conflict file': 'archivo Resolución de Conflicto',
 'restore': 'restaurar',
+'Retrieve username': 'Retrieve username',
 'revert': 'revertir',
 'Role': 'Rol',
 'Rows in table': 'Filas en la tabla',
 'static': 'estáticos',
 'Static files': 'Archivos estáticos',
 'Stylesheet': 'Hoja de estilo',
+'Submit': 'Submit',
 'submit': 'submit',
-'Submit': 'Submit',
 'Support': 'Support',
 'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
 'table': 'tabla',
 'User %(id)s Password reset': 'User %(id)s Password reset',
 'User %(id)s Profile updated': 'User %(id)s Profile updated',
 'User %(id)s Registered': 'User %(id)s Registered',
+'User %(id)s Username retrieved': 'User %(id)s Username retrieved',
 'User ID': 'ID de Usuario',
 'Username': 'Username',
+'value already in database or empty': 'value already in database or empty',
 'Verify Password': 'Verify Password',
 'versioning': 'versiones',
 'Videos': 'Videos',
+'View': 'Vista',
 'view': 'vista',
-'View': 'Vista',
 'Views': 'Vistas',
 'views': 'vistas',
 'web2py is up to date': 'web2py está actualizado',

File static/css/layout.css

 .container {
     /*width: 820px;*/ /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */
 }
-
+.content {padding-top: 28px; }
 /* Page header tweaks */
 .page-header {
     background-color: #f5f5f5;
     padding: 10px 10px 5px;
-    margin-top: 40px;
+    /*margin-top: 40px;*/
     border-color: #d5d5d5;
     border-width: 0 0 1px; /* drop the border on the fixed edges */
     -webkit-border-radius: 0;

File static/images/error.png

Added
New image

File views/default/user.html

     {{if not 'request_reset_password' in auth.settings.actions_disabled:}}
     <br/><a href="{{=URL(r=request,args='request_reset_password')}}">{{=T('Lost password')}}</a>
     {{pass}}
-    {{if not 'retrieve_username' in auth.settings.actions_disabled:}}
-    <br/><a href="{{=URL(r=request,args='retrieve_username')}}">{{=T('Forgot username?')}}</a>
-    {{pass}}
     {{pass}}
 </div>
 

File views/default/user_login.html

     {{if not 'request_reset_password' in auth.settings.actions_disabled:}}
         <br/><a href="{{=URL(r=request,args='request_reset_password')}}">{{=T('Lost password')}}</a>
     {{pass}}
-    {{if not 'retrieve_username' in auth.settings.actions_disabled:}}
-        <br/><a href="{{=URL(r=request,args='retrieve_username')}}">{{=T('Forgot username?')}}</a>
-    {{pass}}
-
 
 
 

File views/default/user_profile.html

+{{extend 'layout.html'}}
+
+<style type="text/css">
+    legend {margin-bottom: 4px !important;}
+    .control-group {
+        margin-bottom: 4px !important;
+    }
+</style>
+
+
+<div class="page-header">
+    <a href="#">{{=response.title}}</a> / <a href="#">{{=T( request.args(0).replace('_',' ').capitalize() )}}</a>
+</div>
+
+
+<div class="row">
+    <div class="span6 form-horizontal">
+        {{=form.custom.begin}}
+        <fieldset>
+            <legend>{{=T( request.args(0).replace('_',' ').capitalize() )}}</legend>
+
+            <div class="control-group">
+                <label class="control-label">{{=form.custom.label.first_name}}</label>
+                <div class="controls">{{=form.custom.widget.first_name}}</div>
+            </div>
+
+            <div class="control-group">
+                <label class="control-label">{{=form.custom.label.last_name}}</label>
+                <div class="controls">{{=form.custom.widget.last_name}}</div>
+            </div>
+
+            <div class="control-group">
+                <label class="control-label">{{=form.custom.label.username}}</label>
+                <div class="controls">{{=form.custom.widget.username}}</div>
+            </div>
+
+            <div class="control-group">
+                <label class="control-label">{{=form.custom.label.email}}</label>
+                <div class="controls">{{=form.custom.widget.email}}</div>
+            </div>
+
+            <div class="form-actions">
+                {{form.custom.submit['_class']='btn btn-success'
+                =form.custom.submit}}
+                <button class="btn">Cancelar</button>
+            </div>
+
+        </fieldset>
+        {{=form.custom.end}}
+    </div>
+
+    <div class="span6">
+        <img src="{{=URL('static', 'images/users.png')}}" />
+    </div>
+
+</div>
+
+
+
+
+<script language="javascript">
+<!--
+ jQuery("#web2py_user_form input:visible:enabled:first").focus();
+//-->
+</script>

File views/default/user_register.html

             </div>
 
             <div class="control-group">
-                <label class="control-label">{{=form.custom.label.password_two}}</label>
+                <label class="control-label">{{=T('Password again')}}</label>
                 <div class="controls">{{=form.custom.widget.password_two}}</div>
             </div>
 

File views/default/user_request_reset_password.html

+{{extend 'layout.html'}}
+
+<style type="text/css">
+    legend {margin-bottom: 4px !important;}
+    .control-group {
+        margin-bottom: 4px !important;
+    }
+</style>
+
+
+<div class="page-header">
+    <a href="#">{{=response.title}}</a> / <a href="#">{{=T( request.args(0).replace('_',' ').capitalize() )}}</a>
+</div>
+
+
+<div class="row">
+    <div class="span6 form-horizontal">
+        {{=form.custom.begin}}
+        <fieldset>
+            <legend>{{=T( request.args(0).replace('_',' ').capitalize() )}}</legend>
+
+
+            <div class="control-group">
+                <label class="control-label">{{=form.custom.label.email}}</label>
+                <div class="controls">{{=form.custom.widget.email}}</div>
+            </div>
+
+            <div class="form-actions">
+                {{form.custom.submit['_class']='btn btn-success'
+                =form.custom.submit}}
+                <button class="btn">Cancelar</button>
+            </div>
+
+        </fieldset>
+        {{=form.custom.end}}
+    </div>
+
+    <div class="span6">
+        <img src="{{=URL('static', 'images/users.png')}}" />
+    </div>
+
+</div>
+
+<script language="javascript">
+<!--
+ jQuery("#web2py_user_form input:visible:enabled:first").focus();
+//-->
+</script>

File views/layout.html

 
 <div class="container">
 
-
-    <div class="flash alert alert-info">{{=response.flash or ''}}</div>
-    {{include}} <!-- Here render the views -->
-
-
-<footer>
-  <div style="float: left;">&copy; Company 2012</div>
-        <div style="float: right;">Powered by <a href="http://web2py.com">Web2py</a> and <a href="http://twitter.github.com/bootstrap/index.html">Twitter Bootstrap</a>. Icons from <a href="http://glyphicons.com">Glyphicons Free</a></div>
-    </footer>
+    <div class="content">
+        <div class="flash alert alert-info">{{=response.flash or ''}}</div>
+        {{include}} <!-- Here render the views -->
+        <footer>
+            <div style="float: left;">&copy; Company 2012</div>
+            <div style="float: right;">Powered by <a href="http://web2py.com">Web2py</a> and <a href="http://twitter.github.com/bootstrap/index.html">Twitter Bootstrap</a>. Icons from <a href="http://glyphicons.com">Glyphicons Free</a></div>
+        </footer>
+    </div>
 
 </div> <!-- /container -->