Removed the instructions field for event questions
This commit is contained in:
parent
79f8de9653
commit
49b0fac0f5
|
|
@ -71,7 +71,6 @@ class EventSurveyController extends MyBaseController
|
|||
// Create question.
|
||||
$question = Question::createNew(false, false, true);
|
||||
$question->title = $request->get('title');
|
||||
$question->instructions = $request->get('instructions');
|
||||
$question->is_required = ($request->get('is_required') == 'yes') ;
|
||||
$question->question_type_id = $request->get('question_type_id');
|
||||
$question->save();
|
||||
|
|
@ -146,7 +145,6 @@ class EventSurveyController extends MyBaseController
|
|||
// Create question.
|
||||
$question = Question::scope()->findOrFail($question_id);
|
||||
$question->title = $request->get('title');
|
||||
$question->instructions = $request->get('instructions');
|
||||
$question->is_required = $request->get('is_required');
|
||||
$question->question_type_id = $request->get('question_type_id');
|
||||
$question->save();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RemoveInstructionsFieldQuestionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('questions', function (Blueprint $table) {
|
||||
$table->dropColumn('instructions');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('questions', function (Blueprint $table) {
|
||||
$table->string('instructions');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -41,16 +41,6 @@
|
|||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="question-instructions">
|
||||
Instructions
|
||||
</label>
|
||||
{!! Form::text('instructions', null, [
|
||||
'id' => 'question-instructions',
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'e.g. Please enter your post code in the format XXX XX?'
|
||||
]) !!}
|
||||
</div>
|
||||
|
||||
|
||||
<fieldset id="question-options" {!! empty($question->has_options) ? ' class="hide"' : '' !!}>
|
||||
|
|
|
|||
|
|
@ -40,18 +40,8 @@
|
|||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="question-instructions">
|
||||
Instructions
|
||||
</label>
|
||||
{!! Form::text('instructions', $question->instructions, [
|
||||
'id' => 'question-instructions',
|
||||
'class' => 'form-control',
|
||||
]) !!}
|
||||
</div>
|
||||
<fieldset id="question-options" class="{{ $question->has_options ? 'hide' : '' }}" >
|
||||
<legend>Question Options</legend>
|
||||
<table class="table">
|
||||
<table >
|
||||
<tbody>
|
||||
@foreach ($question->options as $question_option)
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
<h4 style="margin-bottom: 25px;margin-top: 20px;">Recent Orders</h4>
|
||||
@if($organiser->orders->count())
|
||||
<ul class="list-group">
|
||||
@foreach($organiser->orders()->orderBy('created_at', 'desc')->take(30)->get() as $order)
|
||||
@foreach($organiser->orders()->orderBy('created_at', 'desc')->take(10)->get() as $order)
|
||||
<li class="list-group-item">
|
||||
<h6 class="ellipsis">
|
||||
<a href="{{ route('showEventDashboard', ['event_id' => $order->event->id]) }}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue