Skip to content

Commit

Permalink
added ability to set button text
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbean committed May 5, 2016
1 parent f8e3177 commit 85241a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions form-cues.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@
var defaultIcon = options.defaultIcon || options.icon || 'check';
var spinnerIcon = options.spinnerIcon || 'spinner';
var animation = options.animation || 'spin';
var buttonText = options.buttonText || options.text || null;
submitButton = ((submitButton instanceof Object) ? submitButton : $('#' + submitButton));
submitIcon = ((submitIcon instanceof Object) ? submitIcon : $('#' + submitIcon));
if (!!buttonText) {
submitButton.prop('value', buttonText);
}
submitButton.prop('disabled', !isEnabled);
if (!!doSpin) {
submitIcon.removeClass('fa-' + defaultIcon);
Expand Down
4 changes: 2 additions & 2 deletions form-cues.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "form-cues",
"description": "Visual cues for forms using Bootstrap and Font Awesome",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/beardon/form-cues",
"bugs": {
"url": "https://github.com/beardon/form-cues/issues",
Expand Down

0 comments on commit 85241a2

Please sign in to comment.