edit_post

NAML documentation   Watch a video
Error Found
An error was found in the NAML code of this application – View Details | Go to NAML Editor
macro or method for 'anonymous_name_control' not found in [basic, nabble, servlet, node_page, html] stack = [basic, nabble, servlet, node, node_poll, node_page, html]
  in anonymous_name_control(custom_tweak:captcha5posts:4) - <then.anonymous_name_control/>
  in if(custom_tweak:captcha5posts:3) - <n.if.not.visitor.is_registered> - public static void nabble.naml.namespaces.BasicNamespace._if(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.Interpreter)
  in reply_form(nabble:reply.naml:90) - <n.reply_form />
  in content(nabble:utilities.naml:915) - <n.content/>
  in form(nabble:reply.naml:87) - <n.form. onsubmit="return singleSubmit(this)">
  in if(nabble:reply.naml:85) - <n.if.not.global_is_var_set name="sent"> - public static void nabble.naml.namespaces.BasicNamespace._if(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.Interpreter)
  in body(custom_tweak:html:9) - <n.body/>
  in body(responsive:responsive.naml:13) - <n.body/>
  in nabble_html(responsive:responsive.naml:9) - <n.nabble_html> - public void nabble.view.web.template.ServletNamespace.nabble_html(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.ScopedInterpreter)
  in html_impl(custom_tweak:html:2) - <n.html_impl>
  in html(nabble:reply.naml:54) - <n.html>
  in do(nabble:utilities.naml:936) - <n.as_node_page.do/>
  in as_node_page(nabble:utilities.naml:936) - <n.as_node_page.do/> - public void nabble.view.web.template.NodeNamespace.as_node_page(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.ScopedInterpreter)
  in do(nabble:utilities.naml:941) - <n.get_node_from_request_parameter.do/>
  in get_node_from_request_parameter(nabble:utilities.naml:941) - <n.get_node_from_request_parameter.do/> - public void nabble.view.web.template.ServletNamespace.get_node_from_request_parameter(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.ScopedInterpreter) throws java.io.IOException,javax.servlet.ServletException,nabble.naml.namespaces.TemplateException
  in catch_exception(nabble:utilities.naml:940) - <n.catch_exception. id="get-node-block"> - public void nabble.naml.namespaces.BasicNamespace.catch_exception(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.Interpreter)
  in get_node_from_parameter(nabble:utilities.naml:936) - <n.get_node_from_parameter.as_node_page.do/>
  in node_page(nabble:reply.naml:16) - <n.node_page.>
  in new_post(nabble:reply.naml:2) - <n.new_post>
  in (nabble:reply.naml:1) - <macro name="reply" requires="servlet">
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "edit_post".
... in edit_post.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<macro name="edit_post" requires="servlet">
    <n.node_page.>
        <n.if.not.visitor.can_edit.page_node>
            <then>
                <n.login.><t>Only authorized users can proceed in this area.</t></n.login.>
            </then>
        </n.if.not.visitor.can_edit.page_node>
        <n.if.not.is_submitted_form>
            <then>
                <n.subject_field.set_value value="[n.page_node.raw_subject/]" />
                <n.html_format_field.set_value value="[n.page_node.message.is_html_format/]" />
                <n.message_field.set_value value="[n.page_node.message.as_editable/]" />
                <n.alert_field.set_value value="[n.page_node.visitor_is_subscribed_to_topic/]" />
                <n.page_node.init_edit_post_custom_fields/>
            </then>
            <else>
                <n.catch_exception. id="save-block">
                    <n.edit_page_node. commit="[n.not.is_preview/]">
                        <n.set_subject subject="[n.subject_field.value/]" />
                        <n.set_message message="[n.message_field.value/]" is_html="[n.not.is_null.html_format_field.value/]" />
                        <n.if.not.is_preview>
                            <then.save_post />
                        </n.if.not.is_preview>
                    </n.edit_page_node.>
                    <n.if.not.is_preview>
                        <then>
                            <n.page_node.save_alert_field/>
                            <n.page_node.save_edit_post_custom_fields/>
                            <n.redirect_to.page_node.path/>
                        </then>
                    </n.if.not.is_preview>
                </n.catch_exception.>
            </else>
        </n.if.not.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Edit Post</t></n.title.>
                <style type="text/css">
                    .title-row {
                        padding:.2em;
                        border-width:2px;
                        border-style:solid;
                        font-weight:bold;
                    }
                    div.field-title {
                        margin-top: 0;
                    }
                </style>
            </head>
            <body>
                <n.edit_header first_text="[t]Edit Post[/t]" second_text="[n.page_node.get_app_node.subject/]" />
                <n.if.is_submitted_form>
                    <then>
                        <n.if.is_preview>
                            <then>
                                <n.page_node.preview/>
                            </then>
                        </n.if.is_preview>
                        <n.show_edit_post_error/>
                    </then>
                </n.if.is_submitted_form>
                <n.form.>
                    <n.edit_post_form />
 
                    <div style="margin-top:1em">
                        <input type="submit" class="toolbar action-button" value="[t]Post Message[/t]" />
                        <input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]" />
                        <t>or</t> <a href="[n.page_node.path/]"><t>Cancel</t></a>
                    </div>
                </n.form.>
            </body>
        </n.html>
    </n.node_page.>
</macro>