added contact info support and the code for sending a password reminder
This commit is contained in:
@@ -146,6 +146,20 @@ func (d *Dialog) RenderError(ctxt AmContext, errormessage string) (string, any,
|
||||
return d.Render(ctxt)
|
||||
}
|
||||
|
||||
/* RenderInfo sets up the rendering parameters to send this dialog to the output with an info message.
|
||||
* Parameters:
|
||||
* ctxt - The AmContext for this request.
|
||||
* infoMessage - The info message to be displayed.
|
||||
* Returns:
|
||||
* Command string dictating what to be rendered.
|
||||
* Data as a parameter for the command string.
|
||||
* Standard Go error status.
|
||||
*/
|
||||
func (d *Dialog) RenderInfo(ctxt AmContext, infoMessage string) (string, any, error) {
|
||||
ctxt.VarMap().Set("amsterdam_infoMessage", infoMessage)
|
||||
return d.Render(ctxt)
|
||||
}
|
||||
|
||||
/* LoadFromForm loads the values in a dialog from the form fields in the request.
|
||||
* Parameters:
|
||||
* ctxt - The AmContext for this request.
|
||||
|
||||
@@ -38,6 +38,19 @@
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if isset(amsterdam_infoMessage) }}
|
||||
<!-- Info Message Banner -->
|
||||
<div class="bg-blue-100 border border-blue-400 text-blue-700 px-4 py-3 rounded mb-6 hidden" id="info-banner">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0">
|
||||
<span class="text-blue-500 text-xl">ℹ️</span>
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<p class="text-sm font-medium" id="info-message">{{ amsterdam_infoMessage }}.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="bg-gray-50 p-6 rounded-lg">
|
||||
<div class="space-y-4">
|
||||
|
||||
Reference in New Issue
Block a user