'entity_guid', 'value' => $entity->guid, )); } $comment_text = ''; $comment_guid_input = ''; if ($comment && $comment->canEdit()) { $entity_guid_input = elgg_view('input/hidden', array( 'name' => 'comment_guid', 'value' => $comment->guid, )); $comment_label = elgg_echo("generic_comments:edit"); $submit_input = elgg_view('input/submit', array('value' => elgg_echo('save'))); $comment_text = $comment->description; } else { $comment_label = elgg_echo("generic_comments:add"); $submit_input = elgg_view('input/submit', array('value' => elgg_echo('comment'))); } $cancel_button = ''; if ($comment) { $cancel_button = elgg_view('input/button', array( 'value' => elgg_echo('cancel'), 'class' => 'elgg-button-cancel mlm', 'href' => $entity ? $entity->getURL() : '#', )); } if ($inline) { $comment_input = elgg_view('input/text', array( 'name' => 'generic_comment', 'value' => $comment_text, )); echo $comment_input . $entity_guid_input . $comment_guid_input . $submit_input; } else { $comment_input = elgg_view('input/longtext', array( 'name' => 'generic_comment', 'value' => $comment_text, )); $is_edit_page_input = elgg_view('input/hidden', array( 'name' => 'is_edit_page', 'value' => (int)$is_edit_page, )); echo <<