Don't render placeholder markup unless necessary
Rather than always rendering divs for the key and placeholder, render the placeholder only if the key is missing. // FREEBIE
This commit is contained in:
parent
6c7f2cf0fc
commit
05681ce35b
4 changed files with 15 additions and 19 deletions
|
@ -25,18 +25,14 @@
|
|||
return octets;
|
||||
},
|
||||
render_attributes: function() {
|
||||
var attributes = {
|
||||
return {
|
||||
verifyIdentity: i18n('verifyIdentity'),
|
||||
yourIdentity: i18n('yourIdentity'),
|
||||
theirIdentity: i18n('theirIdentity'),
|
||||
their_key_unknown: i18n('theirIdentityUnknown'),
|
||||
your_key: this.splitKey(this.model.your_key),
|
||||
their_key: this.splitKey(this.model.their_key)
|
||||
};
|
||||
if(this.model.their_key) {
|
||||
attributes.their_key = this.splitKey(this.model.their_key);
|
||||
} else {
|
||||
attributes.their_key_unknown = i18n('theirIdentityUnknown');
|
||||
}
|
||||
return attributes;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue