mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
Procedures: suggested text from the installation's settings; blanks block adoption
- Insert suggested text for Hosting and network (HTTPS, sign-in mode, password/lockout rules, Docker) and Additional procedures (common Part 91 procedures; electronic-records date filled in), with [bracketed] blanks for what only the owner knows - A revision can't be adopted while a [blank] is left (Markdown links ok) - Generated sections state HTTPS and the sign-in mode from the config Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
90e68711a0
commit
76643de2e7
9 files changed
+145
-9
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
// Fills a textarea with suggested text (asks before replacing what's there).
|
||||
export default class extends Controller {
|
||||
static targets = ["field"]
|
||||
static values = { text: String }
|
||||
|
||||
insert(event) {
|
||||
event.preventDefault()
|
||||
const field = this.fieldTarget
|
||||
if (field.value.trim() && !confirm("Replace what's in the box with the suggested text?")) return
|
||||
field.value = this.textValue
|
||||
field.focus()
|
||||
field.setSelectionRange(0, 0)
|
||||
field.scrollTop = 0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user