Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
e4ad318b
Commit
e4ad318b
authored
Sep 14, 2018
by
Christian Giupponi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text input now can show a pre-definited value set in settings.php file
parent
88f6006c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
13 deletions
+19
-13
number.blade.php
...tting/Resources/views/admin/fields/plain/number.blade.php
+3
-2
text.blade.php
...Setting/Resources/views/admin/fields/plain/text.blade.php
+3
-2
textarea.blade.php
...ing/Resources/views/admin/fields/plain/textarea.blade.php
+3
-2
number.blade.php
...esources/views/admin/fields/translatable/number.blade.php
+4
-3
text.blade.php
.../Resources/views/admin/fields/translatable/text.blade.php
+3
-2
textarea.blade.php
...ources/views/admin/fields/translatable/textarea.blade.php
+3
-2
No files found.
Modules/Setting/Resources/views/admin/fields/plain/number.blade.php
View file @
e4ad318b
<?php
$defaultValue
=
isset
(
$moduleInfo
[
'default'
])
?
$moduleInfo
[
'default'
]
:
''
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName, trans($moduleInfo['description'])) !!}
<?php
if
(
isset
(
$dbSettings
[
$settingName
])
&&
$dbSettings
[
$settingName
]
->
plainValue
!==
null
)
:
?>
{!! Form::
input('number', $settingName, old($settingName, $dbSettings[$settingName]->plainValue)
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::
number($settingName, old($settingName, $dbSettings[$settingName]->plainValue) ?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
else
:
?>
{!! Form::
input('number', $settingName, old($settingName)
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::
number($settingName, old($settingName) ?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
endif
;
?>
</div>
Modules/Setting/Resources/views/admin/fields/plain/text.blade.php
View file @
e4ad318b
<?php
$defaultValue
=
isset
(
$moduleInfo
[
'default'
])
?
$moduleInfo
[
'default'
]
:
''
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName, trans($moduleInfo['description'])) !!}
<?php
if
(
isset
(
$dbSettings
[
$settingName
])
&&
$dbSettings
[
$settingName
]
->
plainValue
!==
null
)
:
?>
{!! Form::text($settingName, old($settingName, $dbSettings[$settingName]->plainValue), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::text($settingName, old($settingName, $dbSettings[$settingName]->plainValue)
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
else
:
?>
{!! Form::text($settingName, old($settingName), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::text($settingName, old($settingName)
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
endif
;
?>
</div>
Modules/Setting/Resources/views/admin/fields/plain/textarea.blade.php
View file @
e4ad318b
<?php
$defaultValue
=
isset
(
$moduleInfo
[
'default'
])
?
$moduleInfo
[
'default'
]
:
''
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName, trans($moduleInfo['description'])) !!}
<?php
if
(
isset
(
$dbSettings
[
$settingName
])
&&
$dbSettings
[
$settingName
]
->
plainValue
!==
null
)
:
?>
{!! Form::textarea($settingName, old($settingName, $dbSettings[$settingName]->plainValue), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::textarea($settingName, old($settingName, $dbSettings[$settingName]->plainValue)
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
else
:
?>
{!! Form::textarea($settingName, old($settingName), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::textarea($settingName, old($settingName)
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
endif
;
?>
</div>
Modules/Setting/Resources/views/admin/fields/translatable/number.blade.php
View file @
e4ad318b
<?php
$defaultValue
=
isset
(
$moduleInfo
[
'default'
])
?
$moduleInfo
[
'default'
]
:
''
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?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
$value
=
$dbSettings
[
$settingName
]
->
hasTranslation
(
$lang
)
?
$dbSettings
[
$settingName
]
->
translate
(
$lang
)
->
value
:
$defaultValue
;
?>
{!! Form::
number(
$settingName . "[$lang]", old($settingName . "[$lang]", $value), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
else
:
?>
{!! Form::
input('number', $settingName . "[$lang]", old($settingName . "[$lang]")
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::
number($settingName . "[$lang]", old($settingName . "[$lang]") ?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
endif
;
?>
</div>
Modules/Setting/Resources/views/admin/fields/translatable/text.blade.php
View file @
e4ad318b
<?php
$defaultValue
=
isset
(
$moduleInfo
[
'default'
])
?
$moduleInfo
[
'default'
]
:
''
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?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'])]) !!}
{!! Form::text($settingName . "[$lang]", old($settingName . "[$lang]", $value)
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
else
:
?>
{!! Form::text($settingName . "[$lang]", old($settingName . "[$lang]"), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::text($settingName . "[$lang]", old($settingName . "[$lang]")
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
endif
;
?>
</div>
Modules/Setting/Resources/views/admin/fields/translatable/textarea.blade.php
View file @
e4ad318b
<?php
$defaultValue
=
isset
(
$moduleInfo
[
'default'
])
?
$moduleInfo
[
'default'
]
:
''
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName . "[$lang]", trans($moduleInfo['description'])) !!}
<?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'])]) !!}
{!! Form::textarea($settingName . "[$lang]", old($settingName . "[$lang]", $value)
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
else
:
?>
{!! Form::textarea($settingName . "[$lang]", old($settingName . "[$lang]"), ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
{!! Form::textarea($settingName . "[$lang]", old($settingName . "[$lang]")
?: $defaultValue
, ['class' => 'form-control', 'placeholder' => trans($moduleInfo['description'])]) !!}
<?php
endif
;
?>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment