chore: Use translated string for auth-method type

This commit is contained in:
Susmitha Girumala committed 2020-08-13 17:33:33 -04:00
1 parent 8dd13a0936
commit e790d58717
4 files changed
+16 -12

No files matched your search

@@ -6,7 +6,7 @@
as |form|
>
<form.input
@value={{@model.type}}
@value={{t (concat 'auth.method-types.' @model.type)}}
@label={{t "form.label.type"}}
readonly={{true}}
@disabled={{true}} />
@@ -1,9 +1,9 @@
<Rose::Layout::Page as |page|>
<page.header>
<h2>
{{t "resources.auth-method"}}
<Rose::Badge @style="outline">{{@model.type}}</Rose::Badge>
</h2>
<h2>{{t "resources.auth-method"}}</h2>
<Rose::Badge @style="outline">
{{t (concat 'auth.method-types.' @model.type)}}
</Rose::Badge>
</page.header>
<page.navigation>
@@ -27,17 +27,19 @@
{{#each @model as |authMethod|}}
<body.row as |row|>
<row.cell>
<LinkTo
@route="scopes.scope.auth-methods.auth-method"
@model={{authMethod}}
>
{{authMethod.name}}
</LinkTo>
<p>
<LinkTo
@route="scopes.scope.auth-methods.auth-method"
@model={{authMethod}}
>
{{authMethod.name}}
</LinkTo>
</p>
{{authMethod.description}}
</row.cell>
<row.cell>
<Rose::Badge @style="outline">
{{authMethod.type}}
{{t (concat 'auth.method-types.' authMethod.type)}}
</Rose::Badge>
</row.cell>
<row.cell>{{authMethod.id}}</row.cell>
@@ -9,9 +9,11 @@ module('Integration | Component | form/auth-method', function (hooks) {
test('it renders', async function (assert) {
this.submit = () => {};
this.cancel = () => {};
this.model = { type: 'password' };
await render(hbs`
<Form::AuthMethod
@model={{this.model}}
@submit={{this.submit}}
@cancel={{this.cancel}}
/>`);