diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/themes/default/platform-create.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/themes/default/platform-create.css index 483cdedbff..36993707e2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/themes/default/platform-create.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/public/themes/default/platform-create.css @@ -66,3 +66,8 @@ .createplatformdropzonep { margin: 70px 40px 70px 70px } + +.createPlatformTagWrapper { + display: flex; + flex-wrap: wrap; +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx index 89f84278d6..49cd06abf6 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx @@ -92,7 +92,6 @@ class ApplicationCreate extends Component { console.log(err); } ); - }; /** @@ -197,7 +196,6 @@ class ApplicationCreate extends Component { render() { const {finished, stepIndex} = this.state; - const contentStyle = {margin: '0 16px'}; /** * Defines the dialog box actions. [Yes][No] diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx index 974fd55f45..fbfc9b8f57 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx @@ -380,7 +380,7 @@ class Step2 extends Component { onKeyPress={this.addTags.bind(this)} />
-
+
{this.state.tags.map(this.renderChip, this)}

diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx index 6d3706190a..e1fd2f8f3a 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx @@ -49,6 +49,17 @@ class PlatformCreate extends Component { constructor() { super(); + this.onCreatePlatform = this.onCreatePlatform.bind(this); + this.handleToggle = this.handleToggle.bind(this); + this.addProperty = this.addProperty.bind(this); + this.addTags = this.addTags.bind(this); + this.clearForm = this.clearForm.bind(this); + this.onPropertySelect = this.onPropertySelect.bind(this); + this.handleTagChange = this.handleTagChange.bind(this); + this.removeIcon = this.removeIcon.bind(this); + this.onTextChange = this.onTextChange.bind(this); + this.renderChip = this.renderChip.bind(this); + this.removeProperty = this.removeProperty.bind(this); this.state = { tags: [], defValue: "", @@ -224,8 +235,9 @@ class PlatformCreate extends Component { /** * Create platform object and call the create platform api. * */ - onCreatePlatform() { + onCreatePlatform(event) { //Call the platform create api. + event.preventDefault(); let platform = {}; platform.identifier = this.state.identifier; platform.name = this.state.name; @@ -245,13 +257,15 @@ class PlatformCreate extends Component { * Remove the uploaded icon. * */ removeIcon(event) { + event.preventDefault(); this.setState({icon: []}); } /** * Clears the user entered values in the form. * */ - clearForm() { + clearForm(event) { + event.preventDefault(); this.setState({ enabled: true, allTenants: false, @@ -292,7 +306,7 @@ class PlatformCreate extends Component { floatingLabelText="Identifier*" floatingLabelFixed={true} value={identifier} - onChange={this.onTextChange.bind(this)} + onChange={this.onTextChange} />



@@ -320,7 +334,7 @@ class PlatformCreate extends Component { id="tenant" label="Shared with all Tenants" labelPosition="right" - onToggle={this.handleToggle.bind(this)} + onToggle={this.handleToggle} toggled={allTenants} />
@@ -328,7 +342,7 @@ class PlatformCreate extends Component { id="enabled" label="Enabled" labelPosition="right" - onToggle={this.handleToggle.bind(this)} + onToggle={this.handleToggle} toggled={enabled} />
@@ -338,11 +352,11 @@ class PlatformCreate extends Component { floatingLabelText="Tags*" floatingLabelFixed={true} value={defValue} - onChange={this.handleTagChange.bind(this)} - onKeyPress={this.addTags.bind(this)} + onChange={this.handleTagChange} + onKeyPress={this.addTags} />
-
+
{tags.map(this.renderChip, this)}

@@ -364,21 +378,21 @@ class PlatformCreate extends Component { floatingLabelText="Platform Property*" floatingLabelFixed={true} value={this.state.property} - onChange={this.onTextChange.bind(this)} + onChange={this.onTextChange} /> + onChange={this.onPropertySelect}> {propertyTypes.map((type) => { return })} - +
@@ -392,7 +406,7 @@ class PlatformCreate extends Component { key={Math.floor(Math.random() * 1000)} title={tile.name} actionIcon={ - + }> @@ -413,8 +427,8 @@ class PlatformCreate extends Component {
- + onClick={this.onCreatePlatform}/> +