Page MenuHomeIn-Portal Phabricator

add_poll_comment.elm.tpl
No OneTemporary

File Metadata

Created
Sat, Sep 20, 6:19 AM

add_poll_comment.elm.tpl

<inp2:m_DefineElement name="content">
<br/>
<inp2:poll-comment_PresetFormFields/>
<form method="post" id="poll_comment_form" action="<inp2:m_Link width='480' height='480' pass='m,poll'/>">
<table class="form-data fullwidth">
<inp2:m_ifnot check="m_LoggedIn">
<inp2:m_RenderElement name="inp_edit_box" prefix="poll-comment" field="GuestName" title="lu_fld_Name" style="width:200px"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="poll-comment" field="GuestEmail" title="lu_fld_Email" style="width:200px"/>
</inp2:m_ifnot>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="poll-comment" field="CommentBody" rows="8" cols="40" title="lu_fld_Comment" is_last="1"/>
<inp2:m_RenderElement design="inp_edit_buttons">
<input type="hidden" name="events[poll-comment]" value="OnCreate"/>
<input type="hidden" name="success_template" value="in-bulletin/elements/content_boxes/poll_comments.elm" />
<input class="button" id="add_comment_btn" type="button" value="<inp2:m_Phrase label='lu_btn_Create' no_editing='1'/>" />
<input class="button" type="reset" name="reset" value="<inp2:m_Phrase label='lu_btn_Reset' no_editing='1'/>" />
</inp2:m_RenderElement>
</table>
</form>
<script language="javascript" type="text/javascript">
$(document).ready(
function() {
$('#add_comment_btn').click(
function ($e) {
TB.show(
{
url: $('#poll_comment_form').attr('action'),
postParams: $('#poll_comment_form').serialize(),
onDataReceived: function($data, params) {
var $match_redirect = new RegExp('^#redirect#(.*?)($|\\s.*)').exec($data);
if ($match_redirect != null) {
TB.show( {url: $match_redirect[1] + '&height=480&width=480'} );
return false;
}
return $data;
}
}
);
}
)
}
);
</script>
</inp2:m_DefineElement>
<inp2:m_include template="platform/designs/default_design_ajax.des" pass_params="1"/>

Event Timeline