define(function(require) {
- /* globals gettext */
'use strict';
var _ = require('libs/underscore'),
},
show: function() {
this.setElement(this.template(_.extend({
- executeButtonText: gettext('Submit'),
- cancelButtonText: gettext('Cancel')
+ executeButtonText: null,
+ cancelButtonText: null
}, this.options)));
var body = this.$('.modal-body');
throw new Error('Field type {type} not recognized.'.replace('{type}', field.type));
}
body.append(
- _.template(template)(_.extend({description: ''}, field))
+ _.template(template)(_.extend({description: '', initialValue: ''}, field))
);
});
this.$el.modal({backdrop: 'static'});
this.$el.modal('show');
- this.$('textarea').focus();
+ this.$('textarea, input').first().focus();
},
onExecute: function(e) {
e.preventDefault();