mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Cleanup code.
This commit is contained in:
parent
79e39f7de8
commit
91bba40c20
@ -48,7 +48,7 @@ class JsonController extends Controller
|
||||
$steps = [];
|
||||
foreach ($headers as $header) {
|
||||
$steps[] = [
|
||||
'element' => "#" . $header,
|
||||
'element' => '#' . $header,
|
||||
'title' => trans('help.' . $header . '-title'),
|
||||
'content' => trans('help.' . $header . '-text'),
|
||||
];
|
||||
@ -58,12 +58,7 @@ class JsonController extends Controller
|
||||
$steps[1]['placement'] = 'left';// sidebar position left:
|
||||
$steps[7]['orphan'] = true; // final in the center again.
|
||||
$steps[7]['backdrop'] = true;
|
||||
$template = '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content">' .
|
||||
'</div><div class="popover-navigation"><div class="btn-group"><button class="btn btn-sm btn-default" data-role="prev">' .
|
||||
'« ' . trans('firefly.prev') . '</button><button class="btn btn-sm btn-default" data-role="next">' .
|
||||
trans('firefly.next') . ' »</button><button class="btn btn-sm btn-default" data-role="pause-resume" ' .
|
||||
'data-pause-text="Pause" data-resume-text="Resume">' . trans('firefly.pause') . '</button></div>' .
|
||||
'<button class="btn btn-sm btn-default" data-role="end">' . trans('firefly.end-tour') . '</button></div></div>';
|
||||
$template = view('json.tour')->render();
|
||||
|
||||
return Response::json(['steps' => $steps, 'template' => $template]);
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ class TransactionController extends Controller
|
||||
Session::forget('transactions.edit.fromUpdate');
|
||||
|
||||
|
||||
return View::make('transactions.edit', compact('journal', 'accounts', 'what', 'budgets', 'piggies', 'subTitle'))->with('data', $preFilled);
|
||||
return view('transactions.edit', compact('journal', 'accounts', 'what', 'budgets', 'piggies', 'subTitle'))->with('data', $preFilled);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,8 +30,8 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Transaction whereAmount($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Transaction after($date)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Transaction before($date)
|
||||
* @property-read float $before
|
||||
* @property-read float $after
|
||||
* @property float $before
|
||||
* @property float $after
|
||||
*/
|
||||
class Transaction extends Model
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ use Illuminate\Support\MessageBag;
|
||||
use Input;
|
||||
use RuntimeException;
|
||||
use Session;
|
||||
use View;
|
||||
|
||||
/**
|
||||
* Class ExpandedForm
|
||||
@ -40,7 +39,7 @@ class ExpandedForm
|
||||
$currencies = Amt::getAllCurrencies();
|
||||
unset($options['currency']);
|
||||
unset($options['placeholder']);
|
||||
$html = View::make('form.amount', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.amount', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
||||
@ -144,7 +143,7 @@ class ExpandedForm
|
||||
$currencies = Amt::getAllCurrencies();
|
||||
unset($options['currency']);
|
||||
unset($options['placeholder']);
|
||||
$html = View::make('form.balance', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.balance', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -167,7 +166,7 @@ class ExpandedForm
|
||||
|
||||
unset($options['placeholder'], $options['autocomplete'], $options['class']);
|
||||
|
||||
$html = View::make('form.checkbox', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.checkbox', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -186,7 +185,7 @@ class ExpandedForm
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
unset($options['placeholder']);
|
||||
$html = View::make('form.date', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.date', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -205,7 +204,7 @@ class ExpandedForm
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$options['step'] = '1';
|
||||
$html = View::make('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
||||
@ -224,7 +223,7 @@ class ExpandedForm
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$html = View::make('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.location', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
||||
@ -278,7 +277,7 @@ class ExpandedForm
|
||||
$selected = $this->fillFieldValue($name, $selected);
|
||||
|
||||
unset($options['class']);
|
||||
$html = View::make('form.multiCheckbox', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||
$html = view('form.multiCheckbox', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -299,7 +298,7 @@ class ExpandedForm
|
||||
$selected = $this->fillFieldValue($name, $selected);
|
||||
|
||||
unset($options['class']);
|
||||
$html = View::make('form.multiRadio', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||
$html = view('form.multiRadio', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -323,7 +322,7 @@ class ExpandedForm
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$previousValue = is_null($previousValue) ? 'store' : $previousValue;
|
||||
$html = View::make('form.options', compact('type', 'name', 'previousValue'))->render();
|
||||
$html = view('form.options', compact('type', 'name', 'previousValue'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -344,7 +343,7 @@ class ExpandedForm
|
||||
$selected = $this->fillFieldValue($name, $selected);
|
||||
unset($options['autocomplete']);
|
||||
unset($options['placeholder']);
|
||||
$html = View::make('form.select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||
$html = view('form.select', compact('classes', 'name', 'label', 'selected', 'options', 'list'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -363,7 +362,7 @@ class ExpandedForm
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$options['data-role'] = 'tagsinput';
|
||||
$html = View::make('form.tags', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.tags', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
}
|
||||
@ -379,7 +378,7 @@ class ExpandedForm
|
||||
$label = $this->label($name, $options);
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$html = View::make('form.file', compact('classes', 'name', 'label', 'options'))->render();
|
||||
$html = view('form.file', compact('classes', 'name', 'label', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
||||
@ -398,7 +397,7 @@ class ExpandedForm
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$html = View::make('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.text', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
||||
@ -418,7 +417,7 @@ class ExpandedForm
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$options['rows'] = 4;
|
||||
$html = View::make('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
$html = view('form.textarea', compact('classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
||||
|
13
resources/twig/json/tour.twig
Normal file
13
resources/twig/json/tour.twig
Normal file
@ -0,0 +1,13 @@
|
||||
<div class="popover" role="tooltip">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title"></h3>
|
||||
<div class="popover-content"></div>
|
||||
<div class="popover-navigation">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-sm btn-default" data-role="prev">« {{ 'prev'|_ }}</button>
|
||||
<button class="btn btn-sm btn-default" data-role="next">{{ 'prev'|_ }} »</button>
|
||||
<button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="{{ 'pause'|_ }}" data-resume-text="Resume"> {{ 'pause'|_ }}</button>
|
||||
</div>
|
||||
<button class="btn btn-sm btn-default" data-role="end">{{ 'end-tour'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user