Skip to content

Commit

Permalink
Bump version to 2024-11-16
Browse files Browse the repository at this point in the history
- New @input@ placeholder
- Allow overriding config options from the syntax
- Support for strftime placeholders in the namespace config
- New autopage option (use with strftime placeholders)
- Always use id of main page in replacements
- Allow customizing button labels
- Translation updates
  • Loading branch information
dregad committed Nov 16, 2024
1 parent 74c22dc commit 2be3f61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin.info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
base addnewpage
author Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
email [email protected]
date 2024-11-08
date 2024-11-16
name Add New Page plugin
desc Adds a "new page form" to any wiki page.
url https://www.dokuwiki.org/plugin:addnewpage
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jQuery(function () {
var $id = $form.find("input[name='id']");
var $submit = $form.find(':submit');

console.log($ns);
// disable submit unless something is in input or input is disabled
if ($title.attr('type') === 'text') {
$submit.attr('disabled', 'disabled');
Expand All @@ -17,13 +18,12 @@ jQuery(function () {
}
});
}

console.log($ns);
// Change the form's page-ID field on submit
$form.submit(function () {
// Build the new page ID and save in hidden form field
var id = $ns.val().replace('@INPUT@', $title.val());
$id.val(id);

// Clean up the form vars, just to make the resultant URL a bit nicer
$ns.prop("disabled", true);
$title.prop("disabled", true);
Expand Down

0 comments on commit 2be3f61

Please sign in to comment.