more add-on mcv stuff

git-svn-id: svn://10.0.0.236/trunk@207692 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
fligtar%gmail.com
2006-08-17 03:59:41 +00:00
parent fe5bca6c74
commit 9fbea67de5
4 changed files with 27 additions and 1 deletions

View File

@@ -18,7 +18,18 @@ class AddonsController extends AppController
* @param int $id
*/
function add($id = 0) {
if (isset($this->data['Addon']['add_step1'])) {
$this->render('add_step2');
}
elseif (isset($this->data['Addon']['add_step2'])) {
$this->render('add_step3');
}
elseif (isset($this->data['Addon']['add_step3'])) {
$this->render('add_step4');
}
else {
$this->render('add_step1');
}
}
/**

View File

@@ -68,5 +68,10 @@ class Addon extends AppModel
)
);
var $validate = array(
'guid' => VALID_NOT_EMPTY,
'name' => VALID_NOT_EMPTY,
'description' => VALID_NOT_EMPTY,
);
}
?>

View File

@@ -0,0 +1,5 @@
<?=$html->formTag('/addons/add/')?>
<?=$html->hidden('Addon/add_step1')?>
<?=$html->file('Addon/file')?>
<?=$html->tagErrorMsg('Addon/file', 'Please upload your add-on file.')?>
<?=$html->submit()?>

View File

@@ -0,0 +1,5 @@
<?=$html->formTag('/addons/add/')?>
<?=$html->hidden('Addon/add_step2')?>
<?=$html->input('Addon/Name')?>
<?=$html->tagErrorMsg('Addon/Name', 'Please upload your add-on file.')?>
<?=$html->submit()?>