Skip to content

Commit

Permalink
Remove email class from admin.js as it is added by default. Fix email…
Browse files Browse the repository at this point in the history
… tag rendering in Form.js
  • Loading branch information
arosboro committed Apr 14, 2013
1 parent 09f06e7 commit 5a52eac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lib/core/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down Expand Up @@ -1349,4 +1347,4 @@ function processFieldValue(field, value, next) {
/**
* Export an instance of our form object
*/
module.exports = f;
module.exports = f;
2 changes: 1 addition & 1 deletion modules/core/admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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':"[email protected]"},
{label:'Email', name:'user[email]', type:'email', required:true, 'placeholder':"[email protected]"},
{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"},
Expand Down

0 comments on commit 5a52eac

Please sign in to comment.