webui: placeholder attribute support in textbox and textarea

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
Petr Vobornik 2014-05-22 14:47:44 +02:00
parent f9adc5a5f3
commit 6e7d4ad468

View File

@ -268,6 +268,12 @@ IPA.input_widget = function(spec) {
var that = IPA.widget(spec);
/**
* Placeholder
* @property {string}
*/
that.placeholder = text.get(spec.placeholder);
/**
* Widget's width.
* @deprecated
@ -709,6 +715,7 @@ IPA.text_widget = function(spec) {
'class': 'form-control',
size: that.size,
title: that.tooltip,
placeholder: that.placeholder,
keyup: function() {
that.on_value_changed();
}
@ -1975,6 +1982,7 @@ IPA.textarea_widget = function (spec) {
'class': 'form-control',
readOnly: !!that.read_only,
title: that.tooltip,
placeholder: that.placeholder,
keyup: function() {
that.on_value_changed();
}