Skip to content

Commit c3f255b

Browse files
authored
1.0.0
1 parent 4813222 commit c3f255b

File tree

18 files changed

+448
-0
lines changed

18 files changed

+448
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace Espo\Modules\CustomLogin\EntryPoints;
4+
5+
use Espo\Core\Api\Request;
6+
use Espo\Core\Api\Response;
7+
use Espo\Core\EntryPoint\Traits\NoAuth;
8+
use Espo\Core\Exceptions\NotFound;
9+
use Espo\EntryPoints\Image;
10+
11+
class LoginImage extends Image
12+
{
13+
use NoAuth;
14+
15+
protected $allowedRelatedTypeList = ['Settings', 'Portal'];
16+
protected $allowedFieldList = ['CustomLoginBackground', 'CustomLoginPortalBackground'];
17+
18+
public function run(Request $request, Response $response): void
19+
{
20+
$id = $request->getQueryParam('id');
21+
$size = $request->getQueryParam('size') ?? null;
22+
23+
if (!$id) {
24+
$id = $this->config->get('CustomLoginBackgroundId');
25+
}
26+
27+
if (!$id) {
28+
throw new NotFound();
29+
}
30+
31+
$this->show($response, $id, $size);
32+
}
33+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"labels": {
3+
"CustomLoginTitle": "Custom Login"
4+
},
5+
"descriptions": {
6+
"CustomLoginDescription": "Custom Login Settings."
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"fields": {
3+
"CustomLoginBackground": "Background",
4+
"CustomLoginPortalBackground": "Portal Background"
5+
},
6+
"tooltips": {
7+
"CustomLoginBackground": "Login Background.",
8+
"CustomLoginPortalBackground": "Portal Login Background."
9+
}
10+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extSettings": {
3+
"label": "Extensions Settings",
4+
"itemList": [
5+
"__APPEND__",
6+
{
7+
"url": "#Admin/CustomLogin",
8+
"iconClass": "far fa-image",
9+
"keywords": [
10+
"login",
11+
"background"
12+
],
13+
"label": "CustomLoginTitle",
14+
"description": "CustomLoginDescription",
15+
"recordView": "custom-login:views/admin/settings"
16+
}
17+
],
18+
"order": 110
19+
}
20+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"developerModeCssList": [
3+
"__APPEND__",
4+
"client/modules/custom-login/css/custom-login.css"
5+
],
6+
"cssList": [
7+
"__APPEND__",
8+
"client/modules/custom-login/css/custom-login.css"
9+
]
10+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"loginView": "custom-login:views/login"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"controller": "custom-login:controllers/settings"
3+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"fields": {
3+
"CustomLoginBackground": {
4+
"type": "image",
5+
"global": true,
6+
"tooltip": true
7+
},
8+
"CustomLoginPortalBackground": {
9+
"type": "image",
10+
"global": true,
11+
"tooltip": true
12+
}
13+
}
14+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"order": 5100
3+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.login-page {
2+
background-repeat: no-repeat !important;
3+
background-position: relative !important;
4+
background-size: cover !important;
5+
max-width: initial !important;
6+
align-items: center;
7+
padding: 0;
8+
margin: 0;
9+
height: 100%;
10+
position: absolute;
11+
min-height: 100%;
12+
top: 0;
13+
left: 0;
14+
right: 0;
15+
bottom: 0;
16+
}
17+
18+
body:not([data-navbar=side])>.login-footer {
19+
position: absolute;
20+
bottom: 0;
21+
height: auto !important;
22+
}
23+
24+
body[data-navbar=side]>.login-footer {
25+
position: absolute;
26+
top: auto;
27+
bottom: -1px;
28+
margin-left: auto !important;
29+
left: 0;
30+
right: 0;
31+
width: 100%;
32+
max-width: 100%;
33+
display: flex;
34+
align-items: center;
35+
}
36+
37+
#login .logo-container {
38+
width: 100% !important;
39+
height: 43px;
40+
}
41+
#login {
42+
margin-top: 60px;
43+
}
44+
45+
@media screen and (min-width: 768px) {
46+
body[data-navbar=side]>.login-footer {
47+
position: absolute;
48+
top: auto;
49+
bottom: 0;
50+
margin-left: auto !important;
51+
padding-top: auto !important;
52+
left: 0;
53+
right: 0;
54+
width: 100%;
55+
max-width: 100%;
56+
display: flex;
57+
align-items: center;
58+
}
59+
}

0 commit comments

Comments
 (0)