DEV: Inline cancel-link code (#26778)

No need for this small component (and its unused and empty admin component twin)
This commit is contained in:
Jarek Radosz 2024-04-27 14:26:29 +02:00 committed by GitHub
parent 505d8b52b8
commit f75c253b95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 17 deletions

View File

@ -1,5 +0,0 @@
import Component from "@ember/component";
import { tagName } from "@ember-decorators/component";
@tagName("")
export default class CancelLink extends Component {}

View File

@ -1,3 +0,0 @@
<LinkTo @route={{this.route}} @model={{this.args}} class="cancel">
{{i18n "cancel"}}
</LinkTo>

View File

@ -1,3 +0,0 @@
import Component from "@ember/component";
export default Component.extend({});

View File

@ -43,10 +43,13 @@
type="submit" type="submit"
class="btn-primary" class="btn-primary"
/> />
<CancelLink <LinkTo
@route="preferences.account" @route="preferences.account"
@args={{this.model.username}} @model={{this.model.username}}
/> class="cancel"
>
{{i18n "cancel"}}
</LinkTo>
</div> </div>
{{/if}} {{/if}}
</form> </form>

View File

@ -146,10 +146,13 @@
@label="user.second_factor.disable_all" @label="user.second_factor.disable_all"
class="btn-danger" class="btn-danger"
/> />
<CancelLink <LinkTo
@route="preferences.security" @route="preferences.security"
@args={{this.model.username}} @model={{this.model.username}}
/> class="cancel"
>
{{i18n "cancel"}}
</LinkTo>
</div> </div>
</div> </div>
{{/unless}} {{/unless}}