- Notifications
You must be signed in to change notification settings - Fork908
Adding alert message when send button is clicked#439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
LimSongWei wants to merge52 commits intodwyl:masterChoose a base branch fromLimSongWei:master
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Changes fromall commits
Commits
Show all changes
52 commits Select commitHold shift + click to select a range
0538e1e Adding alert message when send button is clicked
LimSongWeif625fbb Create directory
LimSongWei5ba7ff8 Delete .github directory
LimSongWeib65d01b create directory
LimSongWei8fee8b3 Delete .github directory
LimSongWei732d602 Create directory and yml file
LimSongWeia324095 Update github-actions-demo.yml
LimSongWeid05af7e Update and rename github-actions-demo.yml to learn-github-actions.yml
LimSongWei6ab6200 test
LimSongWeif04a8b7 Update learn-github-actions.yml
LimSongWei1f0e6b5 Update learn-github-actions.yml
LimSongWei240088f Update learn-github-actions.yml
LimSongWeif65673d Update learn-github-actions.yml
LimSongWei2445208 Update learn-github-actions.yml
LimSongWeife46861 Update learn-github-actions.yml
LimSongWeie1c1585 Update learn-github-actions.yml
LimSongWei6bedfdb Update learn-github-actions.yml
LimSongWeicf13d6d Update learn-github-actions.yml
LimSongWei25574bf test2
LimSongWei2abeb01 Update learn-github-actions.yml
LimSongWei749b79a Update learn-github-actions.yml
LimSongWei72e1751 Update learn-github-actions.yml
LimSongWei182c7ff Update learn-github-actions.yml
LimSongWei340c2e9 Update learn-github-actions.yml
LimSongWei8c1f43b Create codacy-analysis.yaml
LimSongWei01b6ae9 Update codacy-analysis.yaml
LimSongWeia46d211 test100
LimSongWeif84c50a Update codacy-analysis.yaml
LimSongWeib65758d Merge pull request #2 from LimSongWei/LimSongWei-patch-1
LimSongWeib2fa93d Rename codacy-analysis.yaml to codacy-static-analysis.yaml
LimSongWei464d5d4 Update and rename learn-github-actions.yml to Zap-Baseline-Scan.yml
LimSongWeic05318a Update Zap-Baseline-Scan.yml
LimSongWeid272a43 Update index.html
cheeyuannn4c5c708 Merge pull request #4 from cheeyuannn/patch-2
DHST79884766269 Update style.css
DHST79880376000 Add background-image
DHST7988d49cc7e Added form-container and background in index
DHST7988541bb00 Update Zap-Baseline-Scan.yml
LimSongWei8c95097 Update codacy-static-analysis.yaml
LimSongWeid297b39 Merge pull request #5 from LimSongWei/Daniel-Heng
DHST7988a454722 Update style.css
DHST79881b7647d Delete background-image.jpg
DHST7988d01c489 Update index.html
DHST79884847a62 Update style.css
DHST7988b9fa177 Add a background image
DHST79883940515 Update index.html
DHST79881ca51f0 Merge pull request #7 from LimSongWei/Daniel-Heng
LimSongWei61c3cfe Johnny
Johnnychuan4d7cb6d Merge pull request #9 from LimSongWei/Johnny-Chuan
LimSongWei2fed86b Update Zap-Baseline-Scan.yml
DHST798809c2ef6 Update codacy-static-analysis.yaml
LimSongWei64cc292 Update Zap-Baseline-Scan.yml
DHST7988File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions.github/workflows/Zap-Baseline-Scan.yml
This file contains hidden or 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,27 @@ | ||
| name: Zap-Baseline-Scan | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - 'Chee-Yuan' | ||
| - 'Daniel-Heng' | ||
| - 'Johnny-Chuan' | ||
| jobs: | ||
| check-vulneabilities: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '14' | ||
| - name: action-git-diff-suggestions | ||
| uses: getsentry/action-git-diff-suggestions@v1 | ||
| - name: ZAP Scan | ||
| uses: zaproxy/action-baseline@v0.7.0 | ||
| with: | ||
| target: 'https://www.zaproxy.org' | ||
34 changes: 34 additions & 0 deletions.github/workflows/codacy-static-analysis.yaml
This file contains hidden or 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,34 @@ | ||
| name: Codacy Static Analysis | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - 'Chee-Yuan' | ||
| - 'Daniel-Heng' | ||
| - 'Johnny-Chuan' | ||
| jobs: | ||
| codacy-static-scan: | ||
| name: Codacy Security Scan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@main | ||
| - name: Run Codacy Analysis CLI | ||
| uses: codacy/codacy-analysis-cli-action@master | ||
| with: | ||
| output: results.sarif | ||
| format: sarif | ||
| # Adjust severity of non-security issues | ||
| gh-code-scanning-compat: true | ||
| # Force 0 exit code to allow SARIF file generation | ||
| # This will handover control about PR rejection to the GitHub side | ||
| max-allowed-issues: 2147483647 | ||
| # Upload the SARIF file generated in the previous step | ||
| - name: Upload SARIF results file | ||
| uses: github/codeql-action/upload-sarif@main | ||
| with: | ||
| sarif_file: results.sarif |
Binary file addedbackground-image.jpg
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddwyl_logo.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 75 additions & 57 deletionsindex.html
This file contains hidden or 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 |
|---|---|---|
| @@ -1,75 +1,93 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta name="description" content="contact form example"> | ||
| <title>Contact Form Example</title> | ||
| </head> | ||
| <body style="background-image: url('background-image.jpg'); background-size: cover;"> | ||
| <div style="display:inline-block; width: 20%"> </div> | ||
| <div class="form-container"> | ||
| <div class="header"> | ||
| <img src="dwyl_logo.png" alt="dwyl_logo" /> | ||
| <h2 class="content-head">ContactUs!</h2> | ||
| </div> | ||
| <aside> | ||
| <p> | ||
| We would <em>love</em> to hear from you! </p> | ||
| <p>Please use the <b><em>Contact Form</em></b> | ||
| to send us a message. | ||
| </p> | ||
| <p></p> | ||
| </aside> | ||
| <!-- START HERE --> | ||
| <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css"> | ||
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> | ||
| <!-- Style The Contact Form How Ever You Prefer --> | ||
| <link rel="stylesheet" href="style.css"> | ||
| <form class="gform pure-form pure-form-stacked" method="POST" data-email="example@email.net" | ||
| action="https://script.google.com/macros/s/AKfycbwMxYDrufp73bKdU8gMvxFDdHRuzcR4IKQUB33B7GqwyfyZS04/exec"> | ||
| <!-- change the form action to your script url --> | ||
| <div class="form-elements"> | ||
| <fieldset class="pure-group"> | ||
| <label for="name">Name: </label> | ||
| <input id="name" name="name" placeholder="WhatyourMom calls you" /> | ||
| </fieldset> | ||
| <fieldset class="pure-group"> | ||
| <label for="message">Message: </label> | ||
| <textarea id="message" name="message" rows="10" placeholder="Tell us what's on your mind..."></textarea> | ||
| </fieldset> | ||
| <fieldset class="pure-group"> | ||
| <label for="email"><em>Your</em> Email Address:</label> | ||
| <input id="email" name="email" type="email" value="" requiredplaceholder="your.name@email.com" /> | ||
| </fieldset> | ||
| <fieldset class="pure-group"> | ||
| <label for="color">Favourite Color:</label> | ||
| <input id="color"name="color" placeholder="green" /> | ||
| </fieldset> | ||
| <fieldset class="pure-group honeypot-field"> | ||
| <label for="honeypot">To help avoid spam, utilize a Honeypot technique with a hidden text field; must be empty | ||
| to submit the form! Otherwise, we assume the user is a spam bot.</label> | ||
| <input id="honeypot" type="text" name="honeypot" value="" /> | ||
| </fieldset> | ||
| <button class="button-success pure-button button-xlarge" onclick="checker()"> | ||
| <i class="fa fa-paper-plane"></i> Send | ||
| <span class="tooltiptext">Press this button after confirming all the information has been filled in | ||
| correctly.</span> | ||
| </button> | ||
| </div> | ||
| <!-- Customise the Thankyou Message People See when they submit the form: --> | ||
| <div class="thankyou_message" style="display:none;"> | ||
| <h2><em>Thanks</em> for contacting us! | ||
| We will get back to you soon!</h2> | ||
| </div> | ||
| </form> | ||
| <!-- Submit the Form to Google Using "AJAX" --> | ||
| <script data-cfasync="false" src="form-submission-handler.js"></script> | ||
| <script> | ||
| function checker() { | ||
| var result = confirm('Are you sure?'); | ||
| if (result = false) { | ||
| event.preventDefault(); | ||
| } | ||
| } | ||
| </script> | ||
| <!-- END --> | ||
| </div> | ||
| </body> | ||
| </html> |
60 changes: 53 additions & 7 deletionsstyle.css
This file contains hidden or 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 |
|---|---|---|
| @@ -1,40 +1,86 @@ | ||
| body { | ||
| margin: 2em; | ||
| background-color: #44545c; | ||
| } | ||
| .header img { | ||
| float: left; | ||
| top: 10px; | ||
| width: 60px; | ||
| height: 60px; | ||
| padding-bottom: 40px; | ||
| } | ||
| aside { | ||
| background: #4dbfa9; | ||
| padding: 0.3em 1em; | ||
| border-radius: 3px; | ||
| color: #fff; | ||
| margin-bottom: 2em; | ||
| } | ||
| textarea { | ||
| width: 100%; | ||
| } | ||
| .content-head { | ||
| font-weight: 400; | ||
| text-transform: uppercase; | ||
| letter-spacing: 0.1em; | ||
| margin: 2em 0 1em; | ||
| } | ||
| .is-center { | ||
| text-align: center; | ||
| } | ||
| .button-success { | ||
| color: white; | ||
| border-radius: 4px; | ||
| text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | ||
| background: rgb(28, 184, 65); | ||
| /* this is a green */ | ||
| } | ||
| .tooltiptext { | ||
| visibility: hidden; | ||
| background-color: #4dbfa9; | ||
| color: #fff; | ||
| text-align: center; | ||
| border-radius: 6px; | ||
| padding: 5px; | ||
| font-size: 15px; | ||
| right: 135px; | ||
| /* Position the tooltip */ | ||
| position: absolute; | ||
| z-index: 1; | ||
| } | ||
| .button-success:hover .tooltiptext { | ||
| visibility: visible; | ||
| } | ||
| .button-xlarge { | ||
| font-size: 125%; | ||
| } | ||
| button { | ||
| float: right; | ||
| } | ||
| #name, | ||
| #email { | ||
| width: 50%; | ||
| } | ||
| .honeypot-field { | ||
| display: none; | ||
| } | ||
| .form-container { | ||
| background: rgba(255, 255, 255, 0.8); | ||
| width: 700px; | ||
| display: inline-block; | ||
| padding: 0px 35px 20px 35px; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.