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
906e9822
Commit
906e9822
authored
Oct 20, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preparing for multiple settings input types
parent
f9c6baf8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
module-settings.blade.php
Resources/views/admin/module-settings.blade.php
+18
-4
module-checkbox-field.blade.php
...rces/views/admin/partials/module-checkbox-field.blade.php
+9
-0
module-text-field.blade.php
Resources/views/admin/partials/module-text-field.blade.php
+9
-11
No files found.
Resources/views/admin/module-settings.blade.php
View file @
906e9822
...
@@ -25,13 +25,27 @@
...
@@ -25,13 +25,27 @@
</
ul
>
</
ul
>
<
div
class
="
tab
-
content
">
<
div
class
="
tab
-
content
">
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
'en'
?
'active'
:
''
}}
" id="
tab_1
-
1
">
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
'en'
?
'active'
:
''
}}
" id="
tab_1
-
1
">
<?php foreach(
$moduleSettings
as
$moduleInfo
): ?>
<?php foreach(
$moduleSettings
as
$settingName
=>
$moduleInfo
): ?>
@include("
setting
::
admin
.
partials
.
module
-
{
$moduleInfo
[
'type'
]}
-
field
", ['lang' => 'en', 'moduleSettings' =>
$moduleSettings
, 'settings' =>
$settings
, 'module' =>
$module
])
@include("
setting
::
admin
.
partials
.
module
-
{
$moduleInfo
[
'type'
]}
-
field
", [
'lang' => 'en',
'moduleSettings' =>
$moduleSettings
,
'settings' =>
$settings
,
'module' =>
$module
,
'setting' =>
$settingName
,
'moduleInfo' =>
$moduleInfo
,
])
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
'fr'
?
'active'
:
''
}}
" id="
tab_2
-
2
">
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
'fr'
?
'active'
:
''
}}
" id="
tab_2
-
2
">
<?php foreach(
$moduleSettings
as
$moduleInfo
): ?>
<?php foreach(
$moduleSettings
as
$settingName
=>
$moduleInfo
): ?>
@include("
setting
::
admin
.
partials
.
module
-
{
$moduleInfo
[
'type'
]}
-
field
", ['lang' => 'fr', 'moduleSettings' =>
$moduleSettings
, 'settings' =>
$settings
, 'module' =>
$module
])
@include("
setting
::
admin
.
partials
.
module
-
{
$moduleInfo
[
'type'
]}
-
field
", [
'lang' => 'fr',
'moduleSettings' =>
$moduleSettings
,
'settings' =>
$settings
,
'module' =>
$module
,
'setting' =>
$settingName
,
'moduleInfo' =>
$moduleInfo
,
])
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
...
...
Resources/views/admin/partials/module-checkbox-field.blade.php
0 → 100644
View file @
906e9822
<?php
$settingName
=
$module
.
'_'
.
$setting
;
?>
<div
class=
'form-group'
>
{!! Form::label($settingName . "[$lang]", $moduleInfo['description']) !!}
<?php
if
(
isset
(
$settings
[
$settingName
]))
:
?>
{!! Form::text($settingName . "[$lang]", Input::old($settingName . "[$lang]", $settings[$settingName]->translate($lang)->value), ['class' => 'form-control', 'placeholder' => $moduleInfo['description']]) !!}
<?php
else
:
?>
{!! Form::text($settingName . "[$lang]", Input::old($settingName . "[$lang]"), ['class' => 'form-control', 'placeholder' => $moduleInfo['description']]) !!}
<?php
endif
;
?>
</div>
Resources/views/admin/partials/module-text-field.blade.php
View file @
906e9822
<?php
foreach
(
$moduleSettings
as
$setting
=>
$moduleInfo
)
:
?>
<?php
$settingName
=
$module
.
'_'
.
$setting
;
?>
<?php
$settingName
=
$module
.
'_'
.
$setting
;
?>
<div
class=
'form-group'
>
<div
class=
'form-group'
>
{!! Form::label($settingName . "[$lang]", $moduleInfo['description']) !!}
{!! Form::label($settingName . "[$lang]", $moduleInfo['description']) !!}
<?php
if
(
isset
(
$settings
[
$settingName
]))
:
?>
<?php
if
(
isset
(
$settings
[
$settingName
]))
:
?>
{!! Form::text($settingName . "[$lang]", Input::old($settingName . "[$lang]", $settings[$settingName]->translate($lang)->value), ['class' => 'form-control', 'placeholder' => $moduleInfo['description']]) !!}
{!! Form::text($settingName . "[$lang]", Input::old($settingName . "[$lang]", $settings[$settingName]->translate($lang)->value), ['class' => 'form-control', 'placeholder' => $moduleInfo['description']]) !!}
<?php
else
:
?>
<?php
else
:
?>
{!! Form::text($settingName . "[$lang]", Input::old($settingName . "[$lang]"), ['class' => 'form-control', 'placeholder' => $moduleInfo['description']]) !!}
{!! Form::text($settingName . "[$lang]", Input::old($settingName . "[$lang]"), ['class' => 'form-control', 'placeholder' => $moduleInfo['description']]) !!}
<?php
endif
;
?>
<?php
endif
;
?>
</div>
</div>
<?php
endforeach
;
?>
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