forked from putyourlightson/craft-snaptcha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ben Croker
committed
Feb 17, 2021
1 parent
4bd4828
commit bd34d87
Showing
4 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (c) PutYourLightsOn | ||
*/ | ||
|
||
namespace putyourlightson\snaptcha\assets; | ||
|
||
use craft\web\AssetBundle; | ||
|
||
class ErrorAsset extends AssetBundle | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function init() | ||
{ | ||
$this->sourcePath = '@putyourlightson/snaptcha/resources'; | ||
|
||
// define the relative path to CSS/JS files that should be registered with the page when this asset bundle is registered | ||
$this->css = [ | ||
'css/error.css', | ||
]; | ||
|
||
$this->js = [ | ||
'js/error.js', | ||
]; | ||
|
||
parent::init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.btn.submit { | ||
font-weight: bold !important; | ||
text-transform: uppercase; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
document.getElementById('warning').remove(); | ||
document.getElementById('error').classList.remove('hidden'); | ||
document.getElementById('graphic').classList.remove('hidden'); | ||
|
||
setTimeout(function() { | ||
document.getElementById('graphic').remove(); | ||
document.getElementById('resubmit').classList.remove('disabled'); | ||
}, document.getElementById('resubmit').dataset.timeout); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters