Skip to content

Commit cdbe8ce

Browse files
committed
Add cancel button to "create new app" form
1 parent 49dcf72 commit cdbe8ce

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

frontend/express/public/core/app-management/javascripts/countly.views.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,9 @@
849849
return countlyGlobal.apps[key].plugins.consolidate.includes(self.selectedApp);
850850
}
851851
}) || [];
852+
},
853+
handleCancelForm: function() {
854+
CountlyHelpers.goTo({url: "/manage/apps"});
852855
}
853856
},
854857
mounted: function() {

frontend/express/public/core/app-management/templates/app-management.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,22 @@ <h2 class="bu-mb-4" data-test-id="selected-app-name-title"> {{apps[selectedApp]
188188
</cly-inline-form-field>
189189
</div>
190190
</cly-form-step>
191-
<div v-if="newApp" class="bu-has-text-right" @mouseenter="formScope.validate()">
191+
<div v-if="newApp" class="bu-level-right">
192192
<el-button
193-
:disabled="isDisabled() || !formScope.isSubmissionAllowed"
194-
@click="formScope.submit()"
195-
data-test-id="empty-page-create-new-app-button"
196-
type="primary">{{i18n( newApp ? 'common.create' : 'common.apply')}}
193+
@click="handleCancelForm"
194+
data-test-id="create-new-app-cancel-button"
195+
type="secondary"
196+
>
197+
{{i18n('common.cancel')}}
197198
</el-button>
199+
<div class="bu-ml-2" @mouseenter="formScope.validate()">
200+
<el-button
201+
:disabled="isDisabled() || !formScope.isSubmissionAllowed"
202+
@click="formScope.submit()"
203+
data-test-id="empty-page-create-new-app-button"
204+
type="primary">{{i18n( newApp ? 'common.create' : 'common.apply')}}
205+
</el-button>
206+
</div>
198207
</div>
199208
<cly-diff-helper
200209
v-if="!edited"

0 commit comments

Comments
 (0)