Author: dom Date: 2006-09-12 22:27:28 +0100 (Tue, 12 Sep 2006) New Revision: 859
Modified: trunk/templates/edit_form.tt trunk/wiki.cgi Log: Provide feedback to users about moderation (closes #139)
Modified: trunk/templates/edit_form.tt =================================================================== --- trunk/templates/edit_form.tt 2006-09-12 21:15:32 UTC (rev 858) +++ trunk/templates/edit_form.tt 2006-09-12 21:27:28 UTC (rev 859) @@ -21,11 +21,21 @@ [% INCLUDE custom_licence.tt %] [% CATCH %] [% END %] + [% IF moderate %] + <p>Please note that this node is moderated so your changes will not + appear immediately. Please be patient.</p> + [% END %] </td> </tr> <tr> <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td> - <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td> + <td align="center"> + [% IF moderate %] + <input type="submit" name="Save" value="Save changes for moderation" class="form_button" /> + [% ELSE %] + <input type="submit" name="Save" value="Save changes" class="form_button" /> + [% END %] + </td> </tr> <tr> <td colspan="2" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td> @@ -111,7 +121,13 @@ </tr> <tr> <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td> - <td align="center"><input type="submit" name="Save" value="Save changes" class="form_button" /></td> + <td align="center"> + [% IF moderate %] + <input type="submit" name="Save" value="Save changes for moderation" class="form_button" /> + [% ELSE %] + <input type="submit" name="Save" value="Save changes" class="form_button" /> + [% END %] + </td> </tr> <tr> <td colspan="2" align="center">
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2006-09-12 21:15:32 UTC (rev 858) +++ trunk/wiki.cgi 2006-09-12 21:27:28 UTC (rev 859) @@ -262,13 +262,15 @@ }
if ($wiki->verify_checksum($node, $checksum)) { + my $moderate = $wiki->node_required_moderation($node); my %tt_vars = ( %tt_metadata_vars, config => $config, content => $q->escapeHTML($content), preview_html => $wiki->format($content), preview_above_edit_box => get_cookie( "preview_above_edit_box" ), - checksum => $q->escapeHTML($checksum) + checksum => $q->escapeHTML($checksum), + moderate => $moderate ); process_template("edit_form.tt", $node, %tt_vars); } else { @@ -310,6 +312,7 @@ metadata => $node_data{metadata} );
$metadata_vars{website} ||= 'http://'; + my $moderate = $wiki->node_required_moderation($node);
my %tt_vars = ( content => $q->escapeHTML($content), checksum => $q->escapeHTML($checksum), @@ -317,6 +320,7 @@ config => $config, username => $username, edit_type => $edit_type, + moderate => $moderate, deter_robots => 1, );