Viewing file: 162eac971a29b628847c78127e36bb913d8f3ea8.file.form.tpl.php (7.05 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /* Smarty version Smarty3-RC3, created on 2012-02-26 12:44:55 compiled from "user/templates/questions/form.tpl" */ ?> <?php /*%%SmartyHeaderCode:21379706684f4a0d27597936-90092959%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '162eac971a29b628847c78127e36bb913d8f3ea8' => array ( 0 => 'user/templates/questions/form.tpl', 1 => 1330253094, ), ), 'nocache_hash' => '21379706684f4a0d27597936-90092959', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?> <?php if (!is_callable('smarty_function_html_radios')) include 'modules-alien/smarty/libs/plugins/function.html_radios.php'; ?><table align="center">
<tr>
<td>
<div class="message-error" id="questions-error-message" style="display:none"></div>
</td>
</tr>
</table>
<div id="questions-add-block">
<form name="questions-add-form" method="post" id="questions-add-form">
<table border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td align="right">
<strong><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_person_id'];?> :</strong>
</td>
<td>
<select name="question_person_id" id="question_person_id">
<?php $_smarty_tpl->tpl_vars['person'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('persons')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['person']->key => $_smarty_tpl->tpl_vars['person']->value){ $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['person']->key; ?>
<option value="<?php echo $_smarty_tpl->tpl_vars['person']->value["person_id"];?> "><?php echo $_smarty_tpl->tpl_vars['person']->value["person_name_".($_smarty_tpl->getVariable('ulang')->value)];?> </option>
<?php }} ?>
</select>
</td>
</tr>
<tr>
<td align="right" valign="middle"><strong><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_author_name'];?> :</strong></td>
<td valign="middle"><input type="text" size="40" name="question_author_name" id="question_author_name" value="<?php echo $_smarty_tpl->getVariable('question_author_name')->value;?> "/></td>
</tr>
<tr>
<td align="right" valign="middle"><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_author_phone'];?> :</td>
<td valign="middle"><input type="text" size="20" name="question_author_phone" value="<?php echo $_smarty_tpl->getVariable('question_author_phone')->value;?> "/></td>
</tr>
<tr>
<td align="right" valign="top"><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_author_email'];?> :</td>
<td valign="middle"><input type="text" size="35" name="question_author_email" value="<?php echo $_smarty_tpl->getVariable('question_author_email')->value;?> "/></td>
</tr>
<tr>
<td align="right" valign="top"><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_author_email_send'];?> :</td>
<td><?php echo smarty_function_html_radios(array('name'=>'question_author_email_send','values'=>array('Y','N'),'output'=>array($_smarty_tpl->getVariable('ULANG')->value['CoreYes'],$_smarty_tpl->getVariable('ULANG')->value['CoreNo']),'selected'=>$_smarty_tpl->getVariable('question_author_email_send')->value,'separator'=>' '),$_smarty_tpl->smarty,$_smarty_tpl);?> </td>
</tr>
<tr>
<td align="right" valign="top"><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_author_display_answerd'];?> :</td>
<td><?php echo smarty_function_html_radios(array('name'=>'question_author_display_answer','values'=>array('Y','N'),'output'=>array($_smarty_tpl->getVariable('ULANG')->value['CoreYes'],$_smarty_tpl->getVariable('ULANG')->value['CoreNo']),'selected'=>$_smarty_tpl->getVariable('question_author_display_answer')->value,'separator'=>' '),$_smarty_tpl->smarty,$_smarty_tpl);?> </td>
</tr>
<tr>
<td align="right" valign="top"><strong><?php echo $_smarty_tpl->getVariable('ULANG')->value['Questions_question_text'];?> :</strong></td>
<td><textarea name="question_text" id="question_text" cols="50" rows="6"><?php echo $_smarty_tpl->getVariable('question_text')->value;?> </textarea></td>
</tr>
<tr>
<td align="center"> </td>
<td align="left"><button type="submit" name="submit"><?php echo $_smarty_tpl->getVariable('ULANG')->value['CoreSend'];?> </button></td>
</tr>
</table>
</form>
</div>
<div id="questions-ok-block" style="display:none;">
<table align="center">
<tr>
<td align="center" valign="middle">
<div class="message-ok" id="questions-ok-message" style="display:none"></div>
</td>
</tr>
</table>
</div>
<div class="subheader"><?php echo $_smarty_tpl->getVariable('ULANG')->value['QuestionsArchiveTitle'];?> </div>
<div>
<table align="center">
<?php $_smarty_tpl->tpl_vars['person'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('persons')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['person']->key => $_smarty_tpl->tpl_vars['person']->value){ $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['person']->key; ?>
<tr>
<td>
<a href="/questions/<?php echo $_smarty_tpl->tpl_vars['person']->value['person_id'];?> "><?php echo $_smarty_tpl->tpl_vars['person']->value["person_name_".($_smarty_tpl->getVariable('ulang')->value)];?> (<?php echo $_smarty_tpl->tpl_vars['person']->value["person_occupation_".($_smarty_tpl->getVariable('ulang')->value)];?> )</a>
</td>
</tr>
<?php }} ?>
</table>
</div>
<script type="text/javascript">
$(document).ready(
function()
{
$("#questions-add-form").ajaxForm();
$("#questions-add-form").submit(
function()
{
var qString = $("#questions-add-form").formSerialize();
$.post("/user-asynch.php?mod=Questions&submit", qString,
function(data)
{
if (data.status == "ok")
{
$("#questions-ok-block table").css('height', $("#questions-add-block").height());
$("#questions-ok-block table").css('width', $("#questions-add-block").width());
$("#questions-error-message").hide(0);
$("#questions-ok-message").text(data.message);
$("#questions-ok-message").show(500);
$("#questions-add-block").fadeOut(1000, function()
{
$("#questions-ok-block").fadeIn(1000);
$("#questions-add-form").clearForm();
}
);
} else
if (data.status == "error")
{
$("#questions-error-message").hide(0);
$("#questions-error-message").show(500);
$("#questions-error-message").text(data.error);
}
}, 'json');
return false;
});
});
</script>
|