Commit 4bb21fca authored by Nicolas Widart's avatar Nicolas Widart

Removing the plainValue checks on translatable fields.

Those are always null on translatable fields, thus can't be used here.
parent 5e35e007
<div class='form-group'>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?php if (isset($dbSettings[$settingName]) && $dbSettings[$settingName]->plainValue !== null): ?>
<?php if (isset($dbSettings[$settingName])): ?>
<?php $value = $dbSettings[$settingName]->hasTranslation($lang) ? $dbSettings[$settingName]->translate($lang)->value : ''; ?>
{!! Form::input('number', $settingName . "[$lang]", old($settingName . "[$lang]", $value), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php else: ?>
......
<div class='form-group'>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?php if (isset($dbSettings[$settingName]) && $dbSettings[$settingName]->plainValue !== null): ?>
<?php if (isset($dbSettings[$settingName])): ?>
<?php $value = $dbSettings[$settingName]->hasTranslation($lang) ? $dbSettings[$settingName]->translate($lang)->value : ''; ?>
{!! Form::text($settingName . "[$lang]", old($settingName . "[$lang]", $value), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php else: ?>
......
<div class='form-group'>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?php if (isset($dbSettings[$settingName]) && $dbSettings[$settingName]->plainValue !== null): ?>
<?php if (isset($dbSettings[$settingName])): ?>
<?php $value = $dbSettings[$settingName]->hasTranslation($lang) ? $dbSettings[$settingName]->translate($lang)->value : ''; ?>
{!! Form::textarea($settingName . "[$lang]", old($settingName . "[$lang]", $value), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php else: ?>
......
<div class='form-group'>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?php if (isset($dbSettings[$settingName]) && $dbSettings[$settingName]->plainValue !== null): ?>
<?php if (isset($dbSettings[$settingName])): ?>
<?php $value = $dbSettings[$settingName]->hasTranslation($lang) ? $dbSettings[$settingName]->translate($lang)->value : ''; ?>
{!! Form::textarea($settingName . "[$lang]", old($settingName . "[$lang]", $value), ['class' => 'form-control ckeditor', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php else: ?>
......
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