Index: /quintagroup.plonecaptchas/branches/plone4/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto.cpy
===================================================================
--- /quintagroup.plonecaptchas/branches/plone4/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto.cpy	(revision 2453)
+++ /quintagroup.plonecaptchas/branches/plone4/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto.cpy	(revision 2454)
@@ -23,15 +23,4 @@
 
 if not mtool.checkPermission(AllowSendto, context):
-    context.plone_utils.addPortalMessage(_(u'You are not allowed to send this link.'), 'error')
-    return state.set(status='failure')
-
-at = getToolByName(context, 'portal_actions')
-show = False
-actions = at.listActionInfos(object=context)
-# Check for visbility of sendto action
-for action in actions:
-    if action['id'] == 'sendto' and action['category'] == 'document_actions':
-        show = True
-if not show:
     context.plone_utils.addPortalMessage(_(u'You are not allowed to send this link.'), 'error')
     return state.set(status='failure')
Index: /quintagroup.plonecaptchas/branches/plone4/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto_form.cpt
===================================================================
--- /quintagroup.plonecaptchas/branches/plone4/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto_form.cpt	(revision 2453)
+++ /quintagroup.plonecaptchas/branches/plone4/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto_form.cpt	(revision 2454)
@@ -3,5 +3,5 @@
       xmlns:metal="http://xml.zope.org/namespaces/metal"
       xmlns:i18n="http://xml.zope.org/namespaces/i18n"
-      metal:use-macro="here/main_template/macros/master"
+      metal:use-macro="context/main_template/macros/master"
       i18n:domain="plone">
 
@@ -15,5 +15,5 @@
   <body>
 
-    <div metal:fill-slot="main"
+    <metal:main fill-slot="main"
          tal:define="errors options/state/getErrors;">
 
@@ -21,104 +21,107 @@
           i18n:translate="heading_send_page_to">Send this page to someone</h1>
 
-      <p class="documentDescription"
+      <div class="documentDescription"
          i18n:translate="description_send_page_url_to">
         Fill in the email address of your friend, and we will send an email
         that contains a link to this page.
-      </p>
+      </div>
 
+      <div id="content-core">
+          <form name="sendto_form"
+                class="enableAutoFocus"
+                action="sendto_form"
+                method="post"
+                enctype="multipart/form-data"
+                tal:attributes="action string:${context/@@plone_context_state/object_url}/${template/getId}">
 
-      <form name="sendto_form"
-            class="enableAutoFocus"
-            action="sendto_form"
-            method="post"
-            enctype="multipart/form-data"
-            tal:attributes="action string:$here_url/$template_id">
+            <fieldset>
 
-        <fieldset>
+              <legend i18n:translate="legend_address_info">Address info</legend>
 
-          <legend i18n:translate="legend_address_info">Address info</legend>
+              <div class="field"
+                   tal:define="error errors/send_to_address|nothing;"
+                   tal:attributes="class python:test(error, 'field error', 'field')">
 
-          <div class="field"
-               tal:define="error errors/send_to_address|nothing;"
-               tal:attributes="class python:test(error, 'field error', 'field')">
+                <label for="send_to_address" i18n:translate="label_send_to_mail">Send to</label>
 
-            <label for="send_to_address" i18n:translate="label_send_to_mail">Send to</label>
+                <span class="fieldRequired" title="Required"
+                      i18n:attributes="title title_required;"
+                      i18n:translate="label_required">(Required)</span>
 
-            <span class="fieldRequired" title="Required"
-                  i18n:attributes="title title_required;"
-                  i18n:translate="label_required">(Required)</span>
+                      <div class="formHelp" i18n:translate="help_send_to_mail">
+                        The e-mail address to send this link to.
+                      </div>
 
-                  <div class="formHelp" i18n:translate="help_send_to_mail">
-                    The e-mail address to send this link to.
-                  </div>
+                      <div tal:content="error">Validation error output</div>
 
-                  <div tal:content="error">Validation error output</div>
+                      <input type="text"
+                             id="send_to_address"
+                             name="send_to_address"
+                             size="25"
+                             tal:attributes="value request/send_to_address | nothing;"
+                             />
+              </div>
 
-                  <input type="text"
-                         id="send_to_address"
-                         name="send_to_address"
-                         size="25"
-                         tal:attributes="value request/send_to_address | nothing;"
-                         />
-          </div>
+              <div class="field"
+                   tal:define="error errors/send_from_address|nothing;"
+                   tal:attributes="class python:test(error, 'field error', 'field')">
 
-          <div class="field"
-               tal:define="error errors/send_from_address|nothing;"
-               tal:attributes="class python:test(error, 'field error', 'field')">
+                <label for="send_from_address" i18n:translate="label_send_from">From</label>
 
-            <label for="send_from_address" i18n:translate="label_send_from">From</label>
+                <span class="fieldRequired" title="Required"
+                      i18n:attributes="title title_required;"
+                      i18n:translate="label_required">(Required)</span>
 
-            <span class="fieldRequired" title="Required"
-                  i18n:attributes="title title_required;"
-                  i18n:translate="label_required">(Required)</span>
+                      <div class="formHelp" i18n:translate="help_send_from">
+                        Your email address.
+                      </div>
 
-                  <div class="formHelp" i18n:translate="help_send_from">
-                    Your email address.
-                  </div>
+                      <div tal:content="error">Validation error output</div>
 
-                  <div tal:content="error">Validation error output</div>
+                      <input type="text"
+                             id="send_from_address"
+                             name="send_from_address"
+                             size="25"
+                             tal:define="member context/@@plone_portal_state/member;"
+                             tal:attributes="value python: request.get('send_from_address', member.getProperty('email',''));"
+                             />
+              </div>
 
-                  <input type="text"
-                         id="send_from_address"
-                         name="send_from_address"
-                         size="25"
-                         tal:attributes="value python: request.get('send_from_address', member.getProperty('email',''));"
-                         />
-          </div>
+              <div class="field">
+                <label for="comment" i18n:translate="label_comment">Comment</label>
 
-          <div class="field">
-            <label for="comment" i18n:translate="label_comment">Comment</label>
+                <div class="formHelp" i18n:translate="help_comment_to_link">
+                  A comment about this link.
+                </div>
 
-            <div class="formHelp" i18n:translate="help_comment_to_link">
-              A comment about this link.
-            </div>
+                <textarea cols="80"
+                          rows="5"
+                          id="comment"
+                          name="comment"
+                          tal:content="request/comment | nothing"
+                          >
+                  Comment
+                </textarea>
+              </div>
 
-            <textarea cols="80"
-                      rows="5"
-                      id="comment"
-                      name="comment"
-                      tal:content="request/comment | nothing"
-                      >
-              Comment
-            </textarea>
-          </div>
-          
-          <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
-          <div class="formControls">
-            <input class="context"
-                   type="submit"
-                   name="form.button.Send"
-                   value="Send"
-                   i18n:attributes="value label_send;"
-                   />
-          </div>
+              <div metal:use-macro="here/captcha_widget/macros/captcha"></div>
 
-          <input type="hidden" name="form.submitted" value="1" />
+              <div class="formControls">
+                <input class="context"
+                       type="submit"
+                       name="form.button.Send"
+                       value="Send"
+                       i18n:attributes="value label_send;"
+                       />
+              </div>
 
-        </fieldset>
+              <input type="hidden" name="form.submitted" value="1" />
 
-      </form>
+            </fieldset>
 
-    </div>
+          </form>
+      </div>
+      
+    </metal:main>
 
   </body>
