Skip to content

Commit

Permalink
js: import jquery and phplist suscribe code for the ajax form
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelroland committed May 8, 2021
1 parent 766e89e commit 19c4d99
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
5 changes: 3 additions & 2 deletions content/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,15 @@ function getNewsLetterSection($news)
</div>
<span class="text-sm text-gray-400"><?= $news['newsletter-subscription'] ?></span>
<div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script src="https://s3.amazonaws.com/phplist/phplist-subscribe-0.2.min.js"></script>
<script src="js/jquery-1.5.2.min.js"></script>
<script src="js/phplist-subscribe-0.2.min.js"></script>

<div id="phplistsubscriberesult" class="text-green-600"></div>
<form action="https://kanffnews.hosted.phplist.com/lists/?p=subscribe&id=1" method="post" id="phplistsubscribeform">
<input type="text" name="email" value="" id="emailaddress" class="w-full p-1 outline-none focus:bg-gray-200 rounded-sm text-black md:text-base text-sm" placeholder="[email protected]" /><br>
<button type="submit" id="phplistsubscribe" class="bg-gray-300 hover:bg-blue-300 px-3 py-1 rounded-sm mt-2">S'inscrire</button>
<script>
var waitImage = "js/busy.gif";
var pleaseEnter = "";
var thanksForSubscribing = "<h3 class='text-xl'>Merci pour votre inscription !</h3><p>Vérifiez svp votre boîte mail et cliquez sur le lien de confirmation.</p>";
</script>
Expand Down
Binary file added js/busy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions js/jquery-1.5.2.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/phplist-subscribe-0.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 19c4d99

Please sign in to comment.