Skip to content

Commit

Permalink
Add publicContactMeFormBeforeContent and publicContactMeFormAfterCont…
Browse files Browse the repository at this point in the history
…ent behaviors, closes #4
  • Loading branch information
franck-paul committed Mar 6, 2021
1 parent 24fbd03 commit 3f260ab
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
13 changes: 7 additions & 6 deletions _define.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
* @copyright Olivier Meunier
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/

if (!defined('DC_RC_PATH')) {return;}
if (!defined('DC_RC_PATH')) {
return;
}

$this->registerModule(
"ContactMe", // Name
"Add a simple contact form on your blog", // Description
"Olivier Meunier and contributors", // Author
'1.11.1', // Version
'ContactMe', // Name
'Add a simple contact form on your blog', // Description
'Olivier Meunier and contributors', // Author
'1.12', // Version
[
'requires' => [['core', '2.16']], // Dependencies
'permissions' => 'admin', // Permissions
Expand Down
4 changes: 4 additions & 0 deletions default-templates/currywurst/contact_me.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
{{tpl:ContactMeFormCaption}}
<form action="{{tpl:ContactMeURL}}" method="post" id="comment-form" class="contactme">
<fieldset>
<!-- # --BEHAVIOR-- publicContactMeFormBeforeContent -->
{{tpl:SysBehavior behavior="publicContactMeFormBeforeContent"}}
<p class="field"><label for="c_name">{{tpl:lang Name or nickname}}&nbsp;:</label>
<input name="c_name" id="c_name" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeName encode_html="1"}}" required aria-required="true" />
Expand Down Expand Up @@ -57,6 +59,8 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
<textarea name="c_message" id="c_message" cols="35"
rows="7" required aria-required="true">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
</p>
<!-- # --BEHAVIOR-- publicContactMeFormAfterContent -->
{{tpl:SysBehavior behavior="publicContactMeFormAfterContent"}}

<p><input type="submit" class="submit" value="{{tpl:lang send}}" /></p>
</fieldset>
Expand Down
4 changes: 4 additions & 0 deletions default-templates/dotty/contact_me.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
{{tpl:ContactMeFormCaption}}
<form action="{{tpl:ContactMeURL}}" method="post" id="comment-form" class="contactme">
<fieldset>
<!-- # --BEHAVIOR-- publicContactMeFormBeforeContent -->
{{tpl:SysBehavior behavior="publicContactMeFormBeforeContent"}}
<p class="field"><label for="c_name">{{tpl:lang Name or nickname}}&nbsp;:</label>
<input name="c_name" id="c_name" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeName encode_html="1"}}" required aria-required="true" />
Expand Down Expand Up @@ -57,6 +59,8 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
<textarea name="c_message" id="c_message" cols="35"
rows="7" required aria-required="true">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
</p>
<!-- # --BEHAVIOR-- publicContactMeFormAfterContent -->
{{tpl:SysBehavior behavior="publicContactMeFormAfterContent"}}

<p><input type="submit" class="submit" value="{{tpl:lang send}}" /></p>
</fieldset>
Expand Down
4 changes: 4 additions & 0 deletions default-templates/mustek/contact_me.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
{{tpl:ContactMeFormCaption}}
<form action="{{tpl:ContactMeURL}}" method="post" id="comment-form" class="contactme">
<fieldset>
<!-- # --BEHAVIOR-- publicContactMeFormBeforeContent -->
{{tpl:SysBehavior behavior="publicContactMeFormBeforeContent"}}
<p class="field"><label for="c_name">{{tpl:lang Name or nickname}}&nbsp;:</label>
<input name="c_name" id="c_name" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeName encode_html="1"}}" required aria-required="true" />
Expand Down Expand Up @@ -57,6 +59,8 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
<textarea name="c_message" id="c_message" cols="35"
rows="7" required aria-required="true">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
</p>
<!-- # --BEHAVIOR-- publicContactMeFormAfterContent -->
{{tpl:SysBehavior behavior="publicContactMeFormAfterContent"}}

<p><input type="submit" class="submit" value="{{tpl:lang send}}" /></p>
</fieldset>
Expand Down

0 comments on commit 3f260ab

Please sign in to comment.