Skip to content

Commit

Permalink
Fixed bug #016503: TC-80: Sending information collection form is brok…
Browse files Browse the repository at this point in the history
…en in admin2

(Merged from master (4.4.0beta2) commit 25627c1)
Add support for allowing extensions to easily defining custom action handlers based on post action name.
And fix feedback_form.tl issue with sender name missing on installs taht have sender name on feedback class.
  • Loading branch information
andrerom committed Aug 27, 2010
1 parent 273fca6 commit da541dd
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
Expand Up @@ -15,6 +15,14 @@
{attribute_view_gui attribute=$node.data_map.email}
</div>

{* Sender name (information collector). *}
{if is_set( $node.data_map.sender_name )}
<div class="attribute-email">
<label>{'Your name'|i18n( 'design/admin/preview/feedbackform' )}:</label>
{attribute_view_gui attribute=$node.data_map.sender_name}
</div>
{/if}

{* Subject (information collector). *}
<div class="attribute-subject">
<label>{'Subject'|i18n( 'design/admin/preview/feedbackform' )}:</label>
Expand Down
9 changes: 0 additions & 9 deletions design/admin2/templates/node/view/full.tpl
Expand Up @@ -111,15 +111,6 @@
</p>
</div>

<div class="button-right">
<div class="block">
{* Custom content action buttons. *}
{section var=ContentActions loop=$node.object.content_action_list}
<input class="button" type="submit" name="{$ContentActions.item.action}" value="{$ContentActions.item.name}" />
{/section}
</div>
</div>

<div class="float-break"></div>
</form>
{* DESIGN: Control bar END *}
Expand Down
24 changes: 22 additions & 2 deletions design/admin2/templates/preview.tpl
@@ -1,2 +1,22 @@
{* Content preview in content window. *}
{node_view_gui content_node=$node view='admin_preview'}
{* Content (pre)view in content window. *}
{def $custom_actions = $node.object.content_action_list}
{if $custom_actions}
<form method="post" action={'content/action'|ezurl}>
<input type="hidden" name="TopLevelNode" value="{$node.object.main_node_id}" />
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.contentobject_id}" />
{/if}

{node_view_gui content_node=$node view='admin_preview'}

{if $custom_actions}
<div class="button-right">
<div class="block">
{* Custom content action buttons. *}
{foreach $custom_actions as $custom_action}
<input class="button" type="submit" name="{$custom_action.action}" value="{$custom_action.name}" />
{/foreach}
</div>
</div>
</form>
{/if}
3 changes: 2 additions & 1 deletion doc/changelogs/4.3/CHANGELOG-4.3.0-to-4.3.1
Expand Up @@ -135,4 +135,5 @@ Changes from 4.3.0 to 4.3.1
(Merged from master (4.4.0beta2) commit 2a9f0b7)
- Fixed bug #006380: Workflow cron - Fatal error: Call to a member function on a non-object
(Merged from master (4.4.0beta2) commit 2db6f27)

- Fixed bug #016503: TC-80: Sending information collection form is broken in admin2
(Merged from master (4.4.0beta2) commit 25627c1)

0 comments on commit da541dd

Please sign in to comment.