Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<div class="card content-wrap auto-height">
<h1 class="list-heading">{{ Str::title(trans('auth.log_in')) }}</h1>

@include('auth.parts.login-message')

@include('auth.parts.login-form-' . $authMethod)

@if(count($socialDrivers) > 0)
Expand Down
2 changes: 2 additions & 0 deletions resources/views/auth/parts/login-message.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{-- This is a placeholder template file provided as a --}}
{{-- convenience to users of the visual theme system. --}}
2 changes: 2 additions & 0 deletions resources/views/auth/parts/register-message.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{-- This is a placeholder template file provided as a --}}
{{-- convenience to users of the visual theme system. --}}
2 changes: 2 additions & 0 deletions resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<div class="card content-wrap auto-height">
<h1 class="list-heading">{{ Str::title(trans('auth.sign_up')) }}</h1>

@include('auth.parts.register-message')

<form action="{{ url("/register") }}" method="POST" class="mt-l stretch-inputs">
{!! csrf_field() !!}

Expand Down
17 changes: 17 additions & 0 deletions tests/ThemeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,23 @@ public function test_export_body_start_and_end_template_files_can_be_used()
});
}

public function test_login_and_register_message_template_files_can_be_used()
{
$loginMessage = 'Welcome to this instance, login below you scallywag';
$registerMessage = 'You want to register? Enter the deets below you numpty';

$this->usingThemeFolder(function (string $folder) use ($loginMessage, $registerMessage) {
$viewDir = theme_path('auth/parts');
mkdir($viewDir, 0777, true);
file_put_contents($viewDir . '/login-message.blade.php', $loginMessage);
file_put_contents($viewDir . '/register-message.blade.php', $registerMessage);
$this->setSettings(['registration-enabled' => 'true']);

$this->get('/login')->assertSee($loginMessage);
$this->get('/register')->assertSee($registerMessage);
});
}

protected function usingThemeFolder(callable $callback)
{
// Create a folder and configure a theme
Expand Down