Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $szablon = <<<HTML <form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login" class='ipsBox_alt'>
- <input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
- {{if $ref}}
- <input type="hidden" name="ref" value="{$ref}">
- {{endif}}
- {{if !request.isAjax()}}
- <div class="ipsSpacer_both">
- <h1 class='ipsType_reset ipsType_veryLarge ipsType_center'>{lang='sign_in_short'}</h1>
- {{if \IPS\Login::registrationType() != 'disabled'}}
- <p class='ipsType_reset ipsType_large ipsType_center ipsType_light'>
- {lang="dont_have_an_account"}
- {{if \IPS\Login::registrationType() == 'redirect'}}
- <a href='{expression="\IPS\Settings::i()->allow_reg_target"}' target="_blank">
- {{else}}
- <a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' {{if \IPS\Login::registrationType() == 'normal'}}data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title='{lang="sign_up"}'{{endif}}>
- {{endif}}
- {lang="sign_up"}</a>
- </p>
- {{endif}}
- </div>
- {{endif}}
- {{$usernamePasswordMethods = $login->usernamePasswordMethods();}}
- {{$buttonMethods = $login->buttonMethods();}}
- {{if $usernamePasswordMethods and $buttonMethods}}
- {{if $error}}
- <div class="ipsMessage ipsMessage_error">{lang="$error"}</div>
- {{endif}}
- <div class='ipsColumns ipsColumns_collapsePhone'>
- <div class='ipsColumn ipsColumn_fluid'>
- <div class='{{if !request.isAjax()}}ipsBox{{endif}} ipsPad'>
- {template="loginForm" app="core" group="system" params="$login"}
- </div>
- </div>
- <div class='ipsColumn ipsColumn_veryWide'>
- <div class='{{if !request.isAjax()}}ipsBox{{endif}} ipsPad'>
- <h2 class='ipsType_sectionHead'>{lang="sign_in_faster"}</h2>
- {{if count( $buttonMethods ) > 1}}
- <p class='ipsType_normal ipsType_reset ipsType_light'>{lang='sign_in_with_these'}</p>
- {{endif}}
- {{foreach $buttonMethods as $method}}
- <div class='cLogin_social ipsType_center'>
- {$method->button()|raw}
- </div>
- {{endforeach}}
- </div>
- </div>
- </div>
- {{elseif $usernamePasswordMethods}}
- <div class='cLogin_single ipsPos_center'>
- {{if $error}}
- <p class="ipsMessage ipsMessage_error">{lang="$error"}</p>
- {{endif}}
- <div class="{{if !request.isAjax()}}ipsBox{{endif}} ipsPad">
- {template="loginForm" app="core" group="system" params="$login"}
- </div>
- </div>
- {{elseif $buttonMethods}}
- <div class="cLogin_single ipsPos_center">
- {{if $error}}
- <p class="ipsMessage ipsMessage_error">{lang="$error"}</p>
- {{endif}}
- {{foreach $buttonMethods as $method}}
- <div class='ipsPad_half ipsType_center'>
- {$method->button()|raw}
- </div>
- {{endforeach}}
- </div>
- {{endif}}
- </form>
- HTML;
- $szablon2 = <<<HTML <ul class='ipsForm'>
- <li class="ipsFieldRow ipsFieldRow_fullWidth ipsClearfix">
- {{$authType = $login->authType();}}
- <label class="ipsFieldRow_label" for="auth">
- {{if $authType === \IPS\Login::AUTH_TYPE_USERNAME}}
- {lang="username"}
- {{elseif $authType === \IPS\Login::AUTH_TYPE_EMAIL}}
- {lang="email_address"}
- {{else}}
- {lang="username_or_email"}
- {{endif}}
- <span class="ipsFieldRow_required">{lang="required"}</span>
- </label>
- <div class="ipsFieldRow_content">
- {{if $authType === \IPS\Login::AUTH_TYPE_USERNAME}}
- <input type="text" placeholder="{lang="username"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
- {{elseif $authType === \IPS\Login::AUTH_TYPE_EMAIL}}
- <input type="email" placeholder="{lang="email_address"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
- {{else}}
- <input type="text" placeholder="{lang="username_or_email"}" name="auth" id="auth" {{if isset( \IPS\Request::i()->auth )}}value="{request="auth"}"{{endif}}>
- {{endif}}
- </div>
- </li>
- <li class="ipsFieldRow ipsFieldRow_fullWidth ipsClearfix">
- <label class="ipsFieldRow_label" for="password">
- {lang="password"}
- <span class="ipsFieldRow_required">{lang="required"}</span>
- </label>
- <div class="ipsFieldRow_content">
- <input type="password" placeholder="{lang="password"}" name="password" id="password" {{if isset( \IPS\Request::i()->password )}}value="{request="password"}"{{endif}}>
- </div>
- </li>
- <li class="ipsFieldRow ipsFieldRow_checkbox ipsClearfix">
- <span class="ipsCustomInput">
- <input type="checkbox" name="remember_me" id="remember_me_checkbox" value="1" checked aria-checked="true">
- <span></span>
- </span>
- <div class="ipsFieldRow_content">
- <label class="ipsFieldRow_label" for="remember_me_checkbox">{lang="remember_me"}</label>
- <span class="ipsFieldRow_desc">{lang="remember_me_desc"}</span>
- </div>
- </li>
- {{if !\IPS\Settings::i()->disable_anonymous}}
- <li class="ipsFieldRow ipsFieldRow_checkbox ipsClearfix">
- <span class="ipsCustomInput">
- <input type="checkbox" name="anonymous" id="anonymous_checkbox" value="1" aria-checked="false">
- <span></span>
- </span>
- <div class="ipsFieldRow_content">
- <label class="ipsFieldRow_label" for="anonymous_checkbox">{lang="signin_anonymous"}</label>
- </div>
- </li>
- {{endif}}
- <li class="ipsFieldRow ipsFieldRow_fullWidth">
- <br>
- <button type="submit" name="_processLogin" value="usernamepassword" class="ipsButton ipsButton_primary ipsButton_small" id="elSignIn_submit">{lang="login"}</button>
- {{if settings.allow_forgot_password != 'disabled'}}
- <br>
- <p class="ipsType_right ipsType_small">
- {{if settings.allow_forgot_password == 'redirect'}}
- <a href='{expression="\IPS\Settings::i()->allow_forgot_password_target"}' target="_blank">
- {{else}}
- <a href='{url="app=core&module=system&controller=lostpass" seoTemplate="lostpassword"}' data-ipsDialog data-ipsDialog-title='{lang="forgotten_password"}'>
- {{endif}}
- {lang="forgotten_password"}</a>
- </p>
- {{endif}}
- </li>
- </ul>
- HTML;
- echo $szablon;
- echo $szablon2;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement