diff --git a/form/Form.js b/form/Form.js index a53b9cf11..8392b1fd4 100644 --- a/form/Form.js +++ b/form/Form.js @@ -1,19 +1,18 @@ define([ "dojo/_base/declare", // declare "dojo/dom-attr", // domAttr.set - "dojo/_base/kernel", // kernel.deprecated "dojo/sniff", // has("ie") - "../_Widget", + "../_WidgetBase", "../_TemplatedMixin", "./_FormMixin", "../layout/_ContentPaneResizeMixin" -], function(declare, domAttr, kernel, has, _Widget, _TemplatedMixin, _FormMixin, _ContentPaneResizeMixin){ +], function(declare, domAttr, has, _WidgetBase, _TemplatedMixin, _FormMixin, _ContentPaneResizeMixin){ // module: // dijit/form/Form - return declare("dijit.form.Form", [_Widget, _TemplatedMixin, _FormMixin, _ContentPaneResizeMixin], { + return declare("dijit.form.Form", [_WidgetBase, _TemplatedMixin, _FormMixin, _ContentPaneResizeMixin], { // summary: // Widget corresponding to HTML form tag, for validation and serialization // @@ -56,28 +55,7 @@ define([ // Target frame for the document to be opened in. target: "", - templateString: "
", - - postMixInProperties: function(){ - // Setup name=foo string to be referenced from the template (but only if a name has been specified) - // Unfortunately we can't use _setNameAttr to set the name due to IE limitations, see #8660 - this.nameAttrSetting = this.name ? ("name='" + this.name + "'") : ""; - this.inherited(arguments); - }, - - execute: function(/*Object*/ /*===== formContents =====*/){ - // summary: - // Deprecated: use submit() - // tags: - // deprecated - }, - - onExecute: function(){ - // summary: - // Deprecated: use onSubmit() - // tags: - // deprecated - }, + templateString: "
", _setEncTypeAttr: function(/*String*/ value){ domAttr.set(this.domNode, "encType", value); @@ -129,12 +107,7 @@ define([ _onSubmit: function(e){ var fp = this.constructor.prototype; - // TODO: remove this if statement beginning with 2.0 - if(this.execute != fp.execute || this.onExecute != fp.onExecute){ - kernel.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.", "", "2.0"); - this.onExecute(); - this.execute(this.getValues()); - } + if(this.onSubmit(e) === false){ // only exactly false stops submit e.stopPropagation(); e.preventDefault(); diff --git a/form/_FormMixin.js b/form/_FormMixin.js index 029d362eb..57a745b45 100644 --- a/form/_FormMixin.js +++ b/form/_FormMixin.js @@ -1,11 +1,10 @@ define([ "dojo/_base/array", // array.every array.filter array.forEach array.indexOf array.map "dojo/_base/declare", // declare - "dojo/_base/kernel", // kernel.deprecated "dojo/_base/lang", // lang.hitch lang.isArray "dojo/on", "dojo/window" // winUtils.scrollIntoView -], function(array, declare, kernel, lang, on, winUtils){ +], function(array, declare, lang, on, winUtils){ // module: // dijit/form/_FormMixin @@ -71,7 +70,7 @@ define([ validate: function(){ // summary: - // returns if the form is valid - same as isValid - but + // returns if the form is valid and // provides a few additional (ui-specific) features: // // 1. it will highlight any sub-widgets that are not valid @@ -92,10 +91,6 @@ define([ }), function(item){ return item; }); }, - setValues: function(val){ - kernel.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.", "", "2.0"); - return this.set('value', val); - }, _setValueAttr: function(/*Object*/ obj){ // summary: // Fill in form values from according to an Object (in the format returned by get('value')) @@ -211,10 +206,6 @@ define([ // which I am monitoring. }, - getValues: function(){ - kernel.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.", "", "2.0"); - return this.get('value'); - }, _getValueAttr: function(){ // summary: // Returns Object representing form values. See description of `value` for details. @@ -339,23 +330,6 @@ define([ return obj; }, - isValid: function(){ - // summary: - // Returns true if all of the widgets are valid. - // Deprecated, will be removed in 2.0. Use get("state") instead. - - return this.state == ""; - }, - - onValidStateChange: function(/*Boolean*/ /*===== isValid =====*/){ - // summary: - // Stub function to connect to if you want to do something - // (like disable/enable a submit button) when the valid - // state changes on the form as a whole. - // - // Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. - }, - _getState: function(){ // summary: // Compute what this.state should be based on state of children @@ -367,11 +341,6 @@ define([ array.indexOf(states, "Incomplete") >= 0 ? "Incomplete" : ""; }, - disconnectChildren: function(){ - // summary: - // Deprecated method. Applications no longer need to call this. Remove for 2.0. - }, - connectChildren: function(/*Boolean*/ inStartup){ // summary: // You can call this function directly, ex. in the event that you