define([ "jquery", "message-bus" ], function($, bus) {
	bus.listen("ui-form-collector:extend", function(e, msg) {
		function updateButton() {
			var enabled = true;
			msg.requiredDivs.forEach(function(div) {
				var container = $("#" + div);
				var input = container.find("input");
				var select = container.find("select");
				if (input.length == 1) {
					enabled = enabled && !!input.val();
				} else if (select.length == 1) {
					enabled = enabled && !!select.val();
				}
			});
			bus.send("ui-button:" + msg.button + ":enable", enabled);
		}

		if (msg.requiredDivs) {
			msg.requiredDivs.forEach(function(div) {
				var container = $("#" + div);
				var input = container.find("input");
				var select = container.find("select");
				if (input.length == 1) {
					bus.listen("ui-input-field:" + div + ":value-changed", updateButton);
				} else if (select.length == 1) {
					bus.listen("ui-choice-field:" + div + ":value-changed", updateButton);
				}
			});

			updateButton();
		}

		$("#" + msg.button).click(function() {
			var rawMessage = {};
			var i;
			for (i = 0; i < msg.divs.length; i++) {
				var fieldName = msg.divs[i];
				bus.send(fieldName + "-field-value-fill", rawMessage);
			}

			var translatedMessage;
			if (msg.names) {
				translatedMessage = {};
				for (i = 0; i < msg.divs.length; i++) {
					translatedMessage[msg.names[i]] = rawMessage[msg.divs[i]];
				}
			} else {
				translatedMessage = rawMessage;
			}
			bus.send(msg.sendEventName, translatedMessage);
		});
	});
});
@@ -341,32 +341,207 @@
 .length == 1) %7B%0A
+%09%09%09%09%09if (input.attr(%22type%22) == %22file%22) %7B%0A%09%09%09%09%09%09var placeholder = container.find(%22.ui-file-input-placeholder%22);%0A%09%09%09%09%09%09enabled = enabled && !!placeholder.text();%0A%09%09%09%09%09%7D else %7B%0A%09
 %09%09%09%09%09enabled = e
@@ -561,24 +561,31 @@
 nput.val();%0A
+%09%09%09%09%09%7D%0A
 %09%09%09%09%7D else i

Fix bug with ui-form-collector requiredDivs using a 'file' input