зеркало из https://github.com/mozilla/pjs.git
more add-on mcv stuff
This commit is contained in:
Родитель
5ac3dc5aec
Коммит
12afd45e9f
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,5 +68,10 @@ class Addon extends AppModel
|
|||
)
|
||||
|
||||
);
|
||||
var $validate = array(
|
||||
'guid' => VALID_NOT_EMPTY,
|
||||
'name' => VALID_NOT_EMPTY,
|
||||
'description' => VALID_NOT_EMPTY,
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -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()?>
|
|
@ -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()?>
|
Загрузка…
Ссылка в новой задаче