Permalink
Browse files

Added placeholder attributes for comment/contact form.

  • Loading branch information...
1 parent 66be030 commit cfd6acf089e8bdb713b3b5fe3f2cb10e6b53933c Matthias Mees committed Sep 10, 2011
Showing with 46 additions and 9 deletions.
  1. +7 −0 UTF-8/lang_de.inc.php
  2. +7 −0 UTF-8/lang_en.inc.php
  3. +8 −4 commentform.tpl
  4. +7 −0 lang_de.inc.php
  5. +7 −0 lang_en.inc.php
  6. +10 −5 plugin_contactform.tpl
@@ -1,5 +1,12 @@
<?php
+// Template-Optionen
@define('TWOK11_HEADER_IMG','Bannergrafik im Kopfbereich einbinden? (1120 Pixel breit; Feld leeren um Ausgabe zu unterdrücken)');
@define('TWOK11_WEBFONTS', 'Einen von Google gehosteten Webfont nutzen?');
@define('TWOK11_NOWEBFONT', 'Keinen Webfont einbinden');
+// Sprachkonstanten
+@define('TWOK11_PLACE_NAME', 'z.B. John Doe');
+@define('TWOK11_PLACE_MAIL', 'z.B. mail@example.org');
+@define('TWOK11_PLACE_URL', 'z.B. http://example.org');
+@define('TWOK11_PLACE_MESSAGE', 'Was gibt es zu sagen?');
+@define('TWOK11_SEND_MAIL', 'Senden');
@@ -1,5 +1,12 @@
<?php
+// Template options
@define('TWOK11_HEADER_IMG','Use a banner image in the header? (1120 pixels wide; leave box empty to not use a banner)');
@define('TWOK11_WEBFONTS', 'Use a webfont, hosted by Google?');
@define('TWOK11_NOWEBFONT', 'Include no webfont');
+// Lang constants
+@define('TWOK11_PLACE_NAME', 'i.e. John Doe');
+@define('TWOK11_PLACE_MAIL', 'i.e. mail@example.org');
+@define('TWOK11_PLACE_URL', 'i.e. http://example.org');
+@define('TWOK11_PLACE_MESSAGE', 'What do you want to say?');
+@define('TWOK11_SEND_MAIL', 'Send');
View
@@ -1,27 +1,31 @@
+{assign var="placename" value=$CONST.TWOK11_PLACE_NAME}
+{assign var="placemail" value=$CONST.TWOK11_PLACE_MAIL}
+{assign var="placeurl" value=$CONST.TWOK11_PLACE_URL}
+{assign var="placemess" value=$CONST.TWOK11_PLACE_MESSAGE}
<div id="serendipityCommentFormC" class="serendipityCommentForm">
<div id="serendipity_replyform_0"></div>
<a id="serendipity_CommentForm"></a>
<form id="serendipity_comment" action="{$commentform_action}#feedback" method="post">
<div><input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}"/></div>
<div class="form_field">
<label for="serendipity_commentform_name">{$CONST.NAME}</label>
- <input id="serendipity_commentform_name" name="serendipity[name]" type="text" value="{$commentform_name}"/>
+ <input id="serendipity_commentform_name" name="serendipity[name]" type="text" value="{$commentform_name}" placeholder="{$placename}"/>
</div>
<div class="form_field">
<label for="serendipity_commentform_email">{$CONST.EMAIL}</label>
- <input id="serendipity_commentform_email" name="serendipity[email]" type="email" value="{$commentform_email}"/>
+ <input id="serendipity_commentform_email" name="serendipity[email]" type="email" value="{$commentform_email}" placeholder="{$placemail}"/>
</div>
<div class="form_field">
<label for="serendipity_commentform_url">{$CONST.HOMEPAGE}</label>
- <input id="serendipity_commentform_url" name="serendipity[url]" type="url" value="{$commentform_url}"/>
+ <input id="serendipity_commentform_url" name="serendipity[url]" type="url" value="{$commentform_url}" placeholder="{$placeurl}"/>
</div>
<div class="form_field">
<label for="serendipity_replyTo">{$CONST.IN_REPLY_TO}</label>
{$commentform_replyTo}
</div>
<div class="form_tarea">
<label for="serendipity_commentform_comment">{$CONST.COMMENT}</label>
- <textarea id="serendipity_commentform_comment" name="serendipity[comment]" rows="10" cols="40">{$commentform_data}</textarea>
+ <textarea id="serendipity_commentform_comment" name="serendipity[comment]" rows="10" cols="40" placeholder="{$placemess}">{$commentform_data}</textarea>
</div>
{serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry}
{if $is_commentform_showToolbar}
View
@@ -1,5 +1,12 @@
<?php
+// Template-Optionen
@define('TWOK11_HEADER_IMG','Bannergrafik im Kopfbereich einbinden? (1120 Pixel breit; Feld leeren um Ausgabe zu unterdrücken)');
@define('TWOK11_WEBFONTS', 'Einen von Google gehosteten Webfont nutzen?');
@define('TWOK11_NOWEBFONT', 'Keinen Webfont einbinden');
+// Sprachkonstanten
+@define('TWOK11_PLACE_NAME', 'z.B. John Doe');
+@define('TWOK11_PLACE_MAIL', 'z.B. mail@example.org');
+@define('TWOK11_PLACE_URL', 'z.B. http://example.org');
+@define('TWOK11_PLACE_MESSAGE', 'Was gibt es zu sagen?');
+@define('TWOK11_SEND_MAIL', 'Senden');
View
@@ -1,5 +1,12 @@
<?php
+// Template options
@define('TWOK11_HEADER_IMG','Use a banner image in the header? (1120 pixels wide; leave box empty to not use a banner)');
@define('TWOK11_WEBFONTS', 'Use a webfont, hosted by Google?');
@define('TWOK11_NOWEBFONT', 'Include no webfont');
+// Lang constants
+@define('TWOK11_PLACE_NAME', 'i.e. John Doe');
+@define('TWOK11_PLACE_MAIL', 'i.e. mail@example.org');
+@define('TWOK11_PLACE_URL', 'i.e. http://example.org');
+@define('TWOK11_PLACE_MESSAGE', 'What do you want to say?');
+@define('TWOK11_SEND_MAIL', 'Send');
@@ -1,3 +1,8 @@
+{assign var="placename" value=$CONST.TWOK11_PLACE_NAME}
+{assign var="placemail" value=$CONST.TWOK11_PLACE_MAIL}
+{assign var="placeurl" value=$CONST.TWOK11_PLACE_URL}
+{assign var="placemess" value=$CONST.TWOK11_PLACE_MESSAGE}
+{assign var="sendmail" value=$CONST.TWOK11_SEND_MAIL}
{if $plugin_contactform_articleformat}
<div class="serendipity_entry">
{/if}
@@ -27,25 +32,25 @@
</div>
<div class="form_field">
<label for="serendipity_commentform_name">{$CONST.NAME}</label>
- <input id="serendipity_commentform_name" name="serendipity[name]" type="text" value="{$commentform_name}"/>
+ <input id="serendipity_commentform_name" name="serendipity[name]" type="text" value="{$commentform_name}" placeholder="{$placename}"/>
</div>
<div class="form_field">
<label for="serendipity_commentform_email">{$CONST.EMAIL}</label>
- <input id="serendipity_commentform_email" name="serendipity[email]" type="email" value="{$commentform_email}"/>
+ <input id="serendipity_commentform_email" name="serendipity[email]" type="email" value="{$commentform_email}" placeholder="{$placemail}"/>
</div>
<div class="form_field">
<label for="serendipity_commentform_url">{$CONST.HOMEPAGE}</label>
- <input id="serendipity_commentform_url" name="serendipity[url]" type="url" value="{$commentform_url}"/>
+ <input id="serendipity_commentform_url" name="serendipity[url]" type="url" value="{$commentform_url}" placeholder="{$placeurl}"/>
</div>
<div class="form_tarea">
<label for="serendipity_commentform_comment">{$plugin_contactform_message}</label>
- <textarea id="serendipity_commentform_comment" name="serendipity[comment]" rows="10" cols="40">{$commentform_data}</textarea>
+ <textarea id="serendipity_commentform_comment" name="serendipity[comment]" rows="10" cols="40" placeholder="{$placemess}">{$commentform_data}</textarea>
</div>
{serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry}
- <input id="serendipity_submit" name="serendipity[submit]" type="submit" value="{$CONST.SUBMIT_COMMENT}"/>
+ <input id="serendipity_submit" name="serendipity[submit]" type="submit" value="{$sendmail}"/>
</form>
</div>
{/if}

0 comments on commit cfd6acf

Please sign in to comment.