Commit 57283722 authored by Nicolas Widart's avatar Nicolas Widart

Switching the migrate module name input to a select

parent d662f634
<?php namespace Modules\Workshop\Composers;
use Modules\Workshop\Manager\ModuleManager;
class MigrateViewComposer
{
/**
* @var ModuleManager
*/
private $module;
public function __construct(ModuleManager $module)
{
$this->module = $module;
}
public function compose($view)
{
$view->modules = $this->module->enabled();
}
}
\ No newline at end of file
......@@ -33,6 +33,15 @@ class ModuleManager
return $this->module->all();
}
/**
* Return all the enabled modules
* @return array
*/
public function enabled()
{
return $this->module->enabled();
}
/**
* Get the core modules that shouldn't be disabled
* @return array|mixed
......
......@@ -3,7 +3,7 @@
<div class="box-body">
<div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'>
{!! Form::label('module', 'Module Name:') !!}
{!! Form::text('module', Input::old('name'), ['class' => 'form-control', 'placeholder' => 'Module Name']) !!}
{!! Form::select('module', $modules, null, ['class' => 'form-control']) !!}
{!! $errors->first('module', '<span class="help-block">:message</span>') !!}
</div>
</div>
......
<?php
View::composer('core::partials.sidebar-nav', 'Modules\Workshop\Composers\SidebarViewComposer');
View::composer('workshop::admin.workbench.tabs.migrate', 'Modules\Workshop\Composers\MigrateViewComposer');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment