refactor: 💡 Refactor ldap account view and serializer (#1826)
* refactor: 💡 Refactor ldap account view and serializer Refactor LDAP account view to only show `InfoField` fields if values are not `undefined`. Also fixed bug for updating accounts. ✅ Closes: ICU-10514 * refactor: 💡 clean up code Quick cleanup of code for accounts * Update account.js change text for commit * Update index.hbs * refactor: 💡 format hbs format hbs
This commit is contained in:
1 parent
de77f8807d
commit
e089d1c3ff
4 files changed
+50
-23
No files matched your search
@@ -86,27 +86,40 @@
|
||||
'form.other_fields.help'
|
||||
}}</Hds::Form::HelperText>
|
||||
</div>
|
||||
<InfoField @value={{@model.login_name}} as |F|>
|
||||
<F.Label>{{t 'form.login_name.label'}}</F.Label>
|
||||
</InfoField>
|
||||
<InfoField @value={{@model.email}} as |F|>
|
||||
<F.Label>{{t 'resources.account.form.email.label'}}</F.Label>
|
||||
</InfoField>
|
||||
<InfoField @value={{@model.full_name}} as |F|>
|
||||
<F.Label>{{t 'resources.account.form.full_name.label'}}</F.Label>
|
||||
</InfoField>
|
||||
<InfoField @value={{@model.dn}} as |F|>
|
||||
<F.Label>{{t 'resources.account.form.dn.label'}}</F.Label>
|
||||
</InfoField>
|
||||
<p class='hds-font-weight-semibold'>{{t
|
||||
'resources.account.form.member_of_groups.label'
|
||||
}}</p>
|
||||
{{#each @model.member_of_groups as |group|}}
|
||||
<Hds::Form::TextInput::Field
|
||||
@value={{group.value}}
|
||||
disabled={{true}}
|
||||
/>
|
||||
{{/each}}
|
||||
|
||||
{{#if @model.login_name}}
|
||||
<InfoField @value={{@model.login_name}} as |F|>
|
||||
<F.Label>{{t 'form.login_name.label'}}</F.Label>
|
||||
</InfoField>
|
||||
{{/if}}
|
||||
{{#if @model.email}}
|
||||
<InfoField @value={{@model.email}} as |F|>
|
||||
<F.Label>{{t 'resources.account.form.email.label'}}</F.Label>
|
||||
</InfoField>
|
||||
{{/if}}
|
||||
{{#if @model.full_name}}
|
||||
<InfoField @value={{@model.full_name}} as |F|>
|
||||
<F.Label>{{t 'resources.account.form.full_name.label'}}</F.Label>
|
||||
</InfoField>
|
||||
{{/if}}
|
||||
{{#if @model.dn}}
|
||||
<InfoField @value={{@model.dn}} as |F|>
|
||||
<F.Label>{{t 'resources.account.form.dn.label'}}</F.Label>
|
||||
</InfoField>
|
||||
{{/if}}
|
||||
|
||||
{{#if @model.member_of_groups}}
|
||||
<p class='hds-font-weight-semibold'>
|
||||
{{t 'resources.account.form.member_of_groups.label'}}
|
||||
</p>
|
||||
{{#each @model.member_of_groups as |group|}}
|
||||
<Hds::Form::TextInput::Field
|
||||
@value={{group.value}}
|
||||
disabled={{true}}
|
||||
/>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
</F.Control>
|
||||
</Hds::Form::Fieldset>
|
||||
{{/unless}}
|
||||
|
||||
Reference in new issue
Block a user