0
|
1 <macro name="edit_app" requires="servlet">
|
|
2 <n.node_page.>
|
|
3 <n.if.not.visitor.can_edit.page_node>
|
|
4 <then>
|
|
5 <n.login.><t>Only authorized users can proceed in this area.</t></n.login.>
|
|
6 </then>
|
|
7 </n.if.not.visitor.can_edit.page_node>
|
|
8 <n.if.not.is_submitted_form>
|
|
9 <then>
|
|
10 <n.subject_field.set_value value="[n.page_node.raw_subject/]" />
|
|
11 <n.html_format_field.set_value value="[n.page_node.message.is_html_format/]" />
|
|
12 <n.message_field.set_value value="[n.page_node.message.as_editable/]" />
|
|
13 </then>
|
|
14 <else>
|
|
15 <n.catch_exception. id="save-block">
|
|
16 <n.edit_page_node.>
|
|
17 <n.set_subject subject="[n.subject_field.value/]" />
|
|
18 <n.set_message message="[n.message_field.value/]" is_html="[n.not.is_null.html_format_field.value/]" />
|
|
19 <n.save_node/>
|
|
20 </n.edit_page_node.>
|
|
21 <n.redirect_to.page_node.path/>
|
|
22 </n.catch_exception.>
|
|
23 </else>
|
|
24 </n.if.not.is_submitted_form>
|
|
25 <n.html>
|
|
26 <head>
|
|
27 <META NAME="robots" CONTENT="noindex,nofollow"/>
|
|
28 <n.title.><t>Edit Name & Description</t></n.title.>
|
|
29 <style type="text/css">
|
|
30 .title-row {
|
|
31 padding:.2em;
|
|
32 border-width:2px;
|
|
33 border-style:solid;
|
|
34 font-weight:bold;
|
|
35 }
|
|
36 div.field-title {
|
|
37 margin-top: 0;
|
|
38 }
|
|
39 </style>
|
|
40 </head>
|
|
41 <body>
|
|
42 <n.edit_header first_text="[t]Edit Name & Description[/t]" second_text="[n.page_node.get_app_node.subject/]" />
|
|
43 <n.if.is_submitted_form>
|
|
44 <then>
|
|
45 <n.show_edit_post_error/>
|
|
46 </then>
|
|
47 </n.if.is_submitted_form>
|
|
48 <n.form.>
|
|
49 <n.if.not.visitor.is_registered>
|
|
50 <then>
|
|
51 <div class="field-box light-border-color">
|
|
52 <div class="second-font field-title"><t>Your Name</t></div>
|
|
53 <div class="weak-color">
|
|
54 <n.page_node.owner.name/>
|
|
55 </div>
|
|
56 </div>
|
|
57 </then>
|
|
58 </n.if.not.visitor.is_registered>
|
|
59
|
|
60 <div class="field-box light-border-color">
|
|
61 <div class="second-font field-title"><t>Name</t></div>
|
|
62 <div class="weak-color">
|
|
63 <n.subject_field.input size="60" />
|
|
64 </div>
|
|
65 </div>
|
|
66
|
|
67 <div class="field-box light-border-color">
|
|
68 <div class="second-font field-title"><t>Description</t></div>
|
|
69 <div class="weak-color">
|
|
70 <n.if.visitor.is_registered>
|
|
71 <then>
|
|
72 <n.html_format_field.checkbox />
|
|
73 <label for="[n.html_format_field.name/]"><t>Description is in HTML Format</t></label><br/>
|
|
74 <div style="margin:.1em 0">
|
|
75 <n.editor_toolbar
|
|
76 textarea_id="[n.message_field.name/]"
|
|
77 node_id="[n.page_node.id/]"
|
|
78 />
|
|
79 </div>
|
|
80 </then>
|
|
81 </n.if.visitor.is_registered>
|
|
82 <n.message_field.textarea wrap="SOFT" style="min-width:30em;max-width:55em;width:100%;height:20em;" />
|
|
83 </div>
|
|
84 </div>
|
|
85
|
|
86 <input type="submit" value="[t]Save Changes[/t]" />
|
|
87 <t>or</t> <a href="[n.page_node.path/]"><t>Cancel</t></a>
|
|
88 </n.form.>
|
|
89 </body>
|
|
90 </n.html>
|
|
91 </n.node_page.>
|
|
92 </macro>
|