Added JS confirmation for deleting wiki pages.
Documented need for JS confirmation and escaping template variables to the gotchas file.
This commit is contained in:
parent
e5ea16e1d2
commit
824b7a4545
6 changed files with 45 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
|||
- fixed corner case which causes the user profile to not load in cases where
|
||||
custom forms do not work or are broken. It now skips these and throws a
|
||||
warning
|
||||
- fix: Added javascript confirmation for deleting wiki pages.
|
||||
|
||||
|
||||
7.3.4
|
||||
|
|
|
|||
|
|
@ -7,6 +7,17 @@ upgrading from one version to the next, or even between multiple
|
|||
versions. Be sure to heed the warnings contained herein as they will
|
||||
save you many hours of grief.
|
||||
|
||||
7.3.5
|
||||
--------------------------------------------------------------------
|
||||
* Template variables used in templates that use XML, or that are used
|
||||
inside of Javascript need to be escaped to make quotes and other
|
||||
characters safe. This can be done by appending ESCAPE="HTML" or
|
||||
ESCAPE="JS" to the tmpl_var tag. Examples were added to the
|
||||
Template Language help page.
|
||||
|
||||
* A javascript confirmation was added to the default Edit Wiki Page
|
||||
template. It will need to be manually added to custom templates.
|
||||
|
||||
7.3.2
|
||||
--------------------------------------------------------------------
|
||||
* The testCodebase.pl script will now automatically set the CODE_COP
|
||||
|
|
|
|||
24
docs/upgrades/templates-7.3.5/wiki-page.tmpl
Normal file
24
docs/upgrades/templates-7.3.5/wiki-page.tmpl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#WikiPageEditTmpl000001
|
||||
<tmpl_var formHeader>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td><label for="title_formId"><tmpl_var titleLabel></label></td><td><tmpl_var formTitle></td></tr>
|
||||
<tr><td><label for="content_formId"><tmpl_var contentLabel></label></td><td><tmpl_var formContent></td></tr>
|
||||
<tmpl_if canAdminister>
|
||||
<tr><td><label for="isProtected_formId"><tmpl_var protectQuestionLabel></label></td><td><tmpl_var formProtect></td></tr>
|
||||
</tmpl_if>
|
||||
<tmpl_if allowsAttachments>
|
||||
<tr><td><label for="storageId_formId"><tmpl_var attachmentLabel></label></td><td><tmpl_var formAttachment></td></tr>
|
||||
</tmpl_if>
|
||||
</tbody>
|
||||
</table>
|
||||
<tmpl_var formSubmit>
|
||||
<tmpl_var formFooter>
|
||||
|
||||
<tmpl_if canAdminister><tmpl_unless isNew>
|
||||
<ul>
|
||||
<li><a href="<tmpl_var deleteUrl>" onclick="return confirm('<tmpl_var deleteConfirm ESCAPE="JS">');"><tmpl_var deleteLabel></a></li>
|
||||
</ul>
|
||||
</tmpl_unless></tmpl_if>
|
||||
|
||||
|
||||
|
|
@ -159,6 +159,7 @@ sub getEditForm {
|
|||
formFooter => WebGUI::Form::formFooter($session),
|
||||
isNew => ($self->getId eq "new"),
|
||||
canAdminister => $wiki->canAdminister,
|
||||
deleteConfirm => $i18n->get("delete page confirmation"),
|
||||
deleteLabel => $i18n->get("deleteLabel"),
|
||||
deleteUrl => $self->getUrl("func=delete"),
|
||||
titleLabel => $i18n->get("titleLabel"),
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ our $HELP = {
|
|||
{
|
||||
name => 'deleteUrl',
|
||||
},
|
||||
{
|
||||
name => 'deleteConfirmation',
|
||||
},
|
||||
],
|
||||
related => [
|
||||
],
|
||||
|
|
|
|||
|
|
@ -257,6 +257,11 @@ our $I18N =
|
|||
lastUpdated => 1166484508,
|
||||
},
|
||||
|
||||
'delete page confirmation' => {
|
||||
message => q|Delete this wiki page?|,
|
||||
lastUpdated => 1169074288,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue