rushfee/resource/html/revisit/questionEdit.html

47 lines
1.6 KiB
HTML

<html login="false">
<head>
<meta charset="UTF-8">
<title>问题修改</title>
</head>
<body>
<div widget="toolbar">
<a widget="button" iconCls="icon-save" onclick="save" linkToState="editold,editnew">保存</a>
<a widget="button" iconCls="icon-exit" onclick="CloseWindow()">退出</a>
</div>
<input widget="hidden" name="question_id" label="question_id"/>
<input widget="autocomplete" name="question_type_name" label="问题分类" popupEmptyText="请选择"
textfield="text" valuefield="id" url="revisit/question/getType" readonly="readonly"/>
<br/>
<input widget="edit" name="question_name" label="问题描述" required="true" style="margin-top:5px"/>
<br/>
<script type="text/javascript">
function init(param) {
var pageState = param['pageState'];
if(pageState){
aos.setState(pageState)
}
aos.getForm().setData(param);
aos.get("question_type_name").setText(param["question_type_name"]);
}
function save(){
if(!FORM.validate())
{
return;
}
aos.post({
url:"revisit/question/editQuestion",
data:aos.getForm().getData(),
success:function(data){
if(data.isOk == 1){
aos.tip('保存成功');
}
else{
aos.tip(data.msg);
}
}
});
}
</script>
</body>
</html>