Skip to content

Commit fccac9d

Browse files
author
Evgeniy Kolesov
committed
MAGETWO-32277: Login
1 parent f900a72 commit fccac9d

File tree

24 files changed

+665
-322
lines changed

24 files changed

+665
-322
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<update handle="styles" />
10+
<body>
11+
<!-- ToDo: delete after bugfix -->
12+
<remove name="legal"/>
13+
<remove name="page.menu"/>
14+
<remove name="header"/>
15+
<remove name="page.title"/>
16+
<remove name="user"/>
17+
<remove name="header.wrapper.scope"/>
18+
19+
<remove name="global.search"/>
20+
<remove name="notification.messages"/>
21+
<!-- ToDo: end -->
22+
23+
<move element="messages" destination="login.content" before="-"/>
24+
<move element="copyright" destination="login.footer" before="-"/>
25+
<move element="logo" destination="login.header" before="-"/>
26+
<referenceBlock name="logo">
27+
<arguments>
28+
<argument name="logo_image_src" xsi:type="string">images/magento-logo.svg</argument>
29+
</arguments>
30+
</referenceBlock>
31+
32+
</body>
33+
</page>

app/code/Magento/Backend/view/adminhtml/layout/adminhtml_auth_login.xml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,11 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<update handle="admin_login" />
910
<body>
10-
<!-- ToDo: delete after bugfix -->
11-
<remove name="legal"/>
12-
<remove name="page.menu"/>
13-
<remove name="header"/>
14-
<remove name="logo"/>
15-
<remove name="page.title"/>
16-
<remove name="user"/>
17-
<remove name="global.search"/>
18-
<remove name="notification.messages"/>
19-
<!-- ToDo: end -->
20-
<referenceContainer name="main.content">
21-
<block class="Magento\Backend\Block\Template" name="content" template="admin/login.phtml">
22-
<block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright"/>
11+
<referenceContainer name="login.content">
12+
<block class="Magento\Backend\Block\Template" name="admin.login" template="admin/login.phtml">
2313
<container name="form.additional.info" label="Form Additional Info"/>
2414
<container name="form.buttons" label="Form Buttons">
2515
<block class="Magento\Backend\Block\Template" name="adminhtml_auth_login_buttons" template="admin/login_buttons.phtml"/>

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<arguments>
2626
<argument name="show_part" xsi:type="string">logo</argument>
2727
<argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
28+
<argument name="logo_image_src" xsi:type="string">images/magento-icon.svg</argument>
2829
</arguments>
2930
</block>
3031
<block class="Magento\Backend\Block\GlobalSearch" name="global.search" as="search" after="logo" acl="Magento_Backend::global_search"/>

app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,27 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<div id="page-login" class="page-login">
11-
<div class="wrapper">
12-
<div class="wrapper-inner">
13-
<div class="form-login form-inline">
14-
<header class="header">
15-
<div class="logo" title="<?php echo __('Magento Admin Panel') ?>"><span><?php echo __('Magento Admin Panel') ?></span></div>
16-
</header>
17-
<div class="admin__scope">
18-
<div id="messages" data-container-for="messages" >
19-
<?php echo $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
20-
</div>
21-
</div>
22-
<form method="post" action="" id="login-form" data-mage-init='{"form": {}, "validation": {}}' autocomplete="off">
23-
<fieldset class="fieldset">
24-
<legend class="legend"><span><?php echo __('Welcome') ?></span></legend><br/>
25-
<input name="form_key" type="hidden" value="<?php echo $block->getFormKey() ?>" />
26-
<div class="field field-username">
27-
<label for="username" class="label"><span><?php echo __('User Name:') ?></span></label>
28-
<div class="control">
29-
<input type="text" id="username" name="login[username]" autofocus value="" class="required-entry input-text" placeholder="<?php echo __('user name') ?>" />
30-
</div>
31-
</div>
32-
<div class="field field-password">
33-
<label for="login" class="label"><?php echo __('Password:') ?></label>
34-
<div class="control">
35-
<!-- This is a dummy hidden field to trick firefox from auto filling the password -->
36-
<input type="text" class="input-text no-display" name="dummy" id="dummy" />
37-
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" placeholder="<?php echo __('password') ?>" />
38-
</div>
39-
</div>
40-
<?php echo $block->getChildHtml('form.additional.info'); ?>
41-
<div class="form-actions">
42-
<?php echo $block->getChildHtml('form.buttons'); ?>
43-
</div>
44-
</fieldset>
45-
</form>
10+
<form method="post" action="" id="login-form" data-mage-init='{"form": {}, "validation": {}}' autocomplete="off">
11+
<fieldset class="admin__fieldset">
12+
<legend class="admin__legend"><span><?php echo __('Welcome, please sign in') ?></span></legend><br/>
13+
<input name="form_key" type="hidden" value="<?php echo $block->getFormKey() ?>" />
14+
<div class="admin__field _required field-username">
15+
<label for="username" class="admin__field-label"><span><?php echo __('Username') ?></span></label>
16+
<div class="admin__field-control">
17+
<input type="text" id="username" name="login[username]" autofocus value="" data-validate="{required:true}" class="admin__control-text" placeholder="<?php echo __('user name') ?>" />
4618
</div>
4719
</div>
48-
</div>
49-
<footer class="footer">
50-
<div class="footer-content">
51-
<div class="footer-copyright"><?php echo $block->getChildHtml('copyright');?></div>
20+
<div class="admin__field _required field-password">
21+
<label for="login" class="admin__field-label"><span><?php echo __('Password') ?></span></label>
22+
<div class="admin__field-control">
23+
<!-- This is a dummy hidden field to trick firefox from auto filling the password -->
24+
<input type="text" class="admin__control-dummy" name="dummy" id="dummy" />
25+
<input type="password" id="login" name="login[password]" data-validate="{required:true}" class="admin__control-text" value="" placeholder="<?php echo __('password') ?>" />
26+
</div>
27+
</div>
28+
<?php echo $block->getChildHtml('form.additional.info'); ?>
29+
<div class="form-actions">
30+
<?php echo $block->getChildHtml('form.buttons'); ?>
5231
</div>
53-
</footer>
54-
</div>
32+
</fieldset>
33+
</form>

app/code/Magento/Backend/view/adminhtml/templates/admin/login_buttons.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
?>
77
<div class="actions">
8-
<button <?php $block->getUiId(); ?> class="action-login primary" title="<?php echo __('Log in')?>" type="submit">
9-
<span><?php echo __('Log in')?></span>
8+
<button <?php $block->getUiId(); ?> class="action-login action-primary" title="<?php echo __('Log in')?>" type="submit">
9+
<span><?php echo __('Sign in')?></span>
1010
</button>
1111
</div>

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
<?php switch ($block->getShowPart()):
1212
case 'logo': ?>
1313
<?php $edition = $block->getEdition() ? 'data-edition="' . $block->getEdition() . '"' : ''; ?>
14+
<?php $logoSrc = ($block->hasLogoImageSrc()) ? $block->escapeHtml($block->getLogoImageSrc()) : 'images/magento-logo.svg' ?>
1415
<a
1516
href="<?php echo $block->getHomeLink() ?>"
1617
<?php echo $edition; ?>
1718
class="logo"
1819
title="<?php echo $this->escapeHtml(__('Magento Admin Panel')) ?>">
19-
<img class="logo-img" src="<?php echo $block->getViewFileUrl('images/magento-icon.svg') ?>" alt="<?php echo __('Magento Admin Panel') ?>"/>
20+
<img class="logo-img" src="<?php echo $block->getViewFileUrl($logoSrc) ?>" alt="<?php echo __('Magento Admin Panel') ?>"/>
2021
</a>
2122
<?php break; ?>
2223
<?php case 'user': ?>

app/code/Magento/Captcha/view/adminhtml/templates/default.phtml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,23 @@
1010
<?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?>
1111
<?php /* @var $block \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?>
1212
<?php $captcha = $block->getCaptchaModel() ?>
13-
<div class="clear"></div>
14-
<div class="captcha">
15-
<div class="captcha-input input-box input-left">
16-
<label for="captcha"><?php echo __('Please enter the letters from the image:') ?></label><br />
17-
<input type="text" name="<?php echo \Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE ?>[<?php echo $block->getFormId()?>]" id="captcha" class="required-entry input-text validation-failed"/>
18-
</div>
19-
<div class="captcha-image input-right">
20-
<img id="captcha-reload" class="captcha-reload" src="<?php echo $block->getViewFileUrl('Magento_Captcha::reload.png') ?>" alt="<?php echo __('Reload captcha') ?>"/>
21-
<img id="<?php echo $block->getFormId() ?>" width="<?php echo $block->getImgWidth() ?>" height="<?php echo $block->getImgHeight() ?>" src="<?php echo $captcha->getImgSrc() ?>" />
13+
<div class="admin__field _required">
14+
<label for="captcha" class="admin__field-label"><span><?php echo __('Please enter the letters from the image') ?></span></label>
15+
<div class="admin__field-control">
16+
<input type="text" name="<?php echo \Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE ?>[<?php echo $block->getFormId()?>]" id="captcha" data-validate="{required:true}" class="admin__control-text"/>
17+
<?php if ($captcha->isCaseSensitive()) :?>
18+
<div class="admin__field-note">
19+
<span><?php echo __('<strong>Attention</strong>: Captcha is case sensitive.') ?></span>
20+
</div>
21+
<?php endif; ?>
2222
</div>
2323
</div>
24-
<?php if ($captcha->isCaseSensitive()) :?>
25-
<div class="captcha-note">
26-
<p><?php echo __('<strong>Attention</strong>: Captcha is case sensitive.') ?></p>
24+
<div class="admin__field field-captcha">
25+
<img id="captcha-reload" class="captcha-reload" src="<?php echo $block->getViewFileUrl('Magento_Captcha::reload.png') ?>" alt="<?php echo __('Reload captcha') ?>"/>
26+
<img id="<?php echo $block->getFormId() ?>" width="<?php echo $block->getImgWidth() ?>" height="<?php echo $block->getImgHeight() ?>" src="<?php echo $captcha->getImgSrc() ?>" />
2727
</div>
28-
<?php endif; ?>
2928
<script>
30-
require(["prototype", "mage/captcha"], function(){
29+
require(["prototype", "mage/captcha"], function(){
3130

3231
//<![CDATA[
3332
var captcha = new Captcha('<?php echo $block->getRefreshUrl() ?>', '<?php echo $block->getFormId() ?>');
@@ -38,5 +37,5 @@ require(["prototype", "mage/captcha"], function(){
3837

3938
//]]>
4039

41-
});
40+
});
4241
</script>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_layout.xsd">
9+
<container name="root" htmlTag="div" htmlClass="page-wrapper">
10+
<container name="login.header" htmlTag="header" htmlClass="login-header"/>
11+
<container name="login.content" htmlTag="div" htmlClass="login-content"/>
12+
<container name="login.footer" htmlTag="footer" htmlClass="login-footer"/>
13+
</container>
14+
</layout>

app/code/Magento/User/view/adminhtml/layout/adminhtml_auth_forgotpassword.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd">
9-
<container name="root" label="Root">
10-
<block class="Magento\Backend\Block\Template" name="content" template="Magento_User::admin/forgotpassword.phtml">
11-
<block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright"/>
12-
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config" as="requirejs-config"/>
13-
<container name="form.additional.info" label="Form Additional Info"/>
14-
</block>
15-
</container>
16-
</layout>
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<update handle="admin_login" />
10+
<body>
11+
<referenceContainer name="login.content">
12+
<block class="Magento\Backend\Block\Template" name="forgotpassword.content" template="Magento_User::admin/forgotpassword.phtml">
13+
<container name="form.additional.info" label="Form Additional Info"/>
14+
</block>
15+
</referenceContainer>
16+
</body>
17+
</page>

app/code/Magento/User/view/adminhtml/layout/adminhtml_auth_resetpassword.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd">
9-
<container name="root" label="Root">
10-
<block class="Magento\Backend\Block\Template" name="content" template="Magento_User::admin/resetforgottenpassword.phtml">
11-
<block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright"/>
12-
</block>
13-
</container>
14-
</layout>
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<update handle="admin_login" />
10+
<body>
11+
<referenceContainer name="login.content">
12+
<block class="Magento\Backend\Block\Template" name="content" template="Magento_User::admin/resetforgottenpassword.phtml" />
13+
</referenceContainer>
14+
</body>
15+
</page>

0 commit comments

Comments
 (0)