<!-- Inner content -->
<form method="post" enctype="multipart/form-data">

	<!-- Page header -->
    {include file="components/group-buttons.tpl" url="{$adminUrl}/subscribers?page={if isset($page)}{$page}{/if}{$buildQueryString}"}

    {capture name="breadcrumb"}
		<a href="{$adminUrl}/subscribers" class="breadcrumb-item">{$title}</a>
	    <span class="breadcrumb-item active">{general:add}</span>
    {/capture}

    {capture name="showBy"}{/capture}

    {include file="components/page-header.tpl" buttons=$smarty.capture.buttons breadcrumb=$smarty.capture.breadcrumb showBy=$smarty.capture.showBy}
	<!-- /page header -->

    <div class="content">
    
        <div class="row"> 
            <div class="col-md-12">
    
    		    <div class="card border shadow-sm">
			        <div class="card-header d-flex flex-wrap">
				        <h6 class="mb-0">{users:editProfile}</h6>
				        <div class="d-inline-flex ms-auto">
					        <a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
				        </div>
			        </div>
			        <div class="collapse show">
	                    <div class="card-body">

	{*                        <div class="form-group mb-3">*}
	{*                            <label class="form-label is-visible {if isset($errors.firstName)}text-danger{/if}">{users:general:firstName}</label>*}
	{*                            <input class="form-control" autocomplete="off" type="text" name="user[fullName]" value="{if isset($user.fullName)}{$user.fullName}{/if}" />*}
	{*                        </div>*}
{*		                    <div class="form-group mb-3">*}
{*			                    <label class="form-label is-visible {if isset($errors.firstName)}text-danger{/if}">{users:general:firstName}</label>*}
{*			                    <input class="form-control maxlength-threshold" maxlength="30" autocomplete="off" type="text" name="user[firstName]" value="{if isset($user.firstName)}{$user.firstName}{/if}" />*}
{*		                    </div>*}
{*	                        <div class="form-group mb-3">*}
{*	                            <label class="form-label is-visible {if isset($errors.lastName)}text-danger{/if}">{users:general:lastName}</label>*}
{*	                            <input class="form-control maxlength-threshold" maxlength="30" autocomplete="off" type="text" name="user[lastName]" value="{if isset($user.lastName)}{$user.lastName}{/if}" />*}
{*	                        </div>*}

	{*                        <div class="form-group mb-3">*}
	{*                            <label class="form-label is-visible {if isset($errors.middleName)}text-danger{/if}">{users:general:middleName}</label>*}
	{*                            <input class="form-control" autocomplete="off" type="text" name="user[middleName]" value="{if isset($user.middleName)}{$user.middleName}{/if}" />*}
	{*                        </div>*}


	                        <div class="form-group mb-3">
	                            <label class="form-label is-visible {if isset($errors.phone)}text-danger{/if}">{users:general:phone}</label>
	                            <input class="form-control phone" autocomplete="off" type="text" name="user[phone]" data-mask="{$config.phone_mask}" value="{if isset($user.phone)}{$user.phone}{/if}" />
	                        </div>

	                        <div class="form-group mb-3">
	                            <label class="form-label is-visible {if isset($errors.email1) || isset($errors.email2) || isset($errors.email_correct)}text-danger{/if}">{users:general:email}</label>
	                            <input class="form-control" placeholder="your@email.com" autocomplete="off" type="email" name="user[email]" value="{if isset($user.email)}{$user.email}{/if}" />

	                        </div>

	                    </div>
			        </div>
    		    </div>
            </div>

	        <div class="col-md-12 text-center">
                {if isset($user.userId)}<input type="hidden" class="form-control" id="id" name="id" value="{$user.userId}">{/if}
                {$smarty.capture.buttons nofilter}
	        </div>

        </div>

    </div>

</form>

{* Подключаем filemanager *}
{include file='uploads_init.tpl'}

<script>
    $(document).ready(function () {

        {if isset($errors.site_user_not_found)} new Noty({ text: '{users:errors:10}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.login)}               new Noty({ text: '{users:errors:12}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.firstName)}           new Noty({ text: '{users:errors:4}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.lastName)}            new Noty({ text: '{users:errors:4}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.phone)}               new Noty({ text: '{users:errors:3}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.email1)}              new Noty({ text: '{users:errors:0}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.email2)}              new Noty({ text: '{users:errors:1}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.password)}            new Noty({ text: '{users:errors:2}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.address)}             new Noty({ text: '{users:errors:6}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.city)}                new Noty({ text: '{users:errors:7}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.postcode)}            new Noty({ text: '{users:errors:8}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.country)}             new Noty({ text: '{users:errors:9}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.not_saved)}           new Noty({ text: '{users:errors:11}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.login_correct)}       new Noty({ text: '{users:errors:13}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.email_correct)}       new Noty({ text: '{users:errors:16}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.phone_correct)}       new Noty({ text: '{users:errors:14}', type: 'error', timeout: 3000 }).show(); {/if}
        {if isset($errors.image_not_saved)}     new Noty({ text: '{users:errors:15}', type: 'error', timeout: 3000 }).show(); {/if}

        {if isset($messages.saved)}             new Noty({ text: '{users:messages:0}', type: 'success' }).show(); {/if}

    });

</script>
