diff --git a/mozilla/webtools/remora/app/controllers/addons_controller.php b/mozilla/webtools/remora/app/controllers/addons_controller.php index d8b1b56f31d..5da62290f6a 100644 --- a/mozilla/webtools/remora/app/controllers/addons_controller.php +++ b/mozilla/webtools/remora/app/controllers/addons_controller.php @@ -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'); + } } /** diff --git a/mozilla/webtools/remora/app/models/addon.php b/mozilla/webtools/remora/app/models/addon.php index 3fce5d1b9dc..780c2f23cc2 100644 --- a/mozilla/webtools/remora/app/models/addon.php +++ b/mozilla/webtools/remora/app/models/addon.php @@ -68,5 +68,10 @@ class Addon extends AppModel ) ); + var $validate = array( + 'guid' => VALID_NOT_EMPTY, + 'name' => VALID_NOT_EMPTY, + 'description' => VALID_NOT_EMPTY, + ); } ?> diff --git a/mozilla/webtools/remora/app/views/addons/add_step1.thtml b/mozilla/webtools/remora/app/views/addons/add_step1.thtml new file mode 100644 index 00000000000..9d94ec02013 --- /dev/null +++ b/mozilla/webtools/remora/app/views/addons/add_step1.thtml @@ -0,0 +1,5 @@ +formTag('/addons/add/')?> +hidden('Addon/add_step1')?> +file('Addon/file')?> +tagErrorMsg('Addon/file', 'Please upload your add-on file.')?> +submit()?> diff --git a/mozilla/webtools/remora/app/views/addons/add_step2.thtml b/mozilla/webtools/remora/app/views/addons/add_step2.thtml new file mode 100644 index 00000000000..212ab43bcf5 --- /dev/null +++ b/mozilla/webtools/remora/app/views/addons/add_step2.thtml @@ -0,0 +1,5 @@ +formTag('/addons/add/')?> +hidden('Addon/add_step2')?> +input('Addon/Name')?> +tagErrorMsg('Addon/Name', 'Please upload your add-on file.')?> +submit()?>