1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2024-11-14 18:29:02 +01:00

Added username/password fields to newly created cards

This commit is contained in:
Giulio Cesare Solaroli 2015-08-10 16:38:42 +02:00
parent cb949d791f
commit 58e1cdfcf9
2 changed files with 6 additions and 2 deletions

View File

@ -392,7 +392,7 @@ console.log("DROP"); //, anEvent);
]),
React.DOM.div({'className':'fieldValue'}, [
(ref == this.state['passwordGeneratorFieldReference']) ? Clipperz.PM.UI.Components.Cards.PasswordGenerator({'field':aField, 'setValueCallback':this.setValueFromPasswordGenerator(field, fieldValueRef), 'closeClallback':this.closePasswordGenerator}) : null,
Clipperz.PM.UI.Components.Cards.TextArea({'className':Clipperz.PM.UI.Components.classNames(cardFieldValueClasses), 'onChange':this.handleChange(field, 'setValue'), 'onKeyDown':this.handleKeyDown(field), 'defaultValue':aField['value'], 'placeholder': "value", 'ref':fieldValueRef}),
Clipperz.PM.UI.Components.Cards.TextArea({'className':Clipperz.PM.UI.Components.classNames(cardFieldValueClasses), 'onChange':this.handleChange(field, 'setValue'), 'onKeyDown':this.handleKeyDown(field), 'defaultValue':aField['value'], 'placeholder':(aField['actionType'].toLowerCase() == 'password')?'':"value", 'ref':fieldValueRef}),
])
]),
React.DOM.div({'className':'fieldAction'}, [

View File

@ -1533,7 +1533,11 @@ console.log("THE BROWSER IS OFFLINE");
newRecord = aValue;
return newRecord;
},
MochiKit.Base.methodcaller('addField', {'label':"", 'value':"", 'isHidden':false}),
// MochiKit.Base.methodcaller('addField', {'label':"", 'value':"", 'isHidden':false}),
// function () { return newRecord; },
MochiKit.Base.methodcaller('addField', {'label':"username", 'value':"", 'hidden':false}),
function () { return newRecord; },
MochiKit.Base.methodcaller('addField', {'label':"password", 'value':"", 'hidden':true}),
function () { return newRecord; },
MochiKit.Base.methodcaller('reference'),
MochiKit.Base.method(this, 'refreshUI'),