Skip to content

Commit 1885159

Browse files
author
David Luecke
committed
Bugfixes
1 parent 89cfbb3 commit 1885159

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

js/jquery.dform.subscriptions.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
$.fb.subscribe("[type=textarea]", function(options) {
4242
return _create("<textarea>", {}, options, $(this));
4343
});
44-
44+
45+
$.fb.subscribe("[type=submit]", function(options) {
46+
return _create("<input>", { "type" : "submit" }, options, $(this));
47+
});
48+
4549
$.fb.subscribe("elements", function(options) {
4650
var scoper = $(this);
4751
$.each(options, function(name, nested) {
@@ -97,14 +101,15 @@
97101
// TODO maybe derive ID from name
98102
if($(this).attr("id"))
99103
$(label).attr("for", $(this).attr("id"));
104+
label = $(label).wrap("<p>").parent();
100105
$(label).insertBefore($(this));
101106
});
102107

103108
$.fb.subscribe("legend", function(options, type) {
104109
if(type == "fieldset")
105110
{
106111
var legend = $("<legend>").html(options);
107-
return $(this).prepend(legend);
112+
$(this).prepend(legend);
108113
}
109114
});
110115
})(jQuery);

0 commit comments

Comments
 (0)