mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 21:53:00 +08:00
23 lines
475 B
JavaScript
23 lines
475 B
JavaScript
/**
|
|
This is a custom text field that allows i18n placeholders
|
|
|
|
@class TextField
|
|
@extends Ember.TextField
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.TextField = Ember.TextField.extend({
|
|
attributeBindings: ['autocorrect', 'autocapitalize', 'autofocus'],
|
|
|
|
placeholder: (function() {
|
|
if( this.get('placeholderKey') ) {
|
|
return Em.String.i18n(this.get('placeholderKey'));
|
|
} else {
|
|
return '';
|
|
}
|
|
}).property('placeholderKey')
|
|
|
|
});
|
|
|
|
|