Tags:
create new tag
view all tags

Bug: Some input buttons use the value-argument as action identifier

Moved this text from the KnownIssuesOfTWiki01Sep2004 topic.

Whilst "germanizing" pattern skin I noticed that it uses buttons for the actions in the edit window (preview, checkpoint, save, quietsave). If you change the label (i.e. the value) on these buttons, you also have to change the corresponding if-statements in lib/TWiki/UI/Save.pm - otherwise the action defaults to "save". I haven't checked whether other buttons in different templates show the same behaviour. This needs to be fixed because otherwise a translation of the skin becomes very difficult. -- ChristianKohl - 31.08.2004

  • This qualifies as a bug, a button label should not be used as an action identifier. -- PTh

Test case

In edit.pattern.tmpl:
<tr class="twikiTopicAction">
<td class="twikiCancelCol"><a id="cancel" href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?unlock=on" accesskey="a">Abbrechen</a></td>
<td class="twikiSubmitCol"><input type="submit" class="twikiSubmit twikiSecondary" name="action" id="checkpoint" value="Zwischenspeichern" /><label access$
<td class="twikiAddCol"><input type="submit" class="twikiSubmit twikiTertiary" name="action" id="preview" value="Vorschau" /><label accesskey="v" for="pre$
</tr>

In order to translate the action buttons into German I had to change the value="..."-value, e.g. from value="Checkpoint" to value="Zwischenspeichern". Unfortunately, these values are passed as arguments to the edit function. So you have to make changes to lib/TWiki/UI/Save.pm as well and modify the corresponding if-statements there. Otherwise, "save" is always performed, regardless of which button you clicked on.

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: SuSE Linux 9.1
Web server: Apache 1.3.28
Perl version: 5.8.1
Client OS: SuSE Linux 8.2/Windows XP
Web Browser: Mozilla 1.7, Konqueror, IE 6

-- ChristianKohl - 02 Sep 2004

Follow up

This is also in the classic skin.

-- ArthurClemens - 05 Sep 2004

Renamed topic from PatternSkinActionIdentifier.

-- PeterThoeny - 05 Sep 2004

Fix record

I believe this was fixed in svn, revision 6368.

-- AntonioTerceiro - 15 Sep 2005

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2006-04-29 - SamHasler
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.