Skip to content

Commit

Permalink
Make body field required
Browse files Browse the repository at this point in the history
  • Loading branch information
samliew committed Aug 20, 2024
1 parent 1575c2c commit 293e1f4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Glitch Deploy

# Glitch Project: https://glitch.com/edit/#!/se-timeline
# Get Glitch token: (JSON.parse(localStorage.getItem('cachedUser'))).persistentToken

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"git.ignoreLimitWarning": true,
"eslint.validate": ["javascript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[css]": {
"editor.tabSize": 2,
Expand Down
14 changes: 14 additions & 0 deletions assets/css/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,17 @@ fieldset > legend:first-child {
border: 1px solid #888;
border-radius: 8px;
}

/* TinyMCE Override for required */
.event-editor .w-input:not(:valid) + .tox-tinymce:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-color: #ff0000;
box-shadow: inset 0 0 0 3px #ff0000;
z-index: 100;
pointer-events: none;
}
4 changes: 2 additions & 2 deletions event-editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ <h1 class="main-title">Event Editor</h1>
<input class="w-input" type="text" name="summary" id="summary" maxlength="500">
</div>
<div class="form-row">
<label class="w-label" for="body">Body</label>
<label class="w-label required" for="body">Body</label>
<div class="info">ctrl+click to open links in a new window</div>
<textarea class="w-input" type="text" name="body" id="body" rows="3" class="w-input" style="width: 100%; min-height: 150px; resize: vertical;"></textarea>
<textarea class="w-input" type="text" name="body" id="body" rows="3" class="w-input" style="width: 100%; min-height: 150px; resize: vertical;" required></textarea>
</div>
<fieldset>
<legend class="w-label">Classes</legend>
Expand Down

0 comments on commit 293e1f4

Please sign in to comment.