summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e1acb38)
For a button to show up, its label must be set explicitly.
dialog = Dialog.create({
fields: documentSaveForm.fields,
title: gettext('Save Document'),
dialog = Dialog.create({
fields: documentSaveForm.fields,
title: gettext('Save Document'),
- executeButtonText: gettext('Save')
+ executeButtonText: gettext('Save'),
+ cancelButtonText: gettext('Cancel')
});
dialog.on('execute', function(event) {
});
dialog.on('execute', function(event) {
dialog = Dialog.create({
fields: documentRestoreForm.fields,
title: gettext('Restore Version'),
dialog = Dialog.create({
fields: documentRestoreForm.fields,
title: gettext('Restore Version'),
- executeButtonText: gettext('Restore')
+ executeButtonText: gettext('Restore'),
+ cancelButtonText: gettext('Cancel')
});
dialog.on('execute', function(event) {
});
dialog.on('execute', function(event) {
<div class="modal-body">
</div>
<div class="modal-footer">
<div class="modal-body">
</div>
<div class="modal-footer">
- <a href="#" class="btn btn-info btn-mini execute-btn"><%= executeButtonText %></a>
- <a href="#" class="btn btn-danger btn-mini cancel-btn"><%= cancelButtonText %></a>
+ <% if(executeButtonText) { %>
+ <a href="#" class="btn btn-info btn-mini execute-btn"><%= executeButtonText %></a>
+ <% } %>
+ <% if(cancelButtonText) { %>
+ <a href="#" class="btn btn-danger btn-mini cancel-btn"><%= cancelButtonText %></a>
+ <% } %>
</div>
</div>
\ No newline at end of file
</div>
</div>
\ No newline at end of file
define(function(require) {
define(function(require) {
'use strict';
var _ = require('libs/underscore'),
'use strict';
var _ = require('libs/underscore'),
},
show: function() {
this.setElement(this.template(_.extend({
},
show: function() {
this.setElement(this.template(_.extend({
- executeButtonText: gettext('Submit'),
- cancelButtonText: gettext('Cancel')
+ executeButtonText: null,
+ cancelButtonText: null
}, this.options)));
var body = this.$('.modal-body');
}, this.options)));
var body = this.$('.modal-body');