{capture assign="password_block"} {/capture} {capture assign="waid_block"} {if $is_connected_to_webasyst_id && ($contact['is_user'] == '1' || $is_bound_with_webasyst_contact)}
[s`Sign in with Webasyst ID`]
{if $is_bound_with_webasyst_contact} {* own or other uses's profile is connected to webasyst ID *} {if $webasyst_id_email} {sprintf(_w('Webasyst ID account %s is connected.'), $webasyst_id_email)} {else} [s`Sign in with Webasyst ID`] [s`is connected`]. {/if} {* authorize into customer center - available only for own profile *} {if $customer_center_auth_url} [s`Go to the Webasyst Customer Center`] {/if} [s`Disconnect`] {elseif $is_own_profile} {* own profile is not connected to webasyst ID *}
[s`Connect your Webasyst ID account and sign into the backend securely with no extra passwords.`] [s`How it works?`]
{else} {* other user's profile (not own) is connected to webasyst ID *} [s`Sign in with Webasyst ID`] [s`is not connected`]. {/if}
{/if} {/capture}
{if !$is_superadmin}
[`Login`]
{$password_block} {$waid_block}
{elseif $is_superadmin}
[`Backend`]
{if $gFullAccess} [`Administrator`] [`This access level is inherited from groups. To change it, please adjust group settings or edit group membership for this user.`] {elseif $fullAccess && !empty($own_profile)} [`Administrator`]
[`You cannot revoke administrative access level for yourself. Only another Administrator can do this.`] {else} {if !$gNoAccess} {/if} {/if}
{* Invite tokens *} {foreach $invite_tokens as $_token}
[`Invitation sent`] [`expires`] {$_token.expire_datetime|wa_date:humandatetime} {if $_token.data} {$a = json_decode($_token.data, true)} {if !empty($_token.groups)} {strip}
{foreach $_token.groups as $g_id} {if isset($all_groups[$g_id])} {$all_groups[$g_id]|escape} {if !$g_id@last} ,{/strip} {strip} {/if} {/if} {/foreach} {/strip} {/if} {/if}
{/foreach}
{$password_block} {$waid_block}
[`Belongs to groups`]
{if $groups} {foreach $groups as $id => $name} {if strlen($name) > 0}{$name|escape}{else}[`<no name>`]{/if}{if !$name@last},{/if} {/foreach} {else} [`<none>`] {/if} {if $all_groups} [`customize groups`] {/if}
{if $all_groups} {/if}
[`Access rights`]
[`Backend access rights are customized for every app separately and result from a combination of personal and group access rights.`] {foreach $apps as $app_id => $app} {/foreach}
  {$app.name|escape} {$_rights = max($app.gaccess, $app.access)} {if $_rights > 1} {$_access = $access_types.full} {elseif $_rights} {$_access = $access_types.limited} {else} {$_access = $access_types.no} {/if}
{* Output all possible names to be able to change them via JS *} {foreach $access_types as $at} {$at.name|default:""|escape} {/foreach}
{/if}{* if $is_superadmin *}
{* Access *}
[`Access`]
{* Toggle to ban user or contact. Can not ban self. *} {if empty($own_profile)}{strip} {/strip}{else} {if $contact.is_user == '-1'}[`Disabled`]{else}[`Enabled`]{/if} {/if}
[`Status`]: {$status = $contact->getStatus()} {if $status == 'online'} [`Online`] {else} [`Offline`] {if !$contact.last_datetime} ([`never logged in`]) {else} ([`last login:`] {$contact.last_datetime|wa_date:"datetime"}) {/if} {/if}
{if $contact.is_user == '-1'}{$access_disable_msg}{/if}
{* Api tokens *} {if $is_superadmin && !empty($api_tokens)}
[`API tokens`]
{foreach $api_tokens as $_token} {/foreach}
[`Create date`] [`Client id`] [`Scope`] [`Last use date`] [`Expires`]
{$_token.create_datetime|wa_date:humandatetime} {$_token.client_id|escape} {foreach $_token.installed_apps as $_app} {/foreach} {foreach $_token.not_installed_apps as $_app} {$_app|escape}{if !$_app@last},{/if} {/foreach} {if !empty($_token.last_use_datetime)}{$_token.last_use_datetime|wa_date:humandatetime}{else}{/if} {if !empty($_token.expires)}{$_token.expires|wa_date:humandatetime}}{else}{/if}
{/if} {* Customer portal *}
[`Customer portal`]
{if $personal_portal_available} [`Available`] {else} [`Not available`] {/if}
[`Customer portal is a part of your site available for registered clients and containing their personal data. To access their customer portals, your clients must log in with an email address and a password.`] {if $is_superadmin} {sprintf('[`Manage personal portal settings in Site app.`]', "`$wa_backend_url`site/#/personal/settings")} {/if}
[`Email address changes history`]
{* .block.double-padded *}