+ add editor to productplan module.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
<?php
|
||||
$config->productplan->create->requiredFields = 'title,begin,end';
|
||||
$config->productplan->edit->requiredFields = 'title,begin,end';
|
||||
|
||||
$config->productplan->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->productplan->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
|
||||
@@ -68,10 +68,7 @@ class productplanModel extends model
|
||||
*/
|
||||
public function create($product)
|
||||
{
|
||||
$plan = fixer::input('post')
|
||||
->stripTags('title')
|
||||
->specialChars('desc')
|
||||
->get();
|
||||
$plan = fixer::input('post')->stripTags('title')->get();
|
||||
$this->dao->insert(TABLE_PRODUCTPLAN)->data($plan)->autoCheck()->batchCheck($this->config->productplan->create->requiredFields, 'notempty')->exec();
|
||||
if(!dao::isError()) return $this->dao->lastInsertID();
|
||||
}
|
||||
@@ -86,13 +83,9 @@ class productplanModel extends model
|
||||
public function update($planID)
|
||||
{
|
||||
$oldPlan = $this->getById($planID);
|
||||
$plan = fixer::input('post')
|
||||
->stripTags('title')
|
||||
->specialChars('desc')
|
||||
->get();
|
||||
$plan = fixer::input('post')->stripTags('title')->get();
|
||||
$this->dao->update(TABLE_PRODUCTPLAN)->data($plan)->autoCheck()->batchCheck($this->config->productplan->edit->requiredFields, 'notempty')->where('id')->eq((int)$planID)->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldPlan, $plan);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<td><?php echo $plan->begin;?></td>
|
||||
<td><?php echo $plan->end;?></td>
|
||||
<td class='a-left nobr'><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title);?></td>
|
||||
<td class='a-left nobr'><?php echo nl2br($plan->desc);?></td>
|
||||
<td class='a-left nobr'><?php echo $plan->desc;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printLink('productplan', 'edit', "planID=$plan->id", $lang->edit);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->productplan->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows='5' class='area-1'");?></td>
|
||||
<td><?php echo html::textarea('desc', '', "rows='10' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
@@ -34,7 +35,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->productplan->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $plan->desc, "rows='5' class='area-1'");?></td>
|
||||
<td><?php echo html::textarea('desc', htmlspecialchars($plan->desc), "rows='10' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->productplan->desc;?></th>
|
||||
<td><?php echo nl2br($plan->desc);?></th>
|
||||
<td class='content'><?php echo $plan->desc;?></th>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-center f-16px strong'>
|
||||
|
||||
Reference in New Issue
Block a user