Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
survey
Commits
7e89cc6a
Commit
7e89cc6a
authored
Apr 08, 2020
by
Tibor Katelbach
Browse files
tweak
parent
764e7a1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/tpls/forms/oforms.php
View file @
7e89cc6a
...
...
@@ -15,7 +15,7 @@ foreach ($forms as $fix => $f) {
<h4
class=
"letter-turq "
>
<span
class=
"col-xs-10"
>
<?php
echo
(
isset
(
$f
[
'name'
]))
?
$f
[
'name'
]
:
"Formulaire "
.
$el
[
"slug"
]
?>
</span>
<span
class=
"col-xs-2"
>
<!--
<a href="javascript:;" class="editFormBtn" data-id="
<?php
echo
$fix
?>
"><i class="fa fa-pencil text-dark"></i></a>
-->
<a
href=
"javascript:;"
class=
"editFormBtn"
data-id=
"
<?php
echo
$fix
?>
"
><i
class=
"fa fa-pencil text-dark"
></i></a>
<a
href=
"javascript:;"
class=
"deleteFormBtn"
data-id=
"
<?php
echo
$fix
?>
"
><i
class=
"fa fa-trash text-red"
></i></a>
</span></h4>
steps :
<br/>
<?php
...
...
@@ -30,7 +30,7 @@ foreach ($forms as $fix => $f) {
<a
href=
'javascript:;'
data-id=
'
<?php
echo
$fix
?>
'
class=
"configBtn btn btn-xs btn-danger col-sm-4 col-sm-12 bold"
>
<i
class=
'fa fa-cogs'
></i>
CONFIG
</a>
<a
href=
'costum/co/index/slug/
<?php
echo
$el
[
"slug"
]
?>
/form/
<?php
echo
$fix
?>
'
class=
"btn btn-xs btn-primary col-sm-4 col-xs-12 bold"
>
<a
href=
'costum/co/index/slug/
<?php
echo
$el
[
"slug"
]
?>
/form/
<?php
echo
$fix
?>
#answer.id.new
'
class=
"btn btn-xs btn-primary col-sm-4 col-xs-12 bold"
>
<i
class=
'fa fa-file-text-o'
></i>
RÉPONDRE
</a>
</div>
...
...
@@ -60,7 +60,10 @@ jQuery(document).ready(function() {
mylog
.
log
(
"
configBtn
"
,
tplCtx
.
id
);
dyFObj
.
openForm
(
oformParams
,
null
,
formsData
[
$
(
this
).
data
(
"
id
"
)]
)
});
$
(
'
.editFormBtn
'
).
off
().
click
(
function
(){
tplCtx
.
id
=
$
(
this
).
data
(
"
id
"
);
dyFObj
.
openForm
(
oformParams
,
null
,
formsData
[
$
(
this
).
data
(
"
id
"
)]
)
});
$
(
'
.deleteFormBtn
'
).
off
().
click
(
function
(){
tplCtx
.
id
=
$
(
this
).
data
(
"
id
"
);
bootbox
.
dialog
({
...
...
@@ -151,7 +154,7 @@ var oformParams = {
description
:
"
lisez bien les options
"
,
icon
:
"
fa-question
"
,
properties
:
{
step
s
:
{
id
s
:
{
inputType
:
"
array
"
,
label
:
"
Nommé chaque étape de votre questionnaire
"
,
//subLabel : "Vous remplirez les question de chaques étapes par la suite",
...
...
@@ -217,6 +220,22 @@ var oformParams = {
tplCtx
.
value
[
k
]
=
getPairsObj
(
'
.
'
+
k
+
val
.
inputType
);
else
if
(
val
.
inputType
==
"
array
"
){
tplCtx
.
value
[
k
]
=
getArray
(
'
.
'
+
k
+
val
.
inputType
);
if
(
k
==
"
ids
"
){
$
.
each
(
tplCtx
.
value
[
k
],
function
(
ix
,
fName
)
{
var
newFormId
=
"
<?php
echo
$el
[
"slug"
]
?>
"
+
slugify
(
fName
);
tplCtx
.
value
[
k
][
ix
]
=
newFormId
;
var
newForm
=
{
collection
:
"
forms
"
,
value
:
{
id
:
newFormId
,
name
:
fName
,
type
:
"
openForm
"
,
}
};
dataHelper
.
path2Value
(
newForm
,
function
()
{
}
);
})
}
}
else
tplCtx
.
value
[
k
]
=
$
(
"
#
"
+
k
).
val
();
...
...
Write
Preview
Supports
Markdown
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