-
-
\ No newline at end of file
diff --git a/docs/_layouts/home.html b/docs/_layouts/home.html
deleted file mode 100644
index 2cb3188..0000000
--- a/docs/_layouts/home.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
- {{ page.title }} « PrayerTracker Help / Ayuda de SeguidorOración
-
-
-
-
-
-
- PrayerTracker / SeguidorOración
- Help / Ayuda
-
-
-
-
-
-
{{ page.title }}
-
- {{ content }}
-
-
-
-
\ No newline at end of file
diff --git a/docs/css/help.css b/docs/css/help.css
deleted file mode 100644
index f537ec4..0000000
--- a/docs/css/help.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * PrayerTracker Help styling
- */
-.pt-content {
- background-color: white;
- padding: 0 .25em;
-}
-.pt-title-bar-home {
- height: 2rem;
-}
-.pt-title-bar-left {
- color: white;
- font-size: 1.25rem;
- font-weight: bold;
- margin-left: .5rem;
-}
-.pt-title-bar-right {
- color: white;
- color: rgba(255, 255, 255, .75);
- font-size: 1.1rem;
- font-variant: small-caps;
- margin-right: 1rem;
- align-self: center;
-}
-h2 {
- margin-top: 0;
- padding-left: .5rem;
- border-bottom: solid 1px #444;
-}
-.pt-close-window, .pt-help-index {
- font-size: 1.25rem;
-}
-.pt-help-index {
- display: none;
-}
-@media screen and (min-width:451px) {
- .pt-close-window {
- display: none;
- }
- .pt-help-index {
- display: block;
- }
-}
diff --git a/docs/en/index.md b/docs/en/index.md
deleted file mode 100644
index 7d5486f..0000000
--- a/docs/en/index.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-title: Help
-skip_footer: true
----
-
-Throughout PrayerTracker, you'll see an icon (a question mark in a circle) next to the title on each page. Clicking this will open a new, small window with directions on using that page. If you are looking for a quick overview of PrayerTracker, start with the “Add / Edit a Request” and “Change Preferences” entries.
-
-----
-
-
Help Topics
-
-[Change Preferences](./small-group/preferences.html)
-
-[Send Announcement](./small-group/announcement.html)
-
-[Maintain Group Members](./small-group/members.html)
-
-[Add / Edit a Request](./requests/edit.html)
-
-[Maintain Requests](./requests/maintain.html)
-
-[View Request List](./requests/view.html)
-
-[Log On](./user/log-on.html)
-
-[Change Your Password](./user/password.html)
diff --git a/docs/en/requests/edit.md b/docs/en/requests/edit.md
deleted file mode 100644
index a72a2b9..0000000
--- a/docs/en/requests/edit.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: Add / Edit a Request
----
-
-This page allows you to enter or update a new prayer request.
-
-## Request Type
-
-There are 5 request types in PrayerTracker. “Current Requests” are your regular requests that people may have regarding things happening over the next week or so. “Long-Term Requests” are requests that may occur repeatedly or continue indefinitely. “Praise Reports” are like “Current Requests”, but they are answers to prayer to share with your group. “Expecting” is for those who are pregnant. “Announcements” are like “Current Requests”, but instead of a request, they are simply passing information along about something coming up.
-
-The order above is the order in which the request types appear on the list. “Long-Term Requests” and “Expecting” are not subject to the automatic expiration (set on the “Change Preferences” page) that the other requests are.
-
-## Date
-
-For new requests, this is a box with a calendar date picker. Click or tab into the box to display the calendar, which will be preselected to today's date. For existing requests, there will be a check box labeled “Check to not update the date”. This can be used if you are correcting spelling or punctuation, and do not have an actual update to make to the request.
-
-## Requestor / Subject
-
-For requests or praises, this field is for the name of the person who made the request or offered the praise report. For announcements, this should contain the subject of the announcement. For all types, it is optional; I used to have an announcement with no subject that ran every week, telling where to send requests and updates.
-
-## Expiration
-
-“Expire Normally” means that the request is subject to the expiration days in the group preferences. “Request Never Expires” can be used to make a request never expire (note that this is redundant for “Long-Term Requests” and “Expecting”). If you are editing an existing request, a third option appears. “Expire Immediately” will make the request expire when it is saved. Apart from the icons on the request maintenance page, this is the only way to expire “Long-Term Requests” and “Expecting” requests, but it can be used for any request type.
-
-## Request
-
-This is the text of the request. The editor provides many formatting capabilities, including “Spell Check as you Type” (enabled by default), “Paste from Word”, and “Paste Plain”, as well as “Source” view, if you want to edit the HTML yourself. It also supports undo and redo, and the editor supports full-screen mode. Hover over each icon to see what each button does.
diff --git a/docs/en/requests/maintain.md b/docs/en/requests/maintain.md
deleted file mode 100644
index 8d99872..0000000
--- a/docs/en/requests/maintain.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: Maintain Requests
----
-
-From this page, you can add, edit, and delete your current requests. You can also restore requests that may have expired, but should be made active once again.
-
-## Add a New Request
-
-To add a request, click the icon or text in the center of the page, below the title and above the list of requests for your group.
-
-## Search Requests
-
-If you are looking for a particular requests, enter some text in the search box and click “Search”. PrayerTracker will search the Requestor/Subject and Request Text fields (case-insensitively) of both active and inactive requests. The results will be displayed in the same format as the original Maintain Requests page, so the buttons described below will work the same for those requests as well. They will also be displayed in pages, if there are a lot of results; the number per page is configurable by small group.
-
-## Edit Request
-
-To edit a request, click the pencil icon; it's the first icon under the “Actions” column heading.
-
-## Expire a Request
-
-For active requests, the second icon is an eye with a slash through it; clicking this icon will expire the request immediately. This is equivalent to editing the request, selecting “Expire Immediately”, and saving it.
-
-## Restore an Inactive Request
-
-When the page is first displayed, it does not display inactive requests. However, clicking the link at the bottom of the page will refresh the page with the inactive requests shown. The middle icon will look like an eye; clicking it will restore the request as an active request. The last updated date will be current, and the request is set to expire normally.
-
-## Delete a Request
-
-Deleting a request is contrary to the intent of PrayerTracker, as you can retrieve requests that have expired. However, if there is a request that needs to be deleted, clicking the trash can icon in the “Actions” column will allow you to do it. Use this option carefully, as these deletions cannot be undone; once a request is deleted, it is gone for good.
diff --git a/docs/en/requests/view.md b/docs/en/requests/view.md
deleted file mode 100644
index e405889..0000000
--- a/docs/en/requests/view.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: View Request List
----
-
-From this page, you can view the request list (for today or for the next Sunday), view a printable version of the list, and e-mail the list to the members of your group. (NOTE: If you are logged in as a group member, the only option you will see is to view a printable list.)
-
-## List for Next Sunday
-
-This will modify the date for the list, so it will look like it is currently next Sunday. This can be used, for example, to see what requests will expire, or allow you to print a list with Sunday's date on Saturday evening. Note that this link does not appear if it is Sunday.
-
-## View Printable
-
-Clicking this link will display the list in a format that is suitable for printing; it does not have the normal PrayerTracker header across the top. Once you have clicked the link, you can print it using your browser's standard “Print” functionality.
-
-## Send Via E-mail
-
-Clicking this link will send the list you are currently viewing to your group members. The page will remind you that you are about to do that, and ask for your confirmation. If you proceed, you will see a page that shows to whom the list was sent, and what the list looked like. You may safely use your browser's “Back” button to navigate away from the page.
diff --git a/docs/en/small-group/announcement.md b/docs/en/small-group/announcement.md
deleted file mode 100644
index 57abbe2..0000000
--- a/docs/en/small-group/announcement.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Send Announcement
----
-
-## Announcement Text
-
-This is the text of the announcement you would like to send. It functions the same way as the text box on the [“Edit Request” page](../requests/edit.html#request).
-
-## Add to Request List
-
-Without this box checked, the text of the announcement will only be e-mailed to your group members. If you check this box, however, the text of the announcement will be added to your prayer list under the section you have selected.
diff --git a/docs/en/small-group/members.md b/docs/en/small-group/members.md
deleted file mode 100644
index 99fb20d..0000000
--- a/docs/en/small-group/members.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Maintain Group Members
----
-
-From this page, you can add, edit, and delete the e-mail addresses for your group.
-
-## Add a New Group Member
-
-To add an e-mail address, click the icon or text in the center of the page, below the title and above the list of addresses for your group.
-
-## Edit Group Member
-
-To edit an e-mail address, click the pencil icon; it's the first icon under the “Actions” column heading. This will allow you to update the name and/or the e-mail address for that member.
-
-## Delete a Group Member
-
-To delete an e-mail address, click the trash can icon in the “Actions” column. Note that once an e-mail address has been deleted, it is gone. (Of course, if you delete it in error, you can enter it again using the “Add” instructions above.)
diff --git a/docs/en/small-group/preferences.md b/docs/en/small-group/preferences.md
deleted file mode 100644
index 54c68cd..0000000
--- a/docs/en/small-group/preferences.md
+++ /dev/null
@@ -1,73 +0,0 @@
----
-title: Change Preferences
----
-
-This page allows you to change how your prayer request list looks and behaves. Each section is addressed below.
-
-## Requests Expire After
-
-When a regular request goes this many days without being updated, it expires and no longer appears on the request list. Note that the categories “Long-Term Requests” and “Expecting” never expire automatically.
-
-## Requests “New” For
-
-Requests that have been updated within this many days are identified by a hollow circle for their bullet, as opposed to a filled circle for other requests. All categories respect this setting. If you do a typo correction on a request, if you do not check the box to update the date, this setting will change the bullet. (NOTE: In the plain-text e-mail, new requests are bulleted with a “+” symbol, and old are bulleted with a “-” symbol.)
-
-## Long-Term Requests Alerted for Update
-
-Requests that have not been updated in this many weeks are identified by an italic font on the “Maintain Requests” page, to remind you to seek updates on these requests so that your prayers can stay relevant and current.
-
-## Request Sorting
-
-By default, requests are sorted within each group by the last updated date, with the most recent on top. If you would prefer to have the list sorted by requestor or subject rather than by date, select “Sort by Requestor Name” instead.
-
-## E-mail “From” Name and Address
-
-PrayerTracker must put an name and e-mail address in the “from” position of each e-mail it sends. The default name is “PrayerTracker”, and the default e-mail address is “prayer@djs-consulting.com”. This will work, but any bounced e-mails and out-of-office replies will be sent to that address (which is not even a real address). Changing at least the e-mail address to your address will ensure that you receive these e-mails, and can prune your e-mail list accordingly.
-
-## E-mail Format
-
-This is the default e-mail format for your group. The PrayerTracker default is HTML, which sends the list just as you see it online. However, some e-mail clients may not display this properly, so you can choose to default the email to a plain-text format, which does not have colors, italics, or other formatting. The setting on this page is the group default; you can select a format for each recipient on the “Maintain Group Members” page.
-
-## Colors
-
-You can customize the colors that are used for the headings and lines in your request list. You can select one of the 16 named colors in the drop down lists, or you can “mix your own” using red, green, and blue (RGB) values between 0 and 255. There is a link on the bottom of the page to a color list with more names and their RGB values, if you're really feeling artistic. The background color cannot be changed.
-
-## Fonts for List
-
-There are two options for fonts that will be used in the prayer request list.
-
-* “Native Fonts” uses a list of fonts that will render the prayer requests in the best available font for their device, whether that is a desktop or laptop computer, mobile device, or tablet. (This is the default for new small groups.)
-* “Named Fonts” uses a comma-separated list of fonts that you specify. A warning is good here; just because you have an obscure font and like the way that it looks does not mean that others have that same font. It is generally best to stick with the fonts that come with Windows - fonts like “Arial”, “Times New Roman”, “Tahoma”, and “Comic Sans MS”. You should also end the font list with either “serif” or “sans-serif”, which will use the browser's default serif (like “Times New Roman”) or sans-serif (like “Arial”) font.
-
-## Heading / List Text Size
-
-This is the point size to use for each. The default for the heading is 16pt, and the default for the text is 12pt.
-
-## Making a “Large Print” List
-
-If your group is comprised mostly of people who prefer large print, the following settings will make your list look like the typical large-print publication:
-
-> **Fonts**
-> Named Fonts: "Times New Roman",serif
->
-> **Heading Text Size**
-> 18pt
->
-> **List Text Size**
-> 16pt
-
-## Request List Visibility
-
-The group's request list can be either public, private, or password-protected. Public lists are available without logging in, and private lists are only available online to administrators (though the list can still be sent via e-mail by an administrator). Password-protected lists allow group members to log in and view the current request list online, using the “Group Log On” link and providing this password. As this is a shared password, it is stored in plain text, so you can easily see what it is. If you select “Password Protected” but do not enter a password, the list remains private, which is also the default value. (Changing this password will force all members of the group who logged in with the “Remember Me” box checked to provide the new password.)
-
-## Time Zone
-
-This is the time zone that you would like to use for your group. If you do not see your time zone listed, just [contact Daniel](mailto:daniel@bitbadger.solutions?subject=PrayerTracker%20Time%20Zone) and tell him what time zone you need.
-
-## Page Size
-
-As small groups use PrayerTracker, they accumulate many expired requests. When lists of requests that include expired requests, the results will be broken up into pages. The default value is 100 requests per page, but may be set as low as 10 or as high as 255.
-
-## "As of" Date Display
-
-PrayerTracker can display the last date a request was updated, at the end of the request text. By default, it does not. If you select a short date, it will show "(as of 10/11/2015)" (for October 11, 2015); if you select a long date, it will show "(as of Sunday, October 11, 2015)".
diff --git a/docs/en/user/log-on.md b/docs/en/user/log-on.md
deleted file mode 100644
index b24537d..0000000
--- a/docs/en/user/log-on.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: Log On
----
-
-This page allows you to log on to PrayerTracker. There are two different levels of access for PrayerTracker - user and group.
-
-## User Log On
-
-Enter your e-mail address and password into the appropriate boxes, then select your group. If you want PrayerTracker to remember you on your computer, click the “Remember Me” box before clicking the “Log On” button.
-
-## Group Log On
-
-If your group has defined a password to use to allow you to view their request list online, select your group from the drop down list, then enter the group password into the appropriate box. If you want PrayerTracker to remember your group, click the “Remember Me” box before clicking the “Log On” button.
diff --git a/docs/en/user/password.md b/docs/en/user/password.md
deleted file mode 100644
index 6261f3f..0000000
--- a/docs/en/user/password.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: Change Your Password
----
-
-This page will let you change your password. Enter your existing password in the top box, then enter your new password in the bottom two boxes. Entering your existing password is a security measure; with the “Remember Me” box on the log in page, this will prevent someone else who may be using your computer from being able to simply go to the site and change your password.
-
-"If you cannot remember your existing password, we cannot retrieve it, but we can set it to something known so that you can then change it to your password. [Click here to request help resetting your password](mailto:daniel@bitbadger.solutions?subject=PrayerTracker%20Password%20Help).
diff --git a/docs/es/index.md b/docs/es/index.md
deleted file mode 100644
index 3001c3c..0000000
--- a/docs/es/index.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-title: Ayuda
-skip_footer: true
----
-
-En todo el sistema, verá un icono (un signo de interrogación en un círculo) junto al título de cada página. Al hacer clic en esta opción, se abrirá una nueva y pequeña ventana con instrucciones sobre cómo usar esa página. Si está buscando una descripción rápida de SeguidorOración, comience con las entradas "Agregar / Editar una Petición" y "Cambiar las Preferencias".
-
-----
-
-
Los Temas de Ayuda
-
-[Cambiar las Preferencias](./small-group/preferences.html)
-
-[Enviar un Anuncio](./small-group/announcement.html)
-
-[Mantener los Miembros del Grupo](./small-group/members.html)
-
-[Agregar / Editar una Petición](./requests/edit.html)
-
-[Mantener las Peticiones](./requests/maintain.html)
-
-[Ver la Lista de Peticiones](./requests/view.html)
-
-[Iniciar Sesión](./user/log-on.html)
-
-[Cambiar Su Contraseña](./user/password.html)
diff --git a/docs/es/requests/edit.md b/docs/es/requests/edit.md
deleted file mode 100644
index dc8173c..0000000
--- a/docs/es/requests/edit.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: Agregar / Editar una Petición
----
-
-Esta página le permite introducir o actualizar una petición de oración nueva.
-
-## Tipo de Petición
-
-Hay 5 tipos de peticiones en SeguidorOración. “Peticiones Actuales” son sus peticiones habituales que la gente pueda tener acerca de las cosas que suceden durante la próxima semana o así. “Peticiones a Largo Plazo” son peticiones que pueden ocurrir varias veces, o continuar indefinidamente. “Informes de Alabanza” son como “Peticiones Actuales”, pero son respuestas a la oración para compartir con su grupo. “Embarazada” es para aquellos que están embarazadas. “Anuncios” son como “Peticiones Actuales”, pero en lugar de una petición, simplemente se pasa la información a lo largo de algo por venir.
-
-El orden anterior es el orden en que los tipos de peticiones aparecen en la lista. “Peticiones a Largo Plazo” y “Embarazada” no están sujetos a la caducidad automática (establecida en el “Cambiar las Preferencias” de la página) que las peticiones son otros.
-
-## Fecha
-
-Para nuevas peticiones, se trata de una caja con un selector de fechas del calendario. Haga clic en la pestaña o en la caja para mostrar el calendario, que será preseleccionada para la fecha de hoy. Para peticiones existentes, habrá una casilla de verificación “Seleccionar para no actualizar la fecha”. Esto puede ser usado si corrige la ortografía ni la puntuacion, y no tienen una actualización real de hacer la petición.
-
-## Peticionario / Sujeto
-
-Para las peticiones o alabanzas, este campo es el nombre de la persona que hizo la petición o que ofrece el informe de alabanza. Para los anuncios, este debe contener el objeto del anuncio. Para todos los tipos, es opcional, yo solía tener un anuncio con ningún tema que iba todas las semanas, diciendo a dónde enviar peticiones y actualizaciones.
-
-## Expiración
-
-“Expirará Normalmente” significa que la petición está sujeta a los días de vencimiento de las preferencias del grupo. “Petición no Expira Nunca” se puede utilizar para hacer una petición que no caduque nunca (nótese que esto es redundante para los tipos “Peticiones a Largo Plazo” y “Embarazada”). Si está editando una petición existente, aparece una tercera opción. “Expirará Inmediatamente” hará que la petición expirará cuando se guarda. Aparte de los iconos de la página de mantenimiento de las peticiones, ésta es la única otra forma de expirar peticiones del tipos “Peticiones a Largo Plazo” y “Embarazada”, pero puede ser utilizada para cualquier tipo de petición.
-
-## Petición
-
-Este es el texto de la petición. El editor ofrece muchas capacidades de formato, como "El Corrector Ortográfico al Escribir" (habilitado predeterminado), "Pegar desde Word" y "Pegar sin formato", así como "Código Fuente" punto de vista, si quieres editar el código HTML usted mismo. También es compatible con deshacer y rehacer, y el editor soporta modo de pantalla completa. Pase el ratón sobre cada icono para ver qué hace cada botón.
diff --git a/docs/es/requests/maintain.md b/docs/es/requests/maintain.md
deleted file mode 100644
index 9e78471..0000000
--- a/docs/es/requests/maintain.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: Mantener las Peticiones
----
-
-Desde esta página, usted puede agregar, editar y borrar sus peticiones actuales. También puede restaurar peticiones que han caducado, sino que debe ser activa, una vez más.
-
-## Agregar una Nueva Petición
-
-Para agregar una petición, haga clic en el icono o el texto en el centro de la página, debajo del título y por encima de la lista de peticiones para su grupo.
-
-## Busca las Peticiones
-
-Si está buscando una solicitud en particular, ingrese un texto en el cuadro de búsqueda y haga clic en “Buscar”. SeguidorOración buscará los campos de Solicitante / Asunto y Texto de solicitud (sin distinción de mayúsculas y minúsculas) de solicitudes activas e inactivas. Los resultados se mostrarán en el mismo formato que la página de solicitudes de mantenimiento original, por lo que los botones que se describen a continuación funcionarán igual para esas solicitudes. También se mostrarán en las páginas, si hay muchos resultados; el número por página es configurable por grupos pequeños.
-
-## Editar la Petición
-
-Para editar una petición, haga clic en el icono de lápiz, el primer icono bajo el título de columna “Acciones”.
-
-## Expirar una petición
-
-Para las peticiones activas, el segundo icono es un ojo con una barra a través de él; Si hace clic en este icono, la petición se cancelará inmediatamente. Esto equivale a editar la petición, seleccionar "Expirará Inmediatamente" y guardarla.
-
-## Restaurar una Petición Inactivo
-
-Cuando la página se muestra por primera vez, que no muestra peticiones inactivos. Sin embargo, al hacer clic en el vínculo en la parte inferior de la página se actualizará la página con las peticiones se muestran inactivos. El icono del centro se verá como un ojo; Haciendo clic en él, restaurará la petición como una petición activa. La última fecha actualizada será actual, y la petición se establece para caducar normalmente.
-
-## Eliminar una Petición
-
-Eliminación de una petición es contraria a la intención de SeguidorOración, como se puede recuperar peticiones que han expirado. Sin embargo, si hay una solicitud que debe ser eliminado, haga clic en el icono de la papelera en la columna “Acciones” le permitirá hacerlo. Utilice esta opción con cuidado, ya que estas supresiones no se puede deshacer, una vez a la petición se ha borrado, ha desaparecido para siempre.
\ No newline at end of file
diff --git a/docs/es/requests/view.md b/docs/es/requests/view.md
deleted file mode 100644
index ed5114c..0000000
--- a/docs/es/requests/view.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Ver la Lista de Peticiones
----
-
-Desde esta página, puede ver la lista de peticiones (para hoy o para el próximo Domingo), ver una versión imprimible de la lista, y por correo electrónico la lista de los miembros de su grupo. (NOTA: Si usted está registrado como miembro de la clase, la única opción que se ve es para ver una lista para imprimir.)
-
-## Lista para el Próximo Domingo
-
-Esto modificará la fecha de la lista, por lo que se verá como es en la actualidad el próximo Domingo. Esto puede ser usado, por ejemplo, para ver lo que peticiones de caducidad, ni le permite imprimir una lista con la fecha del Domingo en la noche del Sábado. Tenga en cuenta que este enlace no aparece si es Domingo.
-
-## Versión Imprimible
-
-Hacer clic en este vínculo, se muestra la lista en un formato que sea adecuado para imprimir, sino que no tiene el encabezado normal de SeguidorOración en la parte superior. Una vez que haya hecho clic en el enlace, se puede imprimir con el navegador estándar de “Imprimir” funcionalidad.
-
-## Enviar por correo electrónico
-
-Al hacer clic en este enlace le enviará la lista que está viendo en ese momento a los miembros del grupo. La página te recordará que estás a punto de hacerlo, y pedir su confirmación. Si continúa, usted verá una página que muestra a la que la lista fue enviado, y lo que la lista parecía. Usted puede utilizar con seguridad de su navegador botón “Atrás” para navegar fuera de la página.
diff --git a/docs/es/small-group/announcement.md b/docs/es/small-group/announcement.md
deleted file mode 100644
index bfaeb47..0000000
--- a/docs/es/small-group/announcement.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Enviar un Anuncio
----
-
-## Texto del Anuncio
-
-Este es el texto del anuncio que desea enviar. Funciona de la misma forma que el cuadro de texto en [la página “Editar la Petición”](../requests/edit.html#peticion).
-
-## Agregar a la Lista de Peticiones En
-
-Sin esta caja marcada, el texto del anuncio sólo será por correo electrónico a los miembros del su grupo. Si marca esta caja, sin embargo, el texto del anuncio será añadido a su lista de oración en la sección que ha seleccionado.
diff --git a/docs/es/small-group/members.md b/docs/es/small-group/members.md
deleted file mode 100644
index 50b1fca..0000000
--- a/docs/es/small-group/members.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Mantener los Miembros del Grupo
----
-
-Desde esta página, usted puede agregar, editar y eliminar las direcciones de correo electrónico para su grupo.
-
-## Añadir un Nuevo Miembro del Grupo
-
-Para agregar una dirección de correo electrónico, haga clic en el icono o el texto en el centro de la página, debajo del título y por encima de la lista de direcciones para su grupo.
-
-## Editar el Miembro del Grupo
-
-Para editar una dirección de correo electrónico, haga clic en el icono de lápiz, es el primer icono bajo el título de columna “Acciones”. Esto le permitirá actualizar el nombre y / o la dirección de correo electrónico para ese miembro.
-
-## Eliminar un Miembro del Grupo
-
-Para eliminar una dirección de correo electrónico, haga clic en el icono de la papelera en la columna “Acciones”. Tenga en cuenta que una vez que la dirección de correo electrónico se ha eliminado, se ha ido. (Por supuesto, si usted lo elimine por error, se puede entrar de nuevo utilizando la opción “Agregar” instrucciones de arriba.)
diff --git a/docs/es/small-group/preferences.md b/docs/es/small-group/preferences.md
deleted file mode 100644
index ac3e12a..0000000
--- a/docs/es/small-group/preferences.md
+++ /dev/null
@@ -1,73 +0,0 @@
----
-title: Cambiar las Preferencias
----
-
-Esta página le permite cambiar la forma en que su lista de peticiones de la oración se ve y se comporta. Cada sección se aborda más adelante.
-
-## Peticiones Expiran Después de
-
-Cuando una petición regular va esta cantidad de días sin actualizar, caduca y ya no aparece en la lista de peticiones. Tenga en cuenta que las categorías “Peticiones a Largo Plazo” y “Embarazada” no expirará automáticamente.
-
-## Peticiones “Nuevas” Para
-
-Peticiones que han sido actualizadas dentro de esta cantidad de días se identifican por un círculo hueco para su bala, en oposición a un círculo relleno para otras peticiones. Todas las categorías respetar esta opción. Si usted hace una corrección de errata en una petición, si no marque la caja para actualizar la fecha, este valor va a cambiar la bala. (NOTA: En el texto sin formato de correo electrónico, las nuevas solicitudes se identifican con un símbolo “+”, y pide a los viejos se identifican con un símbolo “-”.)
-
-## Peticiones a Largo Plazo Alertó para la Actualización
-
-Peticiones que no han sido actualizados en esta semana muchos se identifican con un tipo de letra cursiva en la página “Mantener las Peticiones”, para recordarle que debe buscar novedades en estas peticiones para que vuestras oraciones pueden permanecer relevante y actual.
-
-## Orden de Peticiones
-
-De forma predeterminada, las solicitudes se ordenan dentro de cada grupo por la última fecha de actualización, con el más reciente en la parte superior. Si prefiere tener la lista ordenada por el solicitante o el sujeto en vez de por fecha, seleccione “Ordenar por Nombre del Solicitante” en su lugar.
-
-## Correo Electrónico “De” Nombre y Dirección
-
-SeguidorOración debe poner el nombre y la dirección de correo electrónico en el “de” posición de cada correo electrónico que envía. El nombre predeterminado es “PrayerTracker”, y el valor predeterminado dirección de correo electrónico es “prayer@djs-consulting.com”. Esto funciona, pero los mensajes devueltos, y las respuestas de fuera de la oficina serán enviados a esa dirección (que no es ni siquiera una dirección real). Cambiar por lo menos la dirección de correo electrónico a su dirección se asegurará de que usted recibe estos correos electrónicos, y se puede podar su lista de correo electrónico en consecuencia.
-
-## Formato de Correo Electrónico
-
-Este es el valor predeterminado formato de correo electrónico para su grupo. El valor predeterminado de SeguidorOración es HTML, el cual envía la lista al igual que usted lo ve en el sitio. Sin embargo, algunos clientes de correo electrónico no puede mostrar esto correctamente, para que pueda elegir el correo electrónico a un formato de texto plano predeterminadas, que no tiene colores, cursiva, u otro formato. La configuración en esta página es el valor predeterminado del grupo, se puede seleccionar un formato para cada destinatario de la página “Mantener los Miembros del Grupo”.
-
-## Colores
-
-Usted puede personalizar los colores que se utilizan para las partidas y líneas en su lista de peticiones. Puede seleccionar uno de los 16 colores con nombre en las listas desplegables, o puede “mezclar su propia” en colores rojo, verde y azul (RGB) valores entre 0 y 255. Hay un enlace en la parte inferior de la página para una lista de colores con más nombres y sus valores RGB, si realmente estás sintiendo artística. El color de fondo no puede ser cambiado.
-
-## Fuentes de la Lista
-
-Hay dos opciones para las fuentes que se utilizarán en la lista de peticiones de oración.
-
-* “Fuentes Nativas” utiliza una lista de fuentes que representarán las peticiones de oración en la mejor fuente disponible para su dispositivo, ya sea una computadora de escritorio o portátil, un dispositivo móvil o una tableta. (Este es el valor predeterminado para los nuevos grupos pequeños).
-* “Fuentes con Nombre” utiliza una lista de fuentes separadas por comas que usted especifica. Una advertencia de que es bueno aquí, sólo porque usted tiene una fuente oscura y gusta la forma en que se vea no significa que los demás tienen de que la misma fuente. Generalmente es mejor quedarse con las fuentes que vienen con Windows - Fuentes como “Arial”, “Times New Roman”, “Tahoma”, y “Comic Sans MS”. También debe poner fin a la lista de fuentes, ya sea con “serif” o el “sans-serif”, que utilizará el fuente serif predeterminado (como “Times New Roman”) o el fuente sans-serif predeterminado (como “Arial”).
-
-## Tamaño del Texto de Partida y Lista
-
-Este es el tamaño de punto a utilizar para cada uno. El valor predeterminado para el título es 16 puntos, y el valor por defecto para el texto es 12 puntos.
-
-## Realización de una Lista de “Letra Grande”
-
-Si el grupo está compuesta en su mayoría de la gente que prefiere letras grandes, los siguientes ajustes harán que su lista de parecerse a la típica la publicación “Letra Grande”:
-
-> **Fuentes**
-> Fuentes con Nombre: "Times New Roman",serif
->
-> **Partida el Tamaño del Texto**
-> 18pt
->
-> **Lista el Tamaño del Texto**
-> 16pt
-
-## La Visibilidad del la Lista de las Peticiones
-
-La lista de peticiones del grupo puede ser pública, privada o protegida por contraseña. Las listas públicas están disponibles sin iniciar sesión, y listas privadas sólo están disponibles en línea a los administradores (aunque la lista todavía puede ser enviado por correo electrónico por el administrador). Protegidos con contraseña listas permiten miembros del grupo iniciar sesión y ver la lista de peticiones actual en el sito, utilizando el "Iniciar Sesión como Grupo" enlace y proporcionar la contraseña. Como se trata de una contraseña compartida, se almacena en texto plano, así que usted puede ver fácilmente lo que es. Si selecciona "Protegido por Contraseña" pero no introduce una contraseña, la lista sigue siendo privado, que también es el valor predeterminado. (Cambiar esta contraseña obligará a todos los miembros del grupo que se iniciar sesión en el "Acuérdate de Mí" caja marcada para proporcionar la nueva contraseña.)
-
-## Zona Horaria
-
-Esta es la zona horaria que desea utilizar para su clase. Si no puede ver la zona horaria en la lista, ponte en [contacto con Daniel](mailto:daniel@bitbadger.solutions?subject=Zona%20Horaria%20por%20SeguidorOración) y decirle lo que la zona horaria que usted necesita.
-
-## Tamaño de Página
-
-A medida que los grupos pequeños utilizan SeguidorOración, acumulan muchas solicitudes caducadas. Cuando las listas de solicitudes que incluyen solicitudes caducadas, los resultados se dividirán en páginas. El valor predeterminado es de 100 solicitudes por página, pero se puede establecer tan bajo como 10 o tan alto como 255.
-
-## Visualización de la Fecha “Como de”
-
-SeguidorOración puede mostrar la última fecha en que se actualizó una solicitud, al final del texto de solicitud. Por defecto, no lo hace. Si selecciona una fecha corta, se mostrará "(como de 11/10/2015)" (para el 11 de octubre de 2015); si selecciona una fecha larga, se mostrará "(como de domingo, 11 de octubre de 2015)".
\ No newline at end of file
diff --git a/docs/es/user/log-on.md b/docs/es/user/log-on.md
deleted file mode 100644
index 88612f1..0000000
--- a/docs/es/user/log-on.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: Iniciar Sesión
----
-
-Esta página le permite acceder a SeguidorOración. Hay dos diferentes niveles de acceso para SeguidorOración - el usuario y el grupo.
-
-## Iniciar Sesión como Usuario
-
-Introduzca su dirección de correo electrónico y contraseña en las cajas apropiadas y seleccione su grupo. Si desea que SeguidorOración que le recuerde en su ordenador, haga clic en “Acuérdate de Mí” caja antes de pulsar el “Iniciar Sesión” botón.
-
-## Iniciar Sesión como Grupo
-
-Si el grupo se ha definido una contraseña para usar que le permite ver su lista de peticiones en línea, seleccionar el grupo en la lista desplegable y introduzca la contraseña del grupo en la caja correspondiente. Si desea que SeguidorOración recuerde su grupo, haga clic en “Acuérdate de Mí” caja antes de pulsar el “Iniciar Sesión” botón.
diff --git a/docs/es/user/password.md b/docs/es/user/password.md
deleted file mode 100644
index 71f7eeb..0000000
--- a/docs/es/user/password.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: Cambiar Su Contraseña
----
-
-Esta página le permitirá cambiar su contraseña. Ingrese su contraseña actual en la caja superior y introduzca la nueva contraseña en la parte inferior dos cajas. Al entrar su contraseña actual es una medida de seguridad, con el “Acuérdate de Mí” caja de la página inicio de sesión, esto evitará que otra persona que pueda estar usando su computadora de la posibilidad de simplemente ir a el sitio y cambiar la contraseña.
-
-Si no recuerdas tu contraseña actual, no podemos recuperar, pero podemos ponerlo en algo que se conoce de modo que usted puede cambiarlo a su contraseña. [Haga clic aquí para solicitar ayuda para restablecer su contraseña](mailto:daniel@bitbadger.solutions?subject=Ayuda%20de%20Contraseña%20de%20SeguidorOración).
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index 531015a..0000000
--- a/docs/index.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: Help / Ayuda
-layout: home
----
-
-## [English](/en)
-
-## [Español](/es)
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index df2dd06..54fc5b5 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,11 +1,11 @@
net8.0
- 8.3.0.0
- 8.3.0.0
+ 8.4.0.0
+ 8.4.0.0danieljsummersBit Badger Solutions
- 8.3.0
+ 8.4.0Embedded
diff --git a/src/PrayerTracker.Tests/PrayerTracker.Tests.fsproj b/src/PrayerTracker.Tests/PrayerTracker.Tests.fsproj
index 5b9db06..1d93b6b 100644
--- a/src/PrayerTracker.Tests/PrayerTracker.Tests.fsproj
+++ b/src/PrayerTracker.Tests/PrayerTracker.Tests.fsproj
@@ -14,7 +14,7 @@
-
+
diff --git a/src/PrayerTracker.Tests/Program.fs b/src/PrayerTracker.Tests/Program.fs
index fbce67e..2b0e8ff 100644
--- a/src/PrayerTracker.Tests/Program.fs
+++ b/src/PrayerTracker.Tests/Program.fs
@@ -2,4 +2,4 @@
[]
let main argv =
- runTestsInAssembly defaultConfig argv
+ runTestsInAssemblyWithCLIArgs [] argv
diff --git a/src/PrayerTracker.UI/Help.fs b/src/PrayerTracker.UI/Help.fs
new file mode 100644
index 0000000..9271ffa
--- /dev/null
+++ b/src/PrayerTracker.UI/Help.fs
@@ -0,0 +1,300 @@
+/// Help content for PrayerTracker
+module PrayerTracker.Views.Help
+
+open System.IO
+open Giraffe.ViewEngine
+open PrayerTracker.ViewModels
+
+/// The help index page
+let index () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/Index"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [
+ raw l["Throughout PrayerTracker, you'll see an icon (a question mark in a circle) next to the title on each page."]; space
+ raw l["Clicking this will open a new, small window with directions on using that page."]; space
+ raw l["If you are looking for a quick overview of PrayerTracker, start with the “Add / Edit a Request” and “Change Preferences” entries."] ]
+ hr []
+ p [ _class "pt-center-text" ] [ strong [] [ locStr s["Help Topics"] ] ]
+ p [] [ a [ _href "/help/small-group/preferences" ] [ locStr s["Change Preferences"] ] ]
+ p [] [ a [ _href "/help/small-group/announcement" ] [ locStr s["Send Announcement"] ] ]
+ p [] [ a [ _href "/help/small-group/members" ] [ locStr s["Maintain Group Members"] ] ]
+ p [] [ a [ _href "/help/requests/edit" ] [ locStr s["Add / Edit a Request"] ] ]
+ p [] [ a [ _href "/help/requests/maintain" ] [ locStr s["Maintain Requests"] ] ]
+ p [] [ a [ _href "/help/requests/view" ] [ locStr s["View Request List"] ] ]
+ p [] [ a [ _href "/help/user/log-on" ] [ locStr s["Log On"] ] ]
+ p [] [ a [ _href "/help/user/password" ] [ locStr s["Change Your Password"] ] ] ]
+
+
+/// Help for prayer requests
+module Requests =
+
+ /// Add / Edit a Request
+ let edit () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/Requests/Edit"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [ raw l["This page allows you to enter or update a new prayer request."] ]
+ h2 [ _id "request-type" ] [ locStr s["Request Type"] ]
+ p [] [
+ raw l["There are 5 request types in PrayerTracker."]; space
+ raw l["“Current Requests” are your regular requests that people may have regarding things happening over the next week or so."]; space
+ raw l["“Long-Term Requests” are requests that may occur repeatedly or continue indefinitely."]; space
+ raw l["“Praise Reports” are like “Current Requests”, but they are answers to prayer to share with your group."]; space
+ raw l["“Expecting” is for those who are pregnant."]; space
+ raw l["“Announcements” are like “Current Requests”, but instead of a request, they are simply passing information along about something coming up."] ]
+ p [] [
+ raw l["The order above is the order in which the request types appear on the list."]; space
+ raw l["“Long-Term Requests” and “Expecting” are not subject to the automatic expiration (set on the “Change Preferences” page) that the other requests are."] ]
+ h2 [ _id "date" ] [ locStr s["Date"] ]
+ p [] [
+ raw l["For new requests, this is a box with a calendar date picker."]; space
+ raw l["Click or tab into the box to display the calendar, which will be preselected to today's date."]; space
+ raw l["For existing requests, there will be a check box labeled “Check to not update the date”."]; space
+ raw l["This can be used if you are correcting spelling or punctuation, and do not have an actual update to make to the request."]
+ ]
+ h2 [ _id "requestor-subject" ] [ locStr s["Requestor / Subject"] ]
+ p [] [
+ raw l["For requests or praises, this field is for the name of the person who made the request or offered the praise report."]; space
+ raw l["For announcements, this should contain the subject of the announcement."]; space
+ raw l["For all types, it is optional; I used to have an announcement with no subject that ran every week, telling where to send requests and updates."] ]
+ h2 [ _id "expiration" ] [ locStr s["Expiration"] ]
+ p [] [
+ raw l["“Expire Normally” means that the request is subject to the expiration days in the group preferences."]; space
+ raw l["“Request Never Expires” can be used to make a request never expire (note that this is redundant for “Long-Term Requests” and “Expecting”)."]; space
+ raw l["If you are editing an existing request, a third option appears."]; space
+ raw l["“Expire Immediately” will make the request expire when it is saved."]; space
+ raw l["Apart from the icons on the request maintenance page, this is the only way to expire “Long-Term Requests” and “Expecting” requests, but it can be used for any request type."] ]
+ h2 [ _id "request" ] [ locStr s["Request"] ]
+ p [] [
+ raw l["This is the text of the request."]; space
+ raw l["The editor provides many formatting capabilities, including “Spell Check as you Type” (enabled by default), “Paste from Word”, and “Paste Plain”, as well as “Source” view, if you want to edit the HTML yourself."]; space
+ raw l["It also supports undo and redo, and the editor supports full-screen mode. Hover over each icon to see what each button does."] ] ]
+
+ /// Maintain Requests
+ let maintain () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/Requests/Maintain"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [
+ raw l["From this page, you can add, edit, and delete your current requests."]; space
+ raw l["You can also restore requests that may have expired, but should be made active once again."] ]
+ h2 [ _id "add-a-new-request" ] [ locStr s["Add a New Request"] ]
+ p [] [
+ raw l["To add a request, click the icon or text in the center of the page, below the title and above the list of requests for your group."] ]
+ h2 [ _id "search-requests" ] [ locStr s["Search Requests"] ]
+ p [] [
+ raw l["If you are looking for a particular requests, enter some text in the search box and click “Search”."]; space
+ raw l["PrayerTracker will search the Requestor/Subject and Request Text fields (case-insensitively) of both active and inactive requests."]; space
+ raw l["The results will be displayed in the same format as the original Maintain Requests page, so the buttons described below will work the same for those requests as well."]; space
+ raw l["They will also be displayed in pages, if there are a lot of results; the number per page is configurable by small group."] ]
+ h2 [ _id "edit-request" ] [ locStr s["Edit Request"] ]
+ p [] [
+ raw l["To edit a request, click the pencil icon; it's the first icon under the “Actions” column heading."] ]
+ h2 [ _id "expire-a-request" ] [ locStr s["Expire a Request"] ]
+ p [] [
+ raw l["For active requests, the second icon is an eye with a slash through it; clicking this icon will expire the request immediately."]; space
+ raw l["This is equivalent to editing the request, selecting “Expire Immediately”, and saving it."] ]
+ h2 [ _id "restore-an-inactive-request" ] [ locStr s["Restore an Inactive Request"] ]
+ p [] [
+ raw l["When the page is first displayed, it does not display inactive requests."]; space
+ raw l["However, clicking the link at the bottom of the page will refresh the page with the inactive requests shown."]; space
+ raw l["The middle icon will look like an eye; clicking it will restore the request as an active request."]; space
+ raw l["The last updated date will be current, and the request is set to expire normally."] ]
+ h2 [ _id "delete-a-request" ] [ locStr s["Delete a Request"] ]
+ p [] [
+ raw l["Deleting a request is contrary to the intent of PrayerTracker, as you can retrieve requests that have expired."]; space
+ raw l["However, if there is a request that needs to be deleted, clicking the trash can icon in the “Actions” column will allow you to do it."]; space
+ raw l["Use this option carefully, as these deletions cannot be undone; once a request is deleted, it is gone for good."] ] ]
+
+ /// View Request List
+ let view () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/Requests/View"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [
+ raw l["From this page, you can view the request list (for today or for the next Sunday), view a printable version of the list, and e-mail the list to the members of your group."]; space
+ raw l["(NOTE: If you are logged in as a group member, the only option you will see is to view a printable list.)"] ]
+ h2 [ _id "list-for-next-sunday" ] [ locStr s["List for Next Sunday"] ]
+ p [] [
+ raw l["This will modify the date for the list, so it will look like it is currently next Sunday."]; space
+ raw l["This can be used, for example, to see what requests will expire, or allow you to print a list with Sunday's date on Saturday evening."]; space
+ raw l["Note that this link does not appear if it is Sunday."] ]
+ h2 [ _id "view-printable" ] [ locStr s["View Printable"] ]
+ p [] [
+ raw l["Clicking this link will display the list in a format that is suitable for printing; it does not have the normal PrayerTracker header across the top."]; space
+ raw l["Once you have clicked the link, you can print it using your browser's standard “Print” functionality."] ]
+ h2 [ _id "send-via-e-mail" ] [ locStr s["Send via E-mail"] ]
+ p [] [
+ raw l["Clicking this link will send the list you are currently viewing to your group members."]; space
+ raw l["The page will remind you that you are about to do that, and ask for your confirmation."]; space
+ raw l["If you proceed, you will see a page that shows to whom the list was sent, and what the list looked like."]; space
+ raw l["You may safely use your browser's “Back” button to navigate away from the page."] ] ]
+
+
+/// Help for small group pages
+module SmallGroup =
+
+ /// Send an Announcement
+ let announcement () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/SmallGroup/Announcement"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ h2 [ _id "announcement-text" ] [ locStr s["Announcement Text"] ]
+ p [] [
+ raw l["This is the text of the announcement you would like to send."]; space
+ raw l["""It functions the same way as the text box on the “Edit Request” page."""] ]
+ h2 [ _id "add-to-request-list" ] [ locStr s["Add to Request List"] ]
+ p [] [
+ raw l["Without this box checked, the text of the announcement will only be e-mailed to your group members."]; space
+ raw l["If you check this box, however, the text of the announcement will be added to your prayer list under the section you have selected."] ] ]
+
+ /// Maintain Group Members
+ let members () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/SmallGroup/Members"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [ raw l["From this page, you can add, edit, and delete the e-mail addresses for your group."] ]
+ h2 [ _id "add-a-new-group-member" ] [ locStr s["Add a New Group Member"] ]
+ p [] [
+ raw l["To add an e-mail address, click the icon or text in the center of the page, below the title and above the list of addresses for your group."] ]
+ h2 [ _id "edit-group-member" ] [ locStr s["Edit Group Member"] ]
+ p [] [
+ raw l["To edit an e-mail address, click the pencil icon; it's the first icon under the “Actions” column heading."]; space
+ raw l["This will allow you to update the name and/or the e-mail address for that member."] ]
+ h2 [ _id "delete-a-group-member" ] [ locStr s["Delete a Group Member"] ]
+ p [] [
+ raw l["To delete an e-mail address, click the trash can icon in the “Actions” column."]; space
+ raw l["Note that once an e-mail address has been deleted, it is gone."]; space
+ raw l["(Of course, if you delete it in error, you can enter it again using the “Add” instructions above.)"] ] ]
+
+ /// Change Preferences
+ let preferences () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/SmallGroup/Preferences"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [
+ raw l["This page allows you to change how your prayer request list looks and behaves."]; space
+ raw l["Each section is addressed below."] ]
+ h2 [ _id "requests-expire-after" ] [ locStr s["Requests Expire After"] ]
+ p [] [
+ raw l["When a regular request goes this many days without being updated, it expires and no longer appears on the request list."]; space
+ raw l["Note that the categories “Long-Term Requests” and “Expecting” never expire automatically."] ]
+ h2 [ _id "requests-new-for" ] [ locStr s["Requests “New” For"] ]
+ p [] [
+ raw l["Requests that have been updated within this many days are identified by a hollow circle for their bullet, as opposed to a filled circle for other requests."]; space
+ raw l["All categories respect this setting."]; space
+ raw l["If you do a typo correction on a request, if you do not check the box to update the date, this setting will change the bullet."]; space
+ raw l["(NOTE: In the plain-text e-mail, new requests are bulleted with a “+” symbol, and old are bulleted with a “-” symbol.)"] ]
+ h2 [ _id "long-term-requests-alerted-for-update" ] [ locStr s["Long-Term Requests Alerted for Update"] ]
+ p [] [
+ raw l["Requests that have not been updated in this many weeks are identified by an italic font on the “Maintain Requests” page, to remind you to seek updates on these requests so that your prayers can stay relevant and current."] ]
+ h2 [ _id "request-sorting" ] [ locStr s["Request Sorting"] ]
+ p [] [
+ raw l["By default, requests are sorted within each group by the last updated date, with the most recent on top."]; space
+ raw l["If you would prefer to have the list sorted by requestor or subject rather than by date, select “Sort by Requestor Name” instead."] ]
+ h2 [ _id "e-mail-from-name-and-address" ] [ locStr s["E-mail “From” Name and Address"] ]
+ p [] [
+ raw l["PrayerTracker must put an name and e-mail address in the “from” position of each e-mail it sends."]; space
+ raw l["The default name is “PrayerTracker”, and the default e-mail address is “prayer@bitbadger.solutions”."]; space
+ raw l["This will work, but any bounced e-mails and out-of-office replies will be sent to that address (which is not even a real address)."]; space
+ raw l["Changing at least the e-mail address to your address will ensure that you receive these e-mails, and can prune your e-mail list accordingly."] ]
+ h2 [ _id "e-mail-format" ] [ locStr s["E-mail Format"] ]
+ p [] [
+ raw l["This is the default e-mail format for your group."]; space
+ raw l["The PrayerTracker default is HTML, which sends the list just as you see it online."]; space
+ raw l["However, some e-mail clients may not display this properly, so you can choose to default the email to a plain-text format, which does not have colors, italics, or other formatting."]; space
+ raw l["The setting on this page is the group default; you can select a format for each recipient on the “Maintain Group Members” page."] ]
+ h2 [ _id "colors" ] [ locStr s["Colors"] ]
+ p [] [
+ raw l["You can customize the colors that are used for the headings and lines in your request list."]; space
+ raw l["You can select one of the 16 named colors in the drop down lists, or you can “mix your own” using red, green, and blue (RGB) values between 0 and 255."]; space
+ raw l["There is a link on the bottom of the page to a color list with more names and their RGB values, if you're really feeling artistic."]; space
+ raw l["The background color cannot be changed."] ]
+ h2 [ _id "fonts-for-list" ] [ locStr s["Fonts for List"] ]
+ p [] [ raw l["There are two options for fonts that will be used in the prayer request list."] ]
+ ul [] [
+ li [] [
+ raw l["“Native Fonts” uses a list of fonts that will render the prayer requests in the best available font for their device, whether that is a desktop or laptop computer, mobile device, or tablet."]; space
+ raw l["(This is the default for new small groups.)"] ]
+ li [] [
+ raw l["“Named Fonts” uses a comma-separated list of fonts that you specify."]; space
+ raw l["A warning is good here; just because you have an obscure font and like the way that it looks does not mean that others have that same font."]; space
+ raw l["It is generally best to stick with the fonts that come with Windows - fonts like “Arial”, “Times New Roman”, “Tahoma”, and “Comic Sans MS”."]; space
+ raw l["You should also end the font list with either “serif” or “sans-serif”, which will use the browser's default serif (like “Times New Roman”) or sans-serif (like “Arial”) font."] ] ]
+ h2 [ _id "heading-list-text-size" ] [ locStr s["Heading / List Text Size"] ]
+ p [] [
+ raw l["This is the point size to use for each."]; space
+ raw l["The default for the heading is 16pt, and the default for the text is 12pt."] ]
+ h2 [ _id "making-a-large-print-list" ] [ locStr s["Making a “Large Print” List"] ]
+ p [] [
+ raw l["If your group is comprised mostly of people who prefer large print, the following settings will make your list look like the typical large-print publication:"] ]
+ blockquote [] [
+ p [] [ strong [] [ locStr s["Fonts"] ]; br []; raw l["""Named Fonts: "Times New Roman",serif"""] ]
+ p [] [ strong [] [ locStr s["Heading Text Size"] ]; br []; rawText "18pt" ]
+ p [] [ strong [] [ locStr s["List Text Size"] ]; br []; rawText "16pt" ] ]
+ h2 [ _id "request-list-visibility" ] [ locStr s["Request List Visibility"] ]
+ p [] [
+ raw l["The group's request list can be either public, private, or password-protected."]; space
+ raw l["Public lists are available without logging in, and private lists are only available online to administrators (though the list can still be sent via e-mail by an administrator)."]; space
+ raw l["Password-protected lists allow group members to log in and view the current request list online, using the “Group Log On” link and providing this password."]; space
+ raw l["As this is a shared password, it is stored in plain text, so you can easily see what it is."]; space
+ raw l["If you select “Password Protected” but do not enter a password, the list remains private, which is also the default value."]; space
+ raw l["(Changing this password will force all members of the group who logged in with the “Remember Me” box checked to provide the new password.)"] ]
+ h2 [ _id "time-zone" ] [ locStr s["Time Zone"] ]
+ p [] [
+ raw l["This is the time zone that you would like to use for your group."]; space
+ raw l["""If you do not see your time zone listed, just contact Daniel and tell him what time zone you need."""] ]
+ h2 [ _id "page-size" ] [ locStr s["Page Size"] ]
+ p [] [
+ raw l["As small groups use PrayerTracker, they accumulate many expired requests."]; space
+ raw l["When lists of requests include expired requests, the results will be broken up into pages."]; space
+ raw l["The default value is 100 requests per page, but may be set as low as 10 or as high as 255."] ]
+ h2 [ _id "as-of-date-display" ] [ locStr s["“As of” Date Display"] ]
+ p [] [
+ raw l["PrayerTracker can display the last date a request was updated, at the end of the request text."]; space
+ raw l["By default, it does not."]; space
+ raw l["If you select a short date, it will show “(as of 10/11/2015)” (for October 11, 2015); if you select a long date, it will show “(as of Sunday, October 11, 2015)”."] ] ]
+
+/// Help for user pages
+module User =
+
+ /// Log On
+ let logOn () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/User/LogOn"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [
+ raw l["This page allows you to log on to PrayerTracker."]; space
+ raw l["There are two different levels of access for PrayerTracker - user and group."] ]
+ h2 [ _id "user-log-on" ] [ locStr s["User Log On"] ]
+ p [] [
+ raw l["Enter your e-mail address and password into the appropriate boxes, then select your group."]; space
+ raw l["If you want PrayerTracker to remember you on your computer, click the “Remember Me” box before clicking the “Log On” button."] ]
+ h2 [ _id "group-log-on" ] [ locStr s["Group Log On"] ]
+ p [] [
+ raw l["If your group has defined a password to use to allow you to view their request list online, select your group from the drop down list, then enter the group password into the appropriate box."]; space
+ raw l["If you want PrayerTracker to remember your group, click the “Remember Me” box before clicking the “Log On” button."] ] ]
+
+ /// Change Your Password
+ let password () =
+ let s = I18N.localizer.Force()
+ let l = I18N.forView "Help/User/Password"
+ use sw = new StringWriter()
+ let raw = rawLocText sw
+ [ p [] [
+ raw l["This page will let you change your password."]; space
+ raw l["Enter your existing password in the top box, then enter your new password in the bottom two boxes."]; space
+ raw l["Entering your existing password is a security measure; with the “Remember Me” box on the log in page, this will prevent someone else who may be using your computer from being able to simply go to the site and change your password."] ]
+ p [] [
+ raw l["If you cannot remember your existing password, we cannot retrieve it, but we can set it to something known so that you can then change it to your password."]; space
+ a [ _href $"""mailto:daniel@bitbadger.solutions?subject={l["PrayerTracker+Password+Help"].Value}""" ] [
+ raw l["Click here to request help resetting your password."] ] ] ]
diff --git a/src/PrayerTracker.UI/Layout.fs b/src/PrayerTracker.UI/Layout.fs
index e32b3be..583d7d5 100644
--- a/src/PrayerTracker.UI/Layout.fs
+++ b/src/PrayerTracker.UI/Layout.fs
@@ -15,55 +15,42 @@ module Navigation =
/// Top navigation bar
let top m =
- let s = I18N.localizer.Force ()
+ let s = I18N.localizer.Force()
let menuSpacer = rawText " "
let _dropdown = _class "dropdown-btn"
- let leftLinks = [
+ let leftLinks = [
match m.User with
| Some u ->
li [ _class "dropdown" ] [
a [ _dropdown; _ariaLabel s["Requests"].Value; _title s["Requests"].Value; _roleButton ] [
- icon "question_answer"; space; locStr s["Requests"]; space; icon "keyboard_arrow_down"
- ]
+ icon "question_answer"; space; locStr s["Requests"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _roleMenuBar ] [
a [ _href "/prayer-requests"; _roleMenuItem ] [
- icon "compare_arrows"; menuSpacer; locStr s["Maintain"]
- ]
+ icon "compare_arrows"; menuSpacer; locStr s["Maintain"] ]
a [ _href "/prayer-requests/view"; _roleMenuItem ] [
- icon "list"; menuSpacer; locStr s["View List"]
- ]
- ]
- ]
+ icon "list"; menuSpacer; locStr s["View List"] ] ] ]
li [ _class "dropdown" ] [
a [ _dropdown; _ariaLabel s["Group"].Value; _title s["Group"].Value; _roleButton ] [
- icon "group"; space; locStr s["Group"]; space; icon "keyboard_arrow_down"
- ]
+ icon "group"; space; locStr s["Group"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _roleMenuBar ] [
a [ _href "/small-group/members"; _roleMenuItem ] [
- icon "email"; menuSpacer; locStr s["Maintain Group Members"]
- ]
+ icon "email"; menuSpacer; locStr s["Maintain Group Members"] ]
a [ _href "/small-group/announcement"; _roleMenuItem ] [
- icon "send"; menuSpacer; locStr s["Send Announcement"]
- ]
+ icon "send"; menuSpacer; locStr s["Send Announcement"] ]
a [ _href "/small-group/preferences"; _roleMenuItem ] [
- icon "build"; menuSpacer; locStr s["Change Preferences"]
- ]
- ]
- ]
+ icon "build"; menuSpacer; locStr s["Change Preferences"] ] ] ]
if u.IsAdmin then
li [ _class "dropdown" ] [
a [ _dropdown
_ariaLabel s["Administration"].Value
_title s["Administration"].Value
_roleButton ] [
- icon "settings"; space; locStr s["Administration"]; space; icon "keyboard_arrow_down"
- ]
+ icon "settings"; space; locStr s["Administration"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _roleMenuBar ] [
a [ _href "/churches"; _roleMenuItem ] [ icon "home"; menuSpacer; locStr s["Churches"] ]
- a [ _href "/small-groups"; _roleMenuItem ] [ icon "send"; menuSpacer; locStr s["Groups"] ]
- a [ _href "/users"; _roleMenuItem ] [ icon "build"; menuSpacer; locStr s["Users"] ]
- ]
- ]
+ a [ _href "/small-groups"; _roleMenuItem ] [
+ icon "send"; menuSpacer; locStr s["Groups"] ]
+ a [ _href "/users"; _roleMenuItem ] [ icon "build"; menuSpacer; locStr s["Users"] ] ] ]
| None ->
match m.Group with
| Some _ ->
@@ -71,74 +58,50 @@ module Navigation =
a [ _href "/prayer-requests/view"
_ariaLabel s["View Request List"].Value
_title s["View Request List"].Value ] [
- icon "list"; space; locStr s["View Request List"]
- ]
- ]
+ icon "list"; space; locStr s["View Request List"] ] ]
| None ->
li [ _class "dropdown" ] [
a [ _dropdown; _ariaLabel s["Log On"].Value; _title s["Log On"].Value; _roleButton ] [
- icon "security"; space; locStr s["Log On"]; space; icon "keyboard_arrow_down"
- ]
+ icon "security"; space; locStr s["Log On"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _roleMenuBar ] [
a [ _href "/user/log-on"; _roleMenuItem ] [ icon "person"; menuSpacer; locStr s["User"] ]
a [ _href "/small-group/log-on"; _roleMenuItem ] [
- icon "group"; menuSpacer; locStr s["Group"]
- ]
- ]
- ]
+ icon "group"; menuSpacer; locStr s["Group"] ] ] ]
li [] [
a [ _href "/prayer-requests/lists"
_ariaLabel s["View Request List"].Value
_title s["View Request List"].Value ] [
- icon "list"; space; locStr s["View Request List"]
- ]
- ]
+ icon "list"; space; locStr s["View Request List"] ] ]
li [] [
- a [ _href $"https://docs.prayer.bitbadger.solutions/{langCode ()}"
- _ariaLabel s["Help"].Value
- _title s["View Help"].Value
- _target "_blank"
- _relNoOpener ] [
- icon "help"; space; locStr s["Help"]
- ]
- ]
- ]
+ a [ _href "/help"; _ariaLabel s["Help"].Value; _title s["View Help"].Value; _target "_blank" ] [
+ icon "help"; space; locStr s["Help"] ] ] ]
let rightLinks =
match m.Group with
- | Some _ ->
- [ match m.User with
- | Some _ ->
- li [] [
- a [ _href "/user/password"
- _ariaLabel s["Change Your Password"].Value
- _title s["Change Your Password"].Value ] [
- icon "lock"; space; locStr s["Change Your Password"]
- ]
- ]
- | None -> ()
+ | Some _ -> [
+ match m.User with
+ | Some _ ->
li [] [
- a [ _href "/log-off"; _ariaLabel s["Log Off"].Value; _title s["Log Off"].Value; Target.body ] [
- icon "power_settings_new"; space; locStr s["Log Off"]
- ]
- ]
- ]
+ a [ _href "/user/password"
+ _ariaLabel s["Change Your Password"].Value
+ _title s["Change Your Password"].Value ] [
+ icon "lock"; space; locStr s["Change Your Password"] ] ]
+ | None -> ()
+ li [] [
+ a [ _href "/log-off"; _ariaLabel s["Log Off"].Value; _title s["Log Off"].Value; Target.body ] [
+ icon "power_settings_new"; space; locStr s["Log Off"] ] ] ]
| None -> []
header [ _class "pt-title-bar"; Target.content ] [
section [ _class "pt-title-bar-left"; _ariaLabel "Left side of top menu" ] [
span [ _class "pt-title-bar-home" ] [
- a [ _href "/"; _title s["Home"].Value ] [ locStr s["PrayerTracker"] ]
- ]
- ul [] leftLinks
- ]
+ a [ _href "/"; _title s["Home"].Value ] [ locStr s["PrayerTracker"] ] ]
+ ul [] leftLinks ]
section [ _class "pt-title-bar-center"; _ariaLabel "Empty center space in top menu" ] []
section [ _class "pt-title-bar-right"; _roleToolBar; _ariaLabel "Right side of top menu" ] [
- ul [] rightLinks
- ]
- ]
+ ul [] rightLinks ] ]
/// Identity bar (below top nav)
let identity m =
- let s = I18N.localizer.Force ()
+ let s = I18N.localizer.Force()
header [ _id "pt-language"; Target.body ] [
div [] [
span [ _title s["Language"].Value ] [ icon "record_voice_over"; space ]
@@ -150,29 +113,26 @@ module Navigation =
| _ ->
strong [] [ locStr s["English"] ]
rawText " "
- a [ _href "/language/es" ] [ locStr s["Cambie a Español"] ]
- ]
+ a [ _href "/language/es" ] [ locStr s["Cambie a Español"] ] ]
match m.Group with
| Some g ->
- [ match m.User with
- | Some u ->
- span [ _class "u" ] [ locStr s["Currently Logged On"] ]
- rawText " "
- icon "person"
- strong [] [ str u.Name ]
- rawText " "
- | None ->
- locStr s["Logged On as a Member of"]
- rawText " "
- icon "group"
- space
- match m.User with
- | Some _ -> a [ _href "/small-group"; Target.content ] [ strong [] [ str g.Name ] ]
- | None -> strong [] [ str g.Name ]
- ]
+ [ match m.User with
+ | Some u ->
+ span [ _class "u" ] [ locStr s["Currently Logged On"] ]
+ rawText " "
+ icon "person"
+ strong [] [ str u.Name ]
+ rawText " "
+ | None ->
+ locStr s["Logged On as a Member of"]
+ rawText " "
+ icon "group"
+ space
+ match m.User with
+ | Some _ -> a [ _href "/small-group"; Target.content ] [ strong [] [ str g.Name ] ]
+ | None -> strong [] [ str g.Name ] ]
| None -> []
- |> div []
- ]
+ |> div [] ]
/// Content layouts
@@ -193,47 +153,41 @@ let private commonHead = [
meta [ _name "viewport"; _content "width=device-width, initial-scale=1" ]
meta [ _name "generator"; _content "Giraffe" ]
link [ _rel "stylesheet"; _href "https://fonts.googleapis.com/icon?family=Material+Icons" ]
- link [ _rel "stylesheet"; _href "/css/app.css" ]
-]
+ link [ _rel "stylesheet"; _href "/css/app.css" ] ]
/// Render the portion of the page
let private htmlHead viewInfo pgTitle =
- let s = I18N.localizer.Force ()
+ let s = I18N.localizer.Force()
head [] [
meta [ _charset "UTF-8" ]
title [] [ locStr pgTitle; titleSep; locStr s["PrayerTracker"] ]
yield! commonHead
for cssFile in viewInfo.Style do
- link [ _rel "stylesheet"; _href $"/css/{cssFile}.css"; _type "text/css" ]
- ]
+ link [ _rel "stylesheet"; _href $"/css/{cssFile}.css"; _type "text/css" ] ]
open Giraffe.ViewEngine.Htmx
/// Render a link to the help page for the current page
let private helpLink link =
- let s = I18N.localizer.Force ()
+ let s = I18N.localizer.Force()
sup [ _class "pt-help-link" ] [
a [ _href link
_title s["Click for Help on This Page"].Value
_onclick $"return PT.showHelp('{link}')"
- _hxNoBoost ] [
- iconSized 18 "help_outline"
- ]
- ]
+ _hxNoBoost ] [ iconSized 18 "help_outline" ] ]
/// Render the page title, and optionally a help link
let private renderPageTitle viewInfo pgTitle =
h2 [ _id "pt-page-title" ] [
match viewInfo.HelpLink with
- | Some link -> PrayerTracker.Utils.Help.fullLink (langCode ()) link |> helpLink
+ | Some link -> helpLink $"/help/{link}"
| None -> ()
- locStr pgTitle
- ]
+ locStr pgTitle ]
/// Render the messages that may need to be displayed to the user
let private messages viewInfo =
- let s = I18N.localizer.Force ()
+ let s = I18N.localizer.Force()
if List.isEmpty viewInfo.Messages then []
else
viewInfo.Messages
@@ -249,8 +203,7 @@ let private messages viewInfo =
| Some desc ->
br []
div [ _class "description" ] [ rawText desc.Value ]
- | None -> ()
- ])
+ | None -> () ])
|> div [ _class "pt-messages" ]
|> List.singleton
@@ -259,70 +212,61 @@ open NodaTime
/// Render the
", ""
"
", ""
]
- |> List.fold (fun (txt : string) (x, y) -> String.replace x y txt) text
+ |> List.fold (fun (txt: string) (x, y) -> String.replace x y txt) text
|> String.trim
diff --git a/src/PrayerTracker/App.fs b/src/PrayerTracker/App.fs
index 9254290..3d8011b 100644
--- a/src/PrayerTracker/App.fs
+++ b/src/PrayerTracker/App.fs
@@ -3,9 +3,9 @@ namespace PrayerTracker
open Microsoft.AspNetCore.Http
/// Middleware to add the starting ticks for the request
-type RequestStartMiddleware (next : RequestDelegate) =
+type RequestStartMiddleware (next: RequestDelegate) =
- member this.InvokeAsync (ctx : HttpContext) = task {
+ member this.InvokeAsync (ctx: HttpContext) = task {
ctx.Items[Key.startTime] <- ctx.Now
return! next.Invoke ctx
}
@@ -21,7 +21,7 @@ open Microsoft.Extensions.Configuration
module Configure =
/// Set up the configuration for the app
- let configuration (ctx : WebHostBuilderContext) (cfg : IConfigurationBuilder) =
+ let configuration (ctx: WebHostBuilderContext) (cfg: IConfigurationBuilder) =
cfg.SetBasePath(ctx.HostingEnvironment.ContentRootPath)
.AddJsonFile("appsettings.json", optional = true, reloadOnChange = true)
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional = true)
@@ -31,7 +31,7 @@ module Configure =
open Microsoft.AspNetCore.Server.Kestrel.Core
/// Configure Kestrel from appsettings.json
- let kestrel (ctx : WebHostBuilderContext) (opts : KestrelServerOptions) =
+ let kestrel (ctx: WebHostBuilderContext) (opts: KestrelServerOptions) =
(ctx.Configuration.GetSection >> opts.Configure >> ignore) "Kestrel"
open System.Globalization
@@ -46,37 +46,36 @@ module Configure =
/// Configure ASP.NET Core's service collection (dependency injection container)
let services (svc : IServiceCollection) =
- let _ = svc.AddOptions ()
- let _ = svc.AddLocalization (fun options -> options.ResourcesPath <- "Resources")
+ let _ = svc.AddOptions()
+ let _ = svc.AddLocalization(fun options -> options.ResourcesPath <- "Resources")
let _ =
- svc.Configure (fun (opts : RequestLocalizationOptions) ->
- let supportedCultures =[|
+ svc.Configure(fun (opts: RequestLocalizationOptions) ->
+ let supportedCultures = [|
CultureInfo "en-US"; CultureInfo "en-GB"; CultureInfo "en-AU"; CultureInfo "en"
- CultureInfo "es-MX"; CultureInfo "es-ES"; CultureInfo "es"
- |]
- opts.DefaultRequestCulture <- RequestCulture ("en-US", "en-US")
+ CultureInfo "es-MX"; CultureInfo "es-ES"; CultureInfo "es" |]
+ opts.DefaultRequestCulture <- RequestCulture("en-US", "en-US")
opts.SupportedCultures <- supportedCultures
opts.SupportedUICultures <- supportedCultures)
let _ =
svc.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
- .AddCookie (fun opts ->
+ .AddCookie(fun opts ->
opts.ExpireTimeSpan <- TimeSpan.FromMinutes 120.
opts.SlidingExpiration <- true
opts.AccessDeniedPath <- "/error/403")
- let _ = svc.AddAuthorization ()
+ let _ = svc.AddAuthorization()
- let cfg = svc.BuildServiceProvider().GetService ()
- let dsb = NpgsqlDataSourceBuilder (cfg.GetConnectionString "PrayerTracker")
+ let cfg = svc.BuildServiceProvider().GetService()
+ let dsb = NpgsqlDataSourceBuilder(cfg.GetConnectionString "PrayerTracker")
let _ = dsb.UseNodaTime()
- Configuration.useDataSource (dsb.Build ())
+ dsb.Build() |> Configuration.useDataSource
let emailCfg = cfg.GetSection "Email"
if (emailCfg.GetChildren >> Seq.isEmpty >> not) () then ConfigurationBinder.Bind(emailCfg, Email.smtpOptions)
- let _ = svc.AddSingleton ()
- let _ = svc.AddSession ()
- let _ = svc.AddAntiforgery ()
- let _ = svc.AddRouting ()
+ let _ = svc.AddSingleton()
+ let _ = svc.AddSession()
+ let _ = svc.AddAntiforgery()
+ let _ = svc.AddRouting()
let _ = svc.AddSingleton SystemClock.Instance
()
@@ -94,15 +93,26 @@ module Configure =
GET_HEAD [
subRoute "/church" [
route "es" Handlers.Church.maintain
- routef "/%O/edit" Handlers.Church.edit
- ]
+ routef "/%O/edit" Handlers.Church.edit ]
route "/class/logon" (redirectTo true "/small-group/log-on")
routef "/error/%s" Handlers.Home.error
+ subRoute "/help" [
+ route "" Handlers.Help.index
+ subRoute "/requests" [
+ route "/edit" Handlers.Help.Requests.edit
+ route "/maintain" Handlers.Help.Requests.maintain
+ route "/view" Handlers.Help.Requests.view ]
+ subRoute "/small-group" [
+ route "/announcement" Handlers.Help.SmallGroup.announcement
+ route "/members" Handlers.Help.SmallGroup.members
+ route "/preferences" Handlers.Help.SmallGroup.preferences ]
+ subRoute "/user" [
+ route "/log-on" Handlers.Help.User.logOn
+ route "/password" Handlers.Help.User.password ] ]
routef "/language/%s" Handlers.Home.language
subRoute "/legal" [
route "/privacy-policy" Handlers.Home.privacyPolicy
- route "/terms-of-service" Handlers.Home.tos
- ]
+ route "/terms-of-service" Handlers.Home.tos ]
route "/log-off" Handlers.Home.logOff
subRoute "/prayer-request" [
route "s" (Handlers.PrayerRequest.maintain true)
@@ -116,8 +126,7 @@ module Configure =
routef "s/view/%s" (Some >> Handlers.PrayerRequest.view)
routef "/%O/edit" Handlers.PrayerRequest.edit
routef "/%O/expire" Handlers.PrayerRequest.expire
- routef "/%O/restore" Handlers.PrayerRequest.restore
- ]
+ routef "/%O/restore" Handlers.PrayerRequest.restore ]
subRoute "/small-group" [
route "" Handlers.SmallGroup.overview
route "s" Handlers.SmallGroup.maintain
@@ -128,8 +137,7 @@ module Configure =
route "/logon" (redirectTo true "/small-group/log-on")
routef "/member/%O/edit" Handlers.SmallGroup.editMember
route "/members" Handlers.SmallGroup.members
- route "/preferences" Handlers.SmallGroup.preferences
- ]
+ route "/preferences" Handlers.SmallGroup.preferences ]
route "/unauthorized" Handlers.Home.unauthorized
subRoute "/user" [
route "s" Handlers.User.maintain
@@ -137,19 +145,15 @@ module Configure =
routef "/%O/small-groups" Handlers.User.smallGroups
route "/log-on" Handlers.User.logOn
route "/logon" (redirectTo true "/user/log-on")
- route "/password" Handlers.User.password
- ]
- route "/" Handlers.Home.homePage
- ]
+ route "/password" Handlers.User.password ]
+ route "/" Handlers.Home.homePage ]
POST [
subRoute "/church" [
routef "/%O/delete" Handlers.Church.delete
- route "/save" Handlers.Church.save
- ]
+ route "/save" Handlers.Church.save ]
subRoute "/prayer-request" [
routef "/%O/delete" Handlers.PrayerRequest.delete
- route "/save" Handlers.PrayerRequest.save
- ]
+ route "/save" Handlers.PrayerRequest.save ]
subRoute "/small-group" [
route "/announcement/send" Handlers.SmallGroup.sendAnnouncement
routef "/%O/delete" Handlers.SmallGroup.delete
@@ -157,31 +161,27 @@ module Configure =
routef "/member/%O/delete" Handlers.SmallGroup.deleteMember
route "/member/save" Handlers.SmallGroup.saveMember
route "/preferences/save" Handlers.SmallGroup.savePreferences
- route "/save" Handlers.SmallGroup.save
- ]
+ route "/save" Handlers.SmallGroup.save ]
subRoute "/user" [
routef "/%O/delete" Handlers.User.delete
route "/edit/save" Handlers.User.save
route "/log-on" Handlers.User.doLogOn
route "/password/change" Handlers.User.changePassword
- route "/small-groups/save" Handlers.User.saveGroups
- ]
- ]
- ]
+ route "/small-groups/save" Handlers.User.saveGroups ] ] ]
open Microsoft.Extensions.Logging
/// Giraffe error handler
- let errorHandler (ex : exn) (logger : ILogger) =
- logger.LogError (EventId(), ex, "An unhandled exception has occurred while executing the request.")
+ let errorHandler (ex: exn) (logger: ILogger) =
+ logger.LogError(EventId(), ex, "An unhandled exception has occurred while executing the request.")
clearResponse >=> setStatusCode 500 >=> text ex.Message
open Microsoft.Extensions.Hosting
/// Configure logging
- let logging (log : ILoggingBuilder) =
- let env = log.Services.BuildServiceProvider().GetService ()
- if env.IsDevelopment () then log else log.AddFilter (fun l -> l > LogLevel.Information)
+ let logging (log: ILoggingBuilder) =
+ let env = log.Services.BuildServiceProvider().GetService()
+ if env.IsDevelopment() then log else log.AddFilter(fun l -> l > LogLevel.Information)
|> function l -> l.AddConsole().AddDebug()
|> ignore
@@ -191,27 +191,27 @@ module Configure =
/// Configure the application
let app (app : IApplicationBuilder) =
- let env = app.ApplicationServices.GetRequiredService ()
- if env.IsDevelopment () then
- app.UseDeveloperExceptionPage ()
+ let env = app.ApplicationServices.GetRequiredService()
+ if env.IsDevelopment() then
+ app.UseDeveloperExceptionPage()
else
app.UseGiraffeErrorHandler errorHandler
|> ignore
- let _ = app.UseForwardedHeaders ()
- let _ = app.UseCanonicalDomains ()
+ let _ = app.UseForwardedHeaders()
+ let _ = app.UseCanonicalDomains()
let _ = app.UseStatusCodePagesWithReExecute "/error/{0}"
- let _ = app.UseStaticFiles ()
- let _ = app.UseCookiePolicy (CookiePolicyOptions (MinimumSameSitePolicy = SameSiteMode.Strict))
- let _ = app.UseMiddleware ()
- let _ = app.UseRouting ()
- let _ = app.UseSession ()
- let _ = app.UseRequestLocalization
- (app.ApplicationServices.GetService>().Value)
- let _ = app.UseAuthentication ()
- let _ = app.UseAuthorization ()
- let _ = app.UseEndpoints (fun e -> e.MapGiraffeEndpoints routes)
- Views.I18N.setUpFactories <| app.ApplicationServices.GetRequiredService ()
+ let _ = app.UseStaticFiles()
+ let _ = app.UseCookiePolicy(CookiePolicyOptions(MinimumSameSitePolicy = SameSiteMode.Strict))
+ let _ = app.UseMiddleware()
+ let _ = app.UseRouting()
+ let _ = app.UseSession()
+ let _ = app.UseRequestLocalization(
+ app.ApplicationServices.GetService>().Value)
+ let _ = app.UseAuthentication()
+ let _ = app.UseAuthorization()
+ let _ = app.UseEndpoints(fun e -> e.MapGiraffeEndpoints routes)
+ app.ApplicationServices.GetRequiredService() |> Views.I18N.setUpFactories
/// The web application
@@ -221,16 +221,16 @@ module App =
[]
let main args =
- let contentRoot = Directory.GetCurrentDirectory ()
+ let contentRoot = Directory.GetCurrentDirectory()
let app =
WebHostBuilder()
.UseContentRoot(contentRoot)
.ConfigureAppConfiguration(Configure.configuration)
.UseKestrel(Configure.kestrel)
- .UseWebRoot(Path.Combine (contentRoot, "wwwroot"))
+ .UseWebRoot(Path.Combine(contentRoot, "wwwroot"))
.ConfigureServices(Configure.services)
.ConfigureLogging(Configure.logging)
.Configure(System.Action Configure.app)
.Build()
- if args.Length > 0 then printfn $"Unrecognized option {args[0]}" else app.Run ()
+ if args.Length > 0 then printfn $"Unrecognized option {args[0]}" else app.Run()
0
diff --git a/src/PrayerTracker/Church.fs b/src/PrayerTracker/Church.fs
index 7f13810..e3c6978 100644
--- a/src/PrayerTracker/Church.fs
+++ b/src/PrayerTracker/Church.fs
@@ -63,12 +63,12 @@ let save : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next c
match! ctx.TryBindFormAsync () with
| Ok model ->
let! church =
- if model.IsNew then Task.FromResult (Some { Church.empty with Id = (Guid.NewGuid >> ChurchId) () })
+ if model.IsNew then Task.FromResult(Some { Church.empty with Id = (Guid.NewGuid >> ChurchId) () })
else Churches.tryById (idFromShort ChurchId model.ChurchId)
match church with
| Some ch ->
do! Churches.save (model.PopulateChurch ch)
- let act = ctx.Strings[if model.IsNew then "Added" else "Updated"].Value.ToLower ()
+ let act = ctx.Strings[if model.IsNew then "Added" else "Updated"].Value.ToLower()
addInfo ctx ctx.Strings["Successfully {0} church “{1}”", act, model.Name]
return! redirectTo false "/churches" next ctx
| None -> return! fourOhFour ctx
diff --git a/src/PrayerTracker/CommonFunctions.fs b/src/PrayerTracker/CommonFunctions.fs
index 173c803..c0ad350 100644
--- a/src/PrayerTracker/CommonFunctions.fs
+++ b/src/PrayerTracker/CommonFunctions.fs
@@ -5,22 +5,21 @@ module PrayerTracker.Handlers.CommonFunctions
open Microsoft.AspNetCore.Mvc.Rendering
/// Create a select list from an enumeration
-let toSelectList<'T> valFunc textFunc withDefault emptyText (items : 'T seq) =
+let toSelectList<'T> valFunc textFunc withDefault emptyText (items: 'T seq) =
if isNull items then nullArg (nameof items)
- [ match withDefault with
- | true ->
- let s = PrayerTracker.Views.I18N.localizer.Force ()
- SelectListItem ($"""— %A{s[emptyText]} —""", "")
- | _ -> ()
- yield! items |> Seq.map (fun x -> SelectListItem (textFunc x, valFunc x))
- ]
+ [ match withDefault with
+ | true ->
+ let s = PrayerTracker.Views.I18N.localizer.Force()
+ SelectListItem($"""— %A{s[emptyText]} —""", "")
+ | _ -> ()
+ yield! items |> Seq.map (fun x -> SelectListItem(textFunc x, valFunc x)) ]
/// Create a select list from an enumeration
-let toSelectListWithEmpty<'T> valFunc textFunc emptyText (items : 'T seq) =
+let toSelectListWithEmpty<'T> valFunc textFunc emptyText (items: 'T seq) =
toSelectList valFunc textFunc true emptyText items
/// Create a select list from an enumeration
-let toSelectListWithDefault<'T> valFunc textFunc (items : 'T seq) =
+let toSelectListWithDefault<'T> valFunc textFunc (items: 'T seq) =
toSelectList valFunc textFunc true "Select" items
/// The version of PrayerTracker
@@ -49,7 +48,7 @@ open PrayerTracker
open PrayerTracker.ViewModels
/// Create the common view information heading
-let viewInfo (ctx : HttpContext) =
+let viewInfo (ctx: HttpContext) =
let msg =
match ctx.Session.Messages with
| [] -> []
@@ -67,8 +66,7 @@ let viewInfo (ctx : HttpContext) =
RequestStart = ctx.Items[Key.startTime] :?> Instant
User = ctx.Session.CurrentUser
Group = ctx.Session.CurrentGroup
- Layout = layout
- }
+ Layout = layout }
/// The view is the last parameter, so it can be composed
let renderHtml next ctx view =
@@ -77,24 +75,24 @@ let renderHtml next ctx view =
open Microsoft.Extensions.Logging
/// Display an error regarding form submission
-let bindError (msg : string) =
+let bindError (msg: string) =
handleContext (fun ctx ->
ctx.GetService().CreateLogger("PrayerTracker.Handlers").LogError msg
(setStatusCode 400 >=> text msg) earlyReturn ctx)
/// Handler that will return a status code 404 and the text "Not Found"
-let fourOhFour (ctx : HttpContext) =
+let fourOhFour (ctx: HttpContext) =
(setStatusCode 404 >=> text "Not Found") earlyReturn ctx
/// Handler to validate CSRF prevention token
let validateCsrf : HttpHandler = fun next ctx -> task {
- match! (ctx.GetService ()).IsRequestValidAsync ctx with
+ match! ctx.GetService().IsRequestValidAsync ctx with
| true -> return! next ctx
| false -> return! (clearResponse >=> setStatusCode 400 >=> text "Quit hacking...") earlyReturn ctx
}
/// Add a message to the session
-let addUserMessage (ctx : HttpContext) msg =
+let addUserMessage (ctx: HttpContext) msg =
ctx.Session.Messages <- msg :: ctx.Session.Messages
@@ -102,10 +100,10 @@ open Microsoft.AspNetCore.Html
open Microsoft.Extensions.Localization
/// Convert a localized string to an HTML string
-let htmlLocString (x : LocalizedString) =
+let htmlLocString (x: LocalizedString) =
(System.Net.WebUtility.HtmlEncode >> HtmlString) x.Value
-let htmlString (x : LocalizedString) =
+let htmlString (x: LocalizedString) =
HtmlString x.Value
/// Add an error message to the session
@@ -143,8 +141,8 @@ open PrayerTracker.Entities
/// Require one of the given access roles
let requireAccess levels : HttpHandler = fun next ctx -> task {
// These calls fill the user and group in the session, making .Value safe to use for the rest of the request
- let! user = ctx.CurrentUser ()
- let! group = ctx.CurrentGroup ()
+ let! user = ctx.CurrentUser()
+ let! group = ctx.CurrentGroup()
match user, group with
| _, _ when List.contains Public levels -> return! next ctx
| Some _, _ when List.contains User levels -> return! next ctx
@@ -155,7 +153,7 @@ let requireAccess levels : HttpHandler = fun next ctx -> task {
return! redirectTo false "/unauthorized" next ctx
| _, _ when List.contains User levels ->
// Redirect to the user log on page
- ctx.Session.SetString (Key.Session.redirectUrl, ctx.Request.GetEncodedPathAndQuery ())
+ ctx.Session.SetString(Key.Session.redirectUrl, ctx.Request.GetEncodedPathAndQuery())
return! redirectTo false "/user/log-on" next ctx
| _, _ when List.contains Group levels ->
// Redirect to the small group log on page
diff --git a/src/PrayerTracker/Email.fs b/src/PrayerTracker/Email.fs
index 28d190a..27a68b6 100644
--- a/src/PrayerTracker/Email.fs
+++ b/src/PrayerTracker/Email.fs
@@ -8,63 +8,62 @@ open PrayerTracker.Entities
/// Parameters required to send an e-mail
type EmailOptions =
- { /// The SMTP client
- Client : SmtpClient
-
- /// The people who should receive the e-mail
- Recipients : Member list
-
- /// The small group for which this e-mail is being sent
- Group : SmallGroup
-
- /// The subject of the e-mail
- Subject : string
-
- /// The body of the e-mail in HTML
- HtmlBody : string
-
- /// The body of the e-mail in plain text
- PlainTextBody : string
-
- /// Use the current user's preferred language
- Strings : IStringLocalizer
- }
+ { /// The SMTP client
+ Client: SmtpClient
+
+ /// The people who should receive the e-mail
+ Recipients: Member list
+
+ /// The small group for which this e-mail is being sent
+ Group: SmallGroup
+
+ /// The subject of the e-mail
+ Subject: string
+
+ /// The body of the e-mail in HTML
+ HtmlBody: string
+
+ /// The body of the e-mail in plain text
+ PlainTextBody: string
+
+ /// Use the current user's preferred language
+ Strings: IStringLocalizer }
/// Options to use when sending e-mail
type SmtpServerOptions() =
/// The hostname of the SMTP server
- member val SmtpHost : string = "localhost" with get, set
+ member val SmtpHost: string = "localhost" with get, set
/// The port over which SMTP communication should occur
- member val Port : int = 25 with get, set
+ member val Port: int = 25 with get, set
/// Whether to use SSL when communicating with the SMTP server
- member val UseSsl : bool = false with get, set
+ member val UseSsl: bool = false with get, set
/// The authentication to use with the SMTP server
- member val Authentication : string = "" with get, set
+ member val Authentication: string = "" with get, set
/// The e-mail address from which messages should be sent
- member val FromAddress : string = "prayer@bitbadger.solutions" with get, set
+ member val FromAddress: string = "prayer@bitbadger.solutions" with get, set
/// The options for the SMTP server
-let smtpOptions = SmtpServerOptions ()
+let smtpOptions = SmtpServerOptions()
/// Get an SMTP client connection
let getConnection () = task {
- let client = new SmtpClient ()
- do! client.ConnectAsync (smtpOptions.SmtpHost, smtpOptions.Port, smtpOptions.UseSsl)
- do! client.AuthenticateAsync (smtpOptions.FromAddress, smtpOptions.Authentication)
+ let client = new SmtpClient()
+ do! client.ConnectAsync(smtpOptions.SmtpHost, smtpOptions.Port, smtpOptions.UseSsl)
+ do! client.AuthenticateAsync(smtpOptions.FromAddress, smtpOptions.Authentication)
return client
}
/// Create a mail message object, filled with everything but the body content
let createMessage opts =
- let msg = new MimeMessage ()
- msg.From.Add (MailboxAddress (opts.Group.Preferences.EmailFromName, smtpOptions.FromAddress))
+ let msg = new MimeMessage()
+ msg.From.Add(MailboxAddress(opts.Group.Preferences.EmailFromName, smtpOptions.FromAddress))
msg.Subject <- opts.Subject
- msg.ReplyTo.Add (MailboxAddress (opts.Group.Preferences.EmailFromName, opts.Group.Preferences.EmailFromAddress))
+ msg.ReplyTo.Add(MailboxAddress(opts.Group.Preferences.EmailFromName, opts.Group.Preferences.EmailFromAddress))
msg
open MimeKit.Text
@@ -72,31 +71,29 @@ open MimeKit.Text
/// Create an HTML-format e-mail message
let createHtmlMessage opts =
let bodyText =
- [ """"""
- opts.HtmlBody
- """
"""
- opts.Strings["Generated by P R A Y E R T R A C K E R"].Value
- " "
- opts.Strings["from Bit Badger Solutions"].Value
- "
"
- ]
+ [ """"""
+ opts.HtmlBody
+ """
"""
+ opts.Strings["Generated by P R A Y E R T R A C K E R"].Value
+ " "
+ opts.Strings["from Bit Badger Solutions"].Value
+ "
" ]
|> String.concat ""
let msg = createMessage opts
- msg.Body <- new TextPart (TextFormat.Html, Text = bodyText)
+ msg.Body <- new TextPart(TextFormat.Html, Text = bodyText)
msg
/// Create a plain-text-format e-mail message
let createTextMessage opts =
let bodyText =
- [ opts.PlainTextBody
- "\n\n--\n"
- opts.Strings["Generated by P R A Y E R T R A C K E R"].Value
- "\n"
- opts.Strings["from Bit Badger Solutions"].Value
- ]
+ [ opts.PlainTextBody
+ "\n\n--\n"
+ opts.Strings["Generated by P R A Y E R T R A C K E R"].Value
+ "\n"
+ opts.Strings["from Bit Badger Solutions"].Value ]
|> String.concat ""
let msg = createMessage opts
- msg.Body <- new TextPart (TextFormat.Plain, Text = bodyText)
+ msg.Body <- new TextPart(TextFormat.Plain, Text = bodyText)
msg
/// Send e-mails to a class
@@ -105,14 +102,14 @@ let sendEmails opts = task {
use plainTextMsg = createTextMessage opts
for mbr in opts.Recipients do
- let emailTo = MailboxAddress (mbr.Name, mbr.Email)
+ let emailTo = MailboxAddress(mbr.Name, mbr.Email)
match defaultArg mbr.Format opts.Group.Preferences.DefaultEmailType with
| HtmlFormat ->
htmlMsg.To.Add emailTo
let! _ = opts.Client.SendAsync htmlMsg
- htmlMsg.To.Clear ()
+ htmlMsg.To.Clear()
| PlainTextFormat ->
plainTextMsg.To.Add emailTo
let! _ = opts.Client.SendAsync plainTextMsg
- plainTextMsg.To.Clear ()
+ plainTextMsg.To.Clear()
}
diff --git a/src/PrayerTracker/Extensions.fs b/src/PrayerTracker/Extensions.fs
index 7cb69ac..8c50073 100644
--- a/src/PrayerTracker/Extensions.fs
+++ b/src/PrayerTracker/Extensions.fs
@@ -16,19 +16,19 @@ let private jsonSettings = JsonSerializerSettings().ConfigureForNodaTime DateTim
type ISession with
/// Set an object in the session
- member this.SetObject<'T> key (value : 'T) =
- this.SetString (key, JsonConvert.SerializeObject (value, jsonSettings))
+ member this.SetObject<'T> key (value: 'T) =
+ this.SetString(key, JsonConvert.SerializeObject(value, jsonSettings))
/// Get an object from the session
member this.TryGetObject<'T> key =
match this.GetString key with
| null -> None
- | v -> Some (JsonConvert.DeserializeObject<'T> (v, jsonSettings))
+ | v -> Some (JsonConvert.DeserializeObject<'T>(v, jsonSettings))
/// The currently logged on small group
member this.CurrentGroup
with get () = this.TryGetObject Key.Session.currentGroup
- and set (v : SmallGroup option) =
+ and set (v: SmallGroup option) =
match v with
| Some group -> this.SetObject Key.Session.currentGroup group
| None -> this.Remove Key.Session.currentGroup
@@ -36,7 +36,7 @@ type ISession with
/// The currently logged on user
member this.CurrentUser
with get () = this.TryGetObject Key.Session.currentUser
- and set (v : User option) =
+ and set (v: User option) =
match v with
| Some user -> this.SetObject Key.Session.currentUser { user with PasswordHash = "" }
| None -> this.Remove Key.Session.currentUser
@@ -46,7 +46,7 @@ type ISession with
with get () =
this.TryGetObject Key.Session.userMessages
|> Option.defaultValue List.empty
- and set (v : UserMessage list) = this.SetObject Key.Session.userMessages v
+ and set (v: UserMessage list) = this.SetObject Key.Session.userMessages v
open System.Security.Claims
@@ -74,13 +74,13 @@ open Npgsql
type HttpContext with
/// The system clock (via DI)
- member this.Clock = this.GetService ()
+ member this.Clock = this.GetService()
/// The current instant
- member this.Now = this.Clock.GetCurrentInstant ()
+ member this.Now = this.Clock.GetCurrentInstant()
/// The common string localizer
- member _.Strings = Views.I18N.localizer.Force ()
+ member _.Strings = Views.I18N.localizer.Force()
/// The currently logged on small group (sets the value in the session if it is missing)
member this.CurrentGroup () = task {
diff --git a/src/PrayerTracker/Help.fs b/src/PrayerTracker/Help.fs
new file mode 100644
index 0000000..abee381
--- /dev/null
+++ b/src/PrayerTracker/Help.fs
@@ -0,0 +1,86 @@
+/// Handlers for /help routes
+module PrayerTracker.Handlers.Help
+
+open Giraffe
+open PrayerTracker
+
+// GET: /help
+let index : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.index ()
+ |> Views.Layout.help ctx.Strings["Help Index"].Value true
+ |> renderHtml next ctx
+}
+
+/// Handlers for /help/requests routes
+module Requests =
+
+ // GET: /help/requests/edit
+ let edit : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.Requests.edit ()
+ |> Views.Layout.help ctx.Strings["Add / Edit a Request"].Value false
+ |> renderHtml next ctx
+ }
+
+ // GET: /help/requests/maintain
+ let maintain : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.Requests.maintain ()
+ |> Views.Layout.help ctx.Strings["Maintain Requests"].Value false
+ |> renderHtml next ctx
+ }
+
+ // GET: /help/requests/view
+ let view : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.Requests.view ()
+ |> Views.Layout.help ctx.Strings["View Request List"].Value false
+ |> renderHtml next ctx
+ }
+
+/// Handlers for /help/small-group routes
+module SmallGroup =
+
+ // GET: /help/small-group/announcement
+ let announcement : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.SmallGroup.announcement ()
+ |> Views.Layout.help ctx.Strings["Send Announcement"].Value false
+ |> renderHtml next ctx
+ }
+
+ // GET: /help/small-group/members
+ let members : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.SmallGroup.members ()
+ |> Views.Layout.help ctx.Strings["Maintain Group Members"].Value false
+ |> renderHtml next ctx
+ }
+
+ // GET: /help/small-group/members
+ let preferences : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.SmallGroup.preferences ()
+ |> Views.Layout.help ctx.Strings["Change Preferences"].Value false
+ |> renderHtml next ctx
+ }
+
+/// Handlers for /help/user routes
+module User =
+
+ // GET: /help/user/log-on
+ let logOn : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.User.logOn ()
+ |> Views.Layout.help ctx.Strings["Log On"].Value false
+ |> renderHtml next ctx
+ }
+
+ // GET: /help/user/password
+ let password : HttpHandler = fun next ctx -> task {
+ return!
+ Views.Help.User.password ()
+ |> Views.Layout.help ctx.Strings["Change Your Password"].Value false
+ |> renderHtml next ctx
+ }
diff --git a/src/PrayerTracker/Home.fs b/src/PrayerTracker/Home.fs
index 261c48c..cc77185 100644
--- a/src/PrayerTracker/Home.fs
+++ b/src/PrayerTracker/Home.fs
@@ -27,17 +27,17 @@ let language culture : HttpHandler = requireAccess [ AccessLevel.Public ] >=> fu
| ""
| "en" -> "en-US"
| "es" -> "es-MX"
- | _ -> $"{culture}-{culture.ToUpper ()}"
+ | _ -> $"{culture}-{culture.ToUpper()}"
|> (CultureInfo >> Option.ofObj)
with
| :? CultureNotFoundException
| :? ArgumentException -> None
|> function
| Some c ->
- ctx.Response.Cookies.Append (
+ ctx.Response.Cookies.Append(
CookieRequestCultureProvider.DefaultCookieName,
- CookieRequestCultureProvider.MakeCookieValue (RequestCulture c),
- CookieOptions (Expires = Nullable (DateTimeOffset (DateTime.Now.AddYears 1))))
+ CookieRequestCultureProvider.MakeCookieValue(RequestCulture c),
+ CookieOptions(Expires = Nullable(DateTimeOffset(DateTime.Now.AddYears 1))))
| _ -> ()
let url = match string ctx.Request.Headers["Referer"] with null | "" -> "/" | r -> r
redirectTo false url next ctx
@@ -59,7 +59,7 @@ open Microsoft.AspNetCore.Authentication.Cookies
// GET /log-off
let logOff : HttpHandler = requireAccess [ AccessLevel.Public ] >=> fun next ctx -> task {
- ctx.Session.Clear ()
+ ctx.Session.Clear()
do! ctx.SignOutAsync CookieAuthenticationDefaults.AuthenticationScheme
addHtmlInfo ctx ctx.Strings["Log Off Successful • Have a nice day!"]
return! redirectTo false "/" next ctx
diff --git a/src/PrayerTracker/PrayerRequest.fs b/src/PrayerTracker/PrayerRequest.fs
index 732a228..762a348 100644
--- a/src/PrayerTracker/PrayerRequest.fs
+++ b/src/PrayerTracker/PrayerRequest.fs
@@ -8,7 +8,7 @@ open PrayerTracker.Entities
open PrayerTracker.ViewModels
/// Retrieve a prayer request, and ensure that it belongs to the current class
-let private findRequest (ctx : HttpContext) reqId = task {
+let private findRequest (ctx: HttpContext) reqId = task {
match! PrayerRequests.tryById reqId with
| Some req when req.SmallGroupId = ctx.Session.CurrentGroup.Value.Id -> return Ok req
| Some _ ->
@@ -18,31 +18,29 @@ let private findRequest (ctx : HttpContext) reqId = task {
}
/// Generate a list of requests for the given date
-let private generateRequestList (ctx : HttpContext) date = task {
+let private generateRequestList (ctx: HttpContext) date = task {
let group = ctx.Session.CurrentGroup.Value
let listDate = match date with Some d -> d | None -> SmallGroup.localDateNow ctx.Clock group
let! reqs =
PrayerRequests.forGroup
- { SmallGroup = group
- Clock = ctx.Clock
- ListDate = Some listDate
- ActiveOnly = true
- PageNumber = 0
- }
+ { SmallGroup = group
+ Clock = ctx.Clock
+ ListDate = Some listDate
+ ActiveOnly = true
+ PageNumber = 0 }
return
- { Requests = reqs
- Date = listDate
- SmallGroup = group
- ShowHeader = true
- CanEmail = Option.isSome ctx.User.UserId
- Recipients = []
- }
+ { Requests = reqs
+ Date = listDate
+ SmallGroup = group
+ ShowHeader = true
+ CanEmail = Option.isSome ctx.User.UserId
+ Recipients = [] }
}
open NodaTime.Text
/// Parse a string into a date (optionally, of course)
-let private parseListDate (date : string option) =
+let private parseListDate (date: string option) =
match date with
| Some dt -> match LocalDatePattern.Iso.Parse dt with it when it.Success -> Some it.Value | _ -> None
| None -> None
@@ -57,7 +55,7 @@ let edit reqId : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
if requestId.Value = Guid.Empty then
return!
{ viewInfo ctx with HelpLink = Some Help.editRequest }
- |> Views.PrayerRequest.edit EditRequest.empty (now.ToString ("R", null)) ctx
+ |> Views.PrayerRequest.edit EditRequest.empty (now.ToString("R", null)) ctx
|> renderHtml next ctx
else
match! findRequest ctx requestId with
@@ -90,14 +88,13 @@ let email date : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
let! recipients = Members.forGroup group.Id
use! client = Email.getConnection ()
do! Email.sendEmails
- { Client = client
- Recipients = recipients
- Group = group
- Subject = s["Prayer Requests for {0} - {1:MMMM d, yyyy}", group.Name, list.Date].Value
- HtmlBody = list.AsHtml s
- PlainTextBody = list.AsText s
- Strings = s
- }
+ { Client = client
+ Recipients = recipients
+ Group = group
+ Subject = s["Prayer Requests for {0} - {1:MMMM d, yyyy}", group.Name, list.Date].Value
+ HtmlBody = list.AsHtml s
+ PlainTextBody = list.AsText s
+ Strings = s }
do! client.DisconnectAsync true
return!
viewInfo ctx
@@ -122,7 +119,7 @@ let expire reqId : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task
match! findRequest ctx requestId with
| Ok req ->
do! PrayerRequests.updateExpiration { req with Expiration = Forced } false
- addInfo ctx ctx.Strings["Successfully {0} prayer request", ctx.Strings["Expired"].Value.ToLower ()]
+ addInfo ctx ctx.Strings["Successfully {0} prayer request", ctx.Strings["Expired"].Value.ToLower()]
return! redirectTo false "/prayer-requests" next ctx
| Result.Error e -> return! e
}
@@ -133,22 +130,20 @@ let list groupId : HttpHandler = requireAccess [ AccessLevel.Public ] >=> fun ne
| Some group when group.Preferences.IsPublic ->
let! reqs =
PrayerRequests.forGroup
- { SmallGroup = group
- Clock = ctx.Clock
- ListDate = None
- ActiveOnly = true
- PageNumber = 0
- }
+ { SmallGroup = group
+ Clock = ctx.Clock
+ ListDate = None
+ ActiveOnly = true
+ PageNumber = 0 }
return!
viewInfo ctx
|> Views.PrayerRequest.list
- { Requests = reqs
- Date = SmallGroup.localDateNow ctx.Clock group
- SmallGroup = group
- ShowHeader = true
- CanEmail = Option.isSome ctx.User.UserId
- Recipients = []
- }
+ { Requests = reqs
+ Date = SmallGroup.localDateNow ctx.Clock group
+ SmallGroup = group
+ ShowHeader = true
+ CanEmail = Option.isSome ctx.User.UserId
+ Recipients = [] }
|> renderHtml next ctx
| Some _ ->
addError ctx ctx.Strings["The request list for the group you tried to view is not public."]
@@ -182,23 +177,20 @@ let maintain onlyActive : HttpHandler = requireAccess [ User ] >=> fun next ctx
{ MaintainRequests.empty with
Requests = reqs
SearchTerm = Some search
- PageNbr = Some pageNbr
- }
+ PageNbr = Some pageNbr }
| Result.Error _ ->
let! reqs =
PrayerRequests.forGroup
- { SmallGroup = group
- Clock = ctx.Clock
- ListDate = None
- ActiveOnly = onlyActive
- PageNumber = pageNbr
- }
+ { SmallGroup = group
+ Clock = ctx.Clock
+ ListDate = None
+ ActiveOnly = onlyActive
+ PageNumber = pageNbr }
return
{ MaintainRequests.empty with
Requests = reqs
OnlyActive = Some onlyActive
- PageNbr = if onlyActive then None else Some pageNbr
- }
+ PageNbr = if onlyActive then None else Some pageNbr }
}
return!
{ viewInfo ctx with HelpLink = Some Help.maintainRequests }
@@ -229,7 +221,7 @@ open System.Threading.Tasks
// POST /prayer-request/save
let save : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let group = ctx.Session.CurrentGroup.Value
let! req =
@@ -247,7 +239,7 @@ let save : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ct
let updated =
{ pr with
RequestType = PrayerRequestType.fromCode model.RequestType
- Requestor = match model.Requestor with Some x when x.Trim () = "" -> None | x -> x
+ Requestor = match model.Requestor with Some x when x.Trim() = "" -> None | x -> x
Text = ckEditorToText model.Text
Expiration = Expiration.fromCode model.Expiration
}
@@ -262,7 +254,7 @@ let save : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ct
| it -> { it with UpdatedDate = ctx.Now }
do! PrayerRequests.save updated
let act = if model.IsNew then "Added" else "Updated"
- addInfo ctx ctx.Strings["Successfully {0} prayer request", ctx.Strings[act].Value.ToLower ()]
+ addInfo ctx ctx.Strings["Successfully {0} prayer request", ctx.Strings[act].Value.ToLower()]
return! redirectTo false "/prayer-requests" next ctx
| Some _
| None -> return! fourOhFour ctx
diff --git a/src/PrayerTracker/PrayerTracker.fsproj b/src/PrayerTracker/PrayerTracker.fsproj
index 424217f..aa7ea5e 100644
--- a/src/PrayerTracker/PrayerTracker.fsproj
+++ b/src/PrayerTracker/PrayerTracker.fsproj
@@ -16,6 +16,7 @@
+
@@ -25,7 +26,7 @@
-
+
diff --git a/src/PrayerTracker/SmallGroup.fs b/src/PrayerTracker/SmallGroup.fs
index 6fe720a..143df7a 100644
--- a/src/PrayerTracker/SmallGroup.fs
+++ b/src/PrayerTracker/SmallGroup.fs
@@ -97,17 +97,17 @@ open Microsoft.AspNetCore.Authentication.Cookies
// POST /small-group/log-on/submit
let logOnSubmit : HttpHandler = requireAccess [ AccessLevel.Public ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
match! SmallGroups.logOn (idFromShort SmallGroupId model.SmallGroupId) model.Password with
| Some group ->
ctx.Session.CurrentGroup <- Some group
- let identity = ClaimsIdentity (
- Seq.singleton (Claim (ClaimTypes.GroupSid, shortGuid group.Id.Value)),
+ let identity = ClaimsIdentity(
+ Seq.singleton (Claim(ClaimTypes.GroupSid, shortGuid group.Id.Value)),
CookieAuthenticationDefaults.AuthenticationScheme)
- do! ctx.SignInAsync (
+ do! ctx.SignInAsync(
identity.AuthenticationType, ClaimsPrincipal identity,
- AuthenticationProperties (
+ AuthenticationProperties(
IssuedUtc = DateTimeOffset.UtcNow,
IsPersistent = defaultArg model.RememberMe false))
addInfo ctx ctx.Strings["Log On Successful • Welcome to {0}", ctx.Strings["PrayerTracker"]]
@@ -142,29 +142,26 @@ let members : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
let overview : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
let group = ctx.Session.CurrentGroup.Value
let! reqs = PrayerRequests.forGroup
- { SmallGroup = group
- Clock = ctx.Clock
- ListDate = None
- ActiveOnly = true
- PageNumber = 0
- }
+ { SmallGroup = group
+ Clock = ctx.Clock
+ ListDate = None
+ ActiveOnly = true
+ PageNumber = 0 }
let! reqCount = PrayerRequests.countByGroup group.Id
let! mbrCount = Members.countByGroup group.Id
let! admins = Users.listByGroupId group.Id
let model =
- { TotalActiveReqs = List.length reqs
- AllReqs = reqCount
- TotalMembers = mbrCount
- ActiveReqsByType = (
- reqs
- |> Seq.ofList
- |> Seq.map (fun req -> req.RequestType)
- |> Seq.distinct
- |> Seq.map (fun reqType ->
- reqType, reqs |> List.filter (fun r -> r.RequestType = reqType) |> List.length)
- |> Map.ofSeq)
- Admins = admins
- }
+ { TotalActiveReqs = List.length reqs
+ AllReqs = reqCount
+ TotalMembers = mbrCount
+ ActiveReqsByType = (
+ reqs
+ |> Seq.ofList
+ |> Seq.map (fun req -> req.RequestType)
+ |> Seq.distinct
+ |> Seq.map (fun reqType -> reqType, reqs |> List.filter (fun r -> r.RequestType = reqType) |> List.length)
+ |> Map.ofSeq)
+ Admins = admins }
return!
viewInfo ctx
|> Views.SmallGroup.overview model
@@ -183,15 +180,15 @@ open System.Threading.Tasks
// POST /small-group/save
let save : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let! tryGroup =
- if model.IsNew then Task.FromResult (Some { SmallGroup.empty with Id = (Guid.NewGuid >> SmallGroupId) () })
+ if model.IsNew then Task.FromResult(Some { SmallGroup.empty with Id = (Guid.NewGuid >> SmallGroupId) () })
else SmallGroups.tryById (idFromShort SmallGroupId model.SmallGroupId)
match tryGroup with
| Some group ->
do! SmallGroups.save (model.populateGroup group) model.IsNew
- let act = ctx.Strings[if model.IsNew then "Added" else "Updated"].Value.ToLower ()
+ let act = ctx.Strings[if model.IsNew then "Added" else "Updated"].Value.ToLower()
addHtmlInfo ctx ctx.Strings["Successfully {0} group “{1}”", act, model.Name]
return! redirectTo false "/small-groups" next ctx
| None -> return! fourOhFour ctx
@@ -200,12 +197,12 @@ let save : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next c
// POST /small-group/member/save
let saveMember : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let group = ctx.Session.CurrentGroup.Value
let! tryMbr =
if model.IsNew then
- Task.FromResult (Some { Member.empty with Id = (Guid.NewGuid >> MemberId) (); SmallGroupId = group.Id })
+ Task.FromResult(Some { Member.empty with Id = (Guid.NewGuid >> MemberId) (); SmallGroupId = group.Id })
else Members.tryById (idFromShort MemberId model.MemberId)
match tryMbr with
| Some mbr when mbr.SmallGroupId = group.Id ->
@@ -213,9 +210,8 @@ let saveMember : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun n
{ mbr with
Name = model.Name
Email = model.Email
- Format = String.noneIfBlank model.Format |> Option.map EmailFormat.fromCode
- }
- let act = ctx.Strings[if model.IsNew then "Added" else "Updated"].Value.ToLower ()
+ Format = String.noneIfBlank model.Format |> Option.map EmailFormat.fromCode }
+ let act = ctx.Strings[if model.IsNew then "Added" else "Updated"].Value.ToLower()
addInfo ctx ctx.Strings["Successfully {0} group member", act]
return! redirectTo false "/small-group/members" next ctx
| Some _
@@ -225,7 +221,7 @@ let saveMember : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun n
// POST /small-group/preferences/save
let savePreferences : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
// Since the class is stored in the session, we'll use an intermediate instance to persist it; once that works,
// we can repopulate the session instance. That way, if the update fails, the page should still show the
@@ -249,7 +245,7 @@ open Microsoft.Extensions.Configuration
// POST /small-group/announcement/send
let sendAnnouncement : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let group = ctx.Session.CurrentGroup.Value
let pref = group.Preferences
@@ -271,15 +267,14 @@ let sendAnnouncement : HttpHandler = requireAccess [ User ] >=> validateCsrf >=>
}
use! client = Email.getConnection ()
do! Email.sendEmails
- { Client = client
- Recipients = recipients
- Group = group
- Subject = s["Announcement for {0} - {1:MMMM d, yyyy} {2}", group.Name, now.Date,
- (now.ToString ("h:mm tt", null)).ToLower ()].Value
- HtmlBody = htmlText
- PlainTextBody = plainText
- Strings = s
- }
+ { Client = client
+ Recipients = recipients
+ Group = group
+ Subject = s["Announcement for {0} - {1:MMMM d, yyyy} {2}", group.Name, now.Date,
+ now.ToString("h:mm tt", null).ToLower()].Value
+ HtmlBody = htmlText
+ PlainTextBody = plainText
+ Strings = s }
do! client.DisconnectAsync true
// Add to the request list if desired
match model.SendToClass, model.AddToRequestList with
@@ -296,12 +291,11 @@ let sendAnnouncement : HttpHandler = requireAccess [ User ] >=> validateCsrf >=>
RequestType = (Option.get >> PrayerRequestType.fromCode) model.RequestType
Text = requestText
EnteredDate = now.Date.AtStartOfDayInZone(zone).ToInstant()
- UpdatedDate = now.InZoneLeniently(zone).ToInstant()
- }
+ UpdatedDate = now.InZoneLeniently(zone).ToInstant() }
// Tell 'em what they've won, Johnny!
let toWhom =
if model.SendToClass = "N" then s["{0} users", s["PrayerTracker"]].Value
- else s["Group Members"].Value.ToLower ()
+ else s["Group Members"].Value.ToLower()
let andAdded = match model.AddToRequestList with Some x when x -> "and added it to the request list" | _ -> ""
addInfo ctx s["Successfully sent announcement to all {0} {1}", toWhom, s[andAdded]]
return!
diff --git a/src/PrayerTracker/User.fs b/src/PrayerTracker/User.fs
index f3828eb..7e16833 100644
--- a/src/PrayerTracker/User.fs
+++ b/src/PrayerTracker/User.fs
@@ -19,10 +19,10 @@ module Hashing =
open System.Text
/// Custom password hasher used to verify and upgrade old password hashes
- type PrayerTrackerPasswordHasher () =
- inherit PasswordHasher ()
+ type PrayerTrackerPasswordHasher() =
+ inherit PasswordHasher()
- override this.VerifyHashedPassword (user, hashedPassword, providedPassword) =
+ override this.VerifyHashedPassword(user, hashedPassword, providedPassword) =
if isNull hashedPassword then nullArg (nameof hashedPassword)
if isNull providedPassword then nullArg (nameof providedPassword)
@@ -43,7 +43,7 @@ module Hashing =
| 254uy ->
// v1 hashes - SHA-1
let v1Hash =
- use alg = SHA1.Create ()
+ use alg = SHA1.Create()
alg.ComputeHash (Encoding.ASCII.GetBytes providedPassword)
|> Seq.map (fun byt -> byt.ToString "x2")
|> String.concat ""
@@ -51,18 +51,18 @@ module Hashing =
PasswordVerificationResult.SuccessRehashNeeded
else
PasswordVerificationResult.Failed
- | _ -> base.VerifyHashedPassword (user, hashedPassword, providedPassword)
+ | _ -> base.VerifyHashedPassword(user, hashedPassword, providedPassword)
/// Retrieve a user from the database by password, upgrading password hashes if required
let private findUserByPassword model = task {
match! Users.tryByEmailAndGroup model.Email (idFromShort SmallGroupId model.SmallGroupId) with
| Some user ->
- let hasher = PrayerTrackerPasswordHasher ()
- match hasher.VerifyHashedPassword (user, user.PasswordHash, model.Password) with
+ let hasher = PrayerTrackerPasswordHasher()
+ match hasher.VerifyHashedPassword(user, user.PasswordHash, model.Password) with
| PasswordVerificationResult.Success -> return Some user
| PasswordVerificationResult.SuccessRehashNeeded ->
- let upgraded = { user with PasswordHash = hasher.HashPassword (user, model.Password) }
+ let upgraded = { user with PasswordHash = hasher.HashPassword(user, model.Password) }
do! Users.updatePassword upgraded
return Some upgraded
| _ -> return None
@@ -78,14 +78,14 @@ let sanitizeUrl providedUrl defaultUrl =
// POST /user/password/change
let changePassword : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let curUsr = ctx.Session.CurrentUser.Value
- let hasher = PrayerTrackerPasswordHasher ()
+ let hasher = PrayerTrackerPasswordHasher()
let! user = task {
match! Users.tryById curUsr.Id with
| Some usr ->
- if hasher.VerifyHashedPassword (usr, usr.PasswordHash, model.OldPassword)
+ if hasher.VerifyHashedPassword(usr, usr.PasswordHash, model.OldPassword)
= PasswordVerificationResult.Success then
return Some usr
else return None
@@ -93,7 +93,7 @@ let changePassword : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> f
}
match user with
| Some usr when model.NewPassword = model.NewPasswordConfirm ->
- do! Users.updatePassword { usr with PasswordHash = hasher.HashPassword (usr, model.NewPassword) }
+ do! Users.updatePassword { usr with PasswordHash = hasher.HashPassword(usr, model.NewPassword) }
addInfo ctx ctx.Strings["Your password was changed successfully"]
return! redirectTo false "/" next ctx
| Some _ ->
@@ -124,7 +124,7 @@ open Microsoft.AspNetCore.Html
// POST /user/log-on
let doLogOn : HttpHandler = requireAccess [ AccessLevel.Public ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let s = ctx.Strings
match! findUserByPassword model with
@@ -133,14 +133,14 @@ let doLogOn : HttpHandler = requireAccess [ AccessLevel.Public ] >=> validateCsr
| Some group ->
ctx.Session.CurrentUser <- Some user
ctx.Session.CurrentGroup <- Some group
- let identity = ClaimsIdentity (
+ let identity = ClaimsIdentity(
seq {
- Claim (ClaimTypes.NameIdentifier, shortGuid user.Id.Value)
- Claim (ClaimTypes.GroupSid, shortGuid group.Id.Value)
+ Claim(ClaimTypes.NameIdentifier, shortGuid user.Id.Value)
+ Claim(ClaimTypes.GroupSid, shortGuid group.Id.Value)
}, CookieAuthenticationDefaults.AuthenticationScheme)
- do! ctx.SignInAsync (
+ do! ctx.SignInAsync(
identity.AuthenticationType, ClaimsPrincipal identity,
- AuthenticationProperties (
+ AuthenticationProperties(
IssuedUtc = DateTimeOffset.UtcNow,
IsPersistent = defaultArg model.RememberMe false))
do! Users.updateLastSeen user.Id ctx.Now
@@ -152,14 +152,12 @@ let doLogOn : HttpHandler = requireAccess [ AccessLevel.Public ] >=> validateCsr
Text = htmlLocString s["Invalid credentials - log on unsuccessful"]
Description =
let detail =
- [ "This is likely due to one of the following reasons:
"
- "
The e-mail address “{0}” is invalid.
"
- "
The password entered does not match the password for the given e-mail address.
"
- "
You are not authorized to administer the selected group.
"
- ]
+ [ "This is likely due to one of the following reasons:
"
+ "
The e-mail address “{0}” is invalid.
"
+ "
The password entered does not match the password for the given e-mail address.
"
+ "
You are not authorized to administer the selected group.
" ]
|> String.concat ""
- Some (HtmlString (s[detail, WebUtility.HtmlEncode model.Email].Value))
- }
+ Some (HtmlString(s[detail, WebUtility.HtmlEncode model.Email].Value)) }
|> addUserMessage ctx
return! redirectTo false "/user/log-on" next ctx
| Result.Error e -> return! bindError e next ctx
@@ -217,15 +215,15 @@ open System.Threading.Tasks
// POST /user/save
let save : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
let! user =
- if model.IsNew then Task.FromResult (Some { User.empty with Id = (Guid.NewGuid >> UserId) () })
+ if model.IsNew then Task.FromResult(Some { User.empty with Id = (Guid.NewGuid >> UserId) () })
else Users.tryById (idFromShort UserId model.UserId)
match user with
| Some usr ->
- let hasher = PrayerTrackerPasswordHasher ()
- let updatedUser = model.PopulateUser usr (fun pw -> hasher.HashPassword (usr, pw))
+ let hasher = PrayerTrackerPasswordHasher()
+ let updatedUser = model.PopulateUser usr (fun pw -> hasher.HashPassword(usr, pw))
do! Users.save updatedUser
let s = ctx.Strings
if model.IsNew then
@@ -235,8 +233,7 @@ let save : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next c
Description =
h s["Please select at least one group for which this user ({0}) is authorized",
updatedUser.Name]
- |> Some
- }
+ |> Some }
|> addUserMessage ctx
return! redirectTo false $"/user/{shortGuid usr.Id.Value}/small-groups" next ctx
else
@@ -248,7 +245,7 @@ let save : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next c
// POST /user/small-groups/save
let saveGroups : HttpHandler = requireAccess [ Admin ] >=> validateCsrf >=> fun next ctx -> task {
- match! ctx.TryBindFormAsync () with
+ match! ctx.TryBindFormAsync() with
| Ok model ->
match Seq.length model.SmallGroups with
| 0 ->
diff --git a/src/PrayerTracker/wwwroot/css/help.css b/src/PrayerTracker/wwwroot/css/help.css
index b8501f9..f537ec4 100644
--- a/src/PrayerTracker/wwwroot/css/help.css
+++ b/src/PrayerTracker/wwwroot/css/help.css
@@ -5,6 +5,9 @@
background-color: white;
padding: 0 .25em;
}
+.pt-title-bar-home {
+ height: 2rem;
+}
.pt-title-bar-left {
color: white;
font-size: 1.25rem;
@@ -17,9 +20,24 @@
font-size: 1.1rem;
font-variant: small-caps;
margin-right: 1rem;
+ align-self: center;
}
h2 {
margin-top: 0;
padding-left: .5rem;
border-bottom: solid 1px #444;
}
+.pt-close-window, .pt-help-index {
+ font-size: 1.25rem;
+}
+.pt-help-index {
+ display: none;
+}
+@media screen and (min-width:451px) {
+ .pt-close-window {
+ display: none;
+ }
+ .pt-help-index {
+ display: block;
+ }
+}