NAVIGATION
This shows you the differences between two versions of the page.
|
english:phpwcms-system:article:contentparts:form:special-applications:send-a-friend [2009/11/23 08:45] Knut Heermann (flip-flop) |
english:phpwcms-system:article:contentparts:form:special-applications:send-a-friend [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 248: | Line 248: | ||
| - | ==== Artikel ==== | + | **Recommended:** //The form is not automatically visible if JS is turned off.// |
| + | <code js|h sendafriend.js (if the form is poped up a short time during site load)|h> | ||
| + | window.addEvent('domready', function() { | ||
| + | |||
| + | var sendafriend = $('sendafriend'); | ||
| + | if(sendafriend) { | ||
| + | |||
| + | // do not hide send-a-friend form | ||
| + | // if( $('safsuccess') || $('saferror') ) { | ||
| + | if( $('safsuccess') || $('saferror') || $('safok') ) { // +KH: id safok used in "on success" | ||
| + | |||
| + | sendafriend.setStyle('display', ''); // +KH: if the form pops up during site load | ||
| + | var sendafriend_status = true; | ||
| + | |||
| + | } else { | ||
| + | |||
| + | var sendafriend_status = false; | ||
| + | sendafriend.setStyle('display', 'none'); | ||
| + | |||
| + | } | ||
| + | |||
| + | $('safbutton').addEvent('click', function(r) { | ||
| + | |||
| + | if(sendafriend_status == true) { | ||
| + | |||
| + | sendafriend.setStyle('display', 'none'); | ||
| + | sendafriend_status = false; | ||
| + | |||
| + | } else { | ||
| + | |||
| + | sendafriend.setStyle('display', ''); | ||
| + | sendafriend_status = true; | ||
| + | |||
| + | } | ||
| + | |||
| + | }); | ||
| + | |||
| + | } | ||
| + | }); | ||
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | |||
| + | ==== Article ==== | ||
| {{:deutsch:andere-erweiterungen:send-a-friend_de.gif|}} | {{:deutsch:andere-erweiterungen:send-a-friend_de.gif|}} | ||
| Line 257: | Line 300: | ||
| </code> | </code> | ||
| - | First HTML CP //(if the form pops up a short time during site loading)// | + | **Recommended:**\\ |
| + | First HTML CP: //(if the form pops up a short time during site loading)// | ||
| <code html> | <code html> | ||
| <div id="sendafriend" class="sendafriend" style="display:none"> | <div id="sendafriend" class="sendafriend" style="display:none"> | ||
| Line 263: | Line 307: | ||
| \\ | \\ | ||
| - | ==== Formular ==== | + | ==== Form ==== |
| {{:deutsch:andere-erweiterungen:form_send-a-friend_de.gif|}} | {{:deutsch:andere-erweiterungen:form_send-a-friend_de.gif|}} | ||
| - | <code html|h bei Erfolg|> | + | <code html|h on success|> |
| - | Die Empfehlung wurde erfolgreich versendet. | + | The recommendation has been sent successfully. |
| </code> | </code> | ||
| - | <code html|h bei Erfolg, wenn ein "Fenster schließen"-Link gewünscht|> | + | **Recommended:** \\ |
| - | <p id="safok">Die Empfehlung wurde erfolgreich versendet.</p><br /> | + | //(switch on success to [X] HTML)// |
| + | <code html|h on success, if a "Close form"-link is desired |> | ||
| + | <p id="safok">The recommendation has been sent successfully.</p><br /> | ||
| [PHP] | [PHP] | ||
| echo '<a href="index.php?'.$GLOBALS['content']['struct'][$GLOBALS['content']['cat_id']]['acat_alias'].'">Close form</a>'; | echo '<a href="index.php?'.$GLOBALS['content']['struct'][$GLOBALS['content']['cat_id']]['acat_alias'].'">Close form</a>'; | ||
| [/PHP] | [/PHP] | ||
| </code> | </code> | ||
| + | The **"Close form"-link** has the advantage that the page is reloaded without an anchor and a new form input is immediately possible. | ||
| - | + | <code html|h on error|> | |
| - | <code html|h bei Fehler|> | + | <p class="error" id="saferror">Your request could not be sent! <br /> |
| - | <p class="error" id="saferror">Ihre Anfrage konnte leider nicht versendet werden! <br /> | + | Please fill or correct the color-highlighted areas.</p> |
| - | Bitte füllen bzw. korrigieren Sie die farblich hervorgehobenen Bereiche.</p> | + | |
| </code> | </code> | ||
| Line 287: | Line 333: | ||
| - | <code html|h Empfänger - Vorlage |h> | + | <code html|h recipient - template |h> |
| Der Absender {yourname} | Der Absender {yourname} | ||
| {sender} | {sender} | ||
| - | empfiehlt Ihnen den Link auf folgende Seite: | + | recommends you the link to the following page: |
| {FORM_URL} | {FORM_URL} | ||
| Line 297: | Line 343: | ||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ||
| - | Wir weisen darauf hin, dass die Absenderangabe nicht verifiziert ist. | + | We point out that the return address is not verified. |
| - | Sollten Sie Zweifel an der Authentizität des Absenders haben, | + | If you have doubts about the authenticity of the sender, |
| - | ignorieren Sie diese E-Mail bitte. | + | just ignore this e-mail please. |
| </code> | </code> | ||
| - | <code html|h Vorlage, wenn ein "Fenster schließen"-Link erwünscht (am Ende einfügen) |h> | + | **Recommended:** \\ |
| + | <code html|h template, if a "Close form"-link is desired (insert at the end) |h> | ||
| ......... | ......... | ||
| <br /> | <br /> | ||
| Line 310: | Line 357: | ||
| </code> | </code> | ||
| + | (presupposes: [[english/phpwcms_replacer_rts/frontend_render/standard_tags_assembled]]) | ||
| + | |||
| + | |||
| + | \\ | ||
| ==== Law related stuff ==== | ==== Law related stuff ==== | ||