mirror of
https://github.com/discourse/discourse.git
synced 2025-05-01 16:14:37 +08:00
20 lines
454 B
JavaScript
20 lines
454 B
JavaScript
/**
|
|
This is a custom text field that allows i18n placeholders
|
|
|
|
@class TextField
|
|
@extends Ember.TextField
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
export default Ember.TextField.extend({
|
|
attributeBindings: ['autocorrect', 'autocapitalize', 'autofocus'],
|
|
|
|
placeholder: function() {
|
|
if (this.get('placeholderKey')) {
|
|
return I18n.t(this.get('placeholderKey'));
|
|
} else {
|
|
return '';
|
|
}
|
|
}.property('placeholderKey')
|
|
});
|