Version 8 #43
|
@ -335,11 +335,10 @@ let view model viewInfo =
|
|||
_title s["List for Next Sunday"].Value ] [
|
||||
icon "update"; rawText " "; locStr s["List for Next Sunday"]
|
||||
]
|
||||
let emailPrompt = s["This will e-mail the current list to every member of your group, without further prompting. Are you sure this is what you are ready to do?"].Value
|
||||
a [ _class "pt-icon-link"
|
||||
_href $"/prayer-requests/email/{dtString}"
|
||||
_title s["Send via E-mail"].Value
|
||||
_onclick $"return PT.requests.view.promptBeforeEmail('{emailPrompt}')" ] [
|
||||
_hxConfirm s["This will e-mail the current list to every member of your group, without further prompting. Are you sure this is what you are ready to do?"].Value ] [
|
||||
icon "mail_outline"; rawText " "; locStr s["Send via E-mail"]
|
||||
]
|
||||
a [ _class "pt-icon-link"; _href "/prayer-requests"; _title s["Maintain Prayer Requests"].Value ] [
|
||||
|
|
|
@ -13,20 +13,6 @@ this.PT = {
|
|||
return false
|
||||
},
|
||||
|
||||
/**
|
||||
* Confirm, then submit a delete action
|
||||
* @param {string} action The URL for the action attribute of the delete form.
|
||||
* @param {string} prompt The localized prompt for confirmation.
|
||||
*/
|
||||
confirmDelete(action, prompt) {
|
||||
if (confirm(prompt)) {
|
||||
let form = document.querySelector("#DeleteForm")
|
||||
form.setAttribute("action", action)
|
||||
form.submit()
|
||||
}
|
||||
return false
|
||||
},
|
||||
|
||||
/**
|
||||
* Make fields required
|
||||
* @param {string[]|string} fields The field(s) to require
|
||||
|
@ -36,14 +22,6 @@ this.PT = {
|
|||
.forEach(f => document.getElementById(f).required = true)
|
||||
},
|
||||
|
||||
/**
|
||||
* Queue an action to occur when the DOM content is loaded
|
||||
* @param {Function} func The function to run once the DOM content is loaded
|
||||
*/
|
||||
onLoad(func) {
|
||||
document.addEventListener("DOMContentLoaded", func)
|
||||
},
|
||||
|
||||
/**
|
||||
* Validation that compares the values of 2 fields and fails if they do not match
|
||||
* @param {string} field1 The ID of the first field
|
||||
|
@ -131,24 +109,6 @@ this.PT = {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Scripts for pages served by the Requests controller
|
||||
*/
|
||||
requests: {
|
||||
/**
|
||||
* Script for the request view page
|
||||
*/
|
||||
view: {
|
||||
/**
|
||||
* Prompt the user to remind them that they are about to e-mail their class
|
||||
* @param {string} confirmationPrompt The text to display to the user
|
||||
*/
|
||||
promptBeforeEmail(confirmationPrompt) {
|
||||
return confirm(confirmationPrompt)
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Scripts for pages served by the SmallGroup controller
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user