From 5a52eac90ea7511f8a431c98e139d2e7115b53ef Mon Sep 17 00:00:00 2001 From: Andrew Rosborough Date: Sun, 14 Apr 2013 13:44:34 -0400 Subject: [PATCH] Remove email class from admin.js as it is added by default. Fix email tag rendering in Form.js --- lib/core/Form.js | 6 ++---- modules/core/admin/admin.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/core/Form.js b/lib/core/Form.js index 412d5a2f8..23a2ac0f6 100644 --- a/lib/core/Form.js +++ b/lib/core/Form.js @@ -633,11 +633,9 @@ me.elementTypes.json = { me.elementTypes.email = { render:function (field, value) { - //var _field = copyProperties(field, {}); - //_field.type = 'text'; field.type = 'text'; field.cls = (field.cls ? field.cls + ' ' : '') + 'email'; - me.elementTypes.textarea.render(field, value); + return me.elementTypes.text.render(field, value); } }; @@ -1349,4 +1347,4 @@ function processFieldValue(field, value, next) { /** * Export an instance of our form object */ -module.exports = f; \ No newline at end of file +module.exports = f; diff --git a/modules/core/admin/admin.js b/modules/core/admin/admin.js index 17c59ec34..eade6f3bf 100644 --- a/modules/core/admin/admin.js +++ b/modules/core/admin/admin.js @@ -362,7 +362,7 @@ function installUser(req, res, next) { fields:[ {label:'Username', name:'user[username]', cls:'username', type:'text', required:true, 'placeholder':"Your desired username"}, {label:'Full Name', name:'user[fullname]', type:'text'}, - {label:'Email', name:'user[email]', cls:'email', type:'email', required:true, 'placeholder':"someone@gmail.com"}, + {label:'Email', name:'user[email]', type:'email', required:true, 'placeholder':"someone@gmail.com"}, {label:'Language', name:'user[language]', type:'select', options:req.languages, required:true}, // TODO : Select based on available {label:'Password', name:'user[password]', cls:'password', type:'password', required:true, placeholder:"Password"},