Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Pixel Humain
survey
Commits
0a64f915
Commit
0a64f915
authored
Apr 15, 2020
by
Tibor Katelbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks
parent
3248ed16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
56 deletions
+41
-56
views/tpls/forms/config.php
views/tpls/forms/config.php
+38
-18
views/tpls/forms/formWizard.php
views/tpls/forms/formWizard.php
+2
-37
views/tpls/forms/oforms.php
views/tpls/forms/oforms.php
+1
-1
No files found.
views/tpls/forms/config.php
View file @
0a64f915
...
...
@@ -137,24 +137,15 @@ var addStepParams = {
tplCtx
.
collection
=
"
forms
"
;
tplCtx
.
path
=
"
subForms
"
;
tplCtx
.
value
=
subForms
;
var
now
=
new
Date
();
var
cx
=
""
+
now
.
getDate
()
+
(
now
.
getMonth
()
+
1
)
+
now
.
getFullYear
()
+
"
_
"
+
now
.
getHours
()
+
now
.
getMinutes
();
var
newFormId
=
"
<?php
echo
$el
[
"slug"
]
?>
"
+
cx
+
"
_
"
+
tplCtx
.
value
.
length
;
tplCtx
.
value
.
push
(
newFormId
);
if
(
formData
.
name
.
indexOf
(
"
form:
"
)
>=
0
){
var
parts
=
formData
.
name
.
split
(
"
:
"
);
mylog
.
log
(
"
addStepParams added existing form
"
,
parts
[
1
]
);
if
(
typeof
tplCtx
.
value
==
"
undefined
"
)
tplCtx
.
value
=
[
parts
[
1
]
];
else
tplCtx
.
value
.
push
(
parts
[
1
]
);
var
newForm
=
{
collection
:
"
forms
"
,
value
:
{
id
:
newFormId
,
name
:
formData
.
name
,
type
:
"
openForm
"
,
inputs
:
{}
}
};
mylog
.
log
(
"
addStepParams new sub Form
"
,
newForm
);
dataHelper
.
path2Value
(
newForm
,
function
()
{
mylog
.
log
(
"
addStepParams created new sub Form
"
,
newFormId
);
if
(
typeof
tplCtx
.
value
==
"
undefined
"
)
toastr
.
error
(
'
value cannot be empty!
'
);
else
{
...
...
@@ -163,7 +154,36 @@ var addStepParams = {
urlCtrl
.
loadByHash
(
location
.
hash
);
}
);
}
}
);
}
else
{
var
now
=
new
Date
();
var
cx
=
""
+
now
.
getDate
()
+
(
now
.
getMonth
()
+
1
)
+
now
.
getFullYear
()
+
"
_
"
+
now
.
getHours
()
+
now
.
getMinutes
();
var
newFormId
=
"
<?php
echo
$el
[
"slug"
]
?>
"
+
cx
+
"
_
"
+
tplCtx
.
value
.
length
;
tplCtx
.
value
.
push
(
newFormId
);
var
newForm
=
{
collection
:
"
forms
"
,
value
:
{
id
:
newFormId
,
name
:
formData
.
name
,
type
:
"
openForm
"
,
inputs
:
{}
}
};
mylog
.
log
(
"
addStepParams new sub Form
"
,
newForm
);
dataHelper
.
path2Value
(
newForm
,
function
()
{
mylog
.
log
(
"
addStepParams created new sub Form
"
,
newFormId
);
if
(
typeof
tplCtx
.
value
==
"
undefined
"
)
toastr
.
error
(
'
value cannot be empty!
'
);
else
{
mylog
.
log
(
"
addStepParams save tplCtx
"
,
tplCtx
);
dataHelper
.
path2Value
(
tplCtx
,
function
(
params
)
{
urlCtrl
.
loadByHash
(
location
.
hash
);
}
);
}
}
);
}
}
}
};
...
...
views/tpls/forms/formWizard.php
View file @
0a64f915
...
...
@@ -181,42 +181,7 @@ if($canEdit)
</div>
<div
class=
"col-xs-12 text-center "
style=
"font-size: 1.5em; padding-top: 20px;"
>
<?php
if
(
isset
(
$this
->
costum
[
"cms"
][
"textIntro"
])){
echo
htmlentities
(
$this
->
costum
[
"cms"
][
"textIntro"
]);
}
else
{
?>
<b>
Lorem ipsum dolor sit amet
</b>
, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<br/><br/>
<b>
Lorem ipsum dolor sit amet
</b>
, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<br/><br/>
<b>
Lorem ipsum dolor sit amet
</b>
, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<br/><br/>
<b>
Lorem ipsum dolor sit amet
</b>
, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<?php
}
if
(
$canEdit
)
echo
"<a class='btn btn-xs btn-danger editBtn' href='javascript:;' data-key='textIntro' data-type='textarea' data-markdown='1' data-path='costum.cms.textIntro' data-label='Expliquez les objectifs de ce formulaire ? '><i class='fa fa-pencil'></i></a>"
;
?>
</div>
</div><br/>
...
...
@@ -238,7 +203,7 @@ if($canEdit)
<?php
if
(
isset
(
$this
->
costum
[
"cms"
][
"sec1Title"
])){
echo
htmlentities
(
$this
->
costum
[
"cms"
][
"sec1Title"
]);
}
else
{
?>
Sondage
<?php
}
}
else
{
?>
Open Form
<?php
}
if
(
$canEdit
)
echo
"<a class='btn btn-xs btn-danger editBtn' href='javascript:;' data-key='sec1Title' data-type='text' data-path='costum.cms.sec1Title' data-label='Titre '><i class='fa fa-pencil'></i></a>"
;
?>
...
...
views/tpls/forms/oforms.php
View file @
0a64f915
...
...
@@ -56,7 +56,7 @@ foreach ($forms as $fix => $f) {
<i class='fa fa-file-text-o'></i> RÉPONDRE
</a>
<?php
}
else
{
?>
<a target='_blank' href='costum/co/index/slug/
<?php
echo
$el
[
"slug"
]
?>
#form.edit.id.
<?php
echo
$fix
?>
' class="btn btn-xs btn-primary col-md-4 col-sm-12 bold">
<a target='_blank' href='costum/co/index/slug/
<?php
echo
$el
[
"slug"
]
?>
/form/
<?php
echo
$fix
?>
#form.edit.id.
<?php
echo
$fix
?>
' class="btn btn-xs btn-primary col-md-4 col-sm-12 bold">
<i class='fa fa-pencil'></i> CONSTRUIRE
</a>
<?php
}
?>
...
...
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