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
Translations
annotation_www
Commits
d02548a2
Commit
d02548a2
authored
Jan 16, 2014
by
Martin Gregor
Browse files
pridanie html labelov
parent
3bf5ac79
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/presenters/HomepagePresenter.php
View file @
d02548a2
...
...
@@ -70,7 +70,8 @@ class HomepagePresenter extends BasePresenter
$form
=
new
Nette\Application\UI\Form
();
foreach
(
$this
->
sentences
as
$id
=>
$sentence
)
{
$form
->
addRadioList
(
'sentence'
.
$id
,
$sentence
[
0
],[
'correct'
=>
'Správne'
,
'incorrect'
=>
'Nesprávne'
]);
$label
=
\
Nette\Utils\Html
::
el
()
->
setHtml
(
$sentence
[
0
]);
$form
->
addRadioList
(
'sentence'
.
$id
,
$label
,[
'correct'
=>
'Správne'
,
'incorrect'
=>
'Nesprávne'
]);
foreach
(
$sentence
[
1
]
as
$position
=>
$word
)
{
$form
->
addText
(
$id
.
'word'
.
$position
,
'Preklad '
.
$word
,
40
,
100
);
...
...
@@ -200,7 +201,8 @@ class HomepagePresenter extends BasePresenter
if
(
$this
->
en_words
[
$position
]
!=
null
)
{
$words
[
$position
]
=
$this
->
en_words
[
$position
]
->
word
;
$words
[
$position
]
=
'<span class="translation"><span class="en-word">'
.
$this
->
en_words
[
$position
]
->
word
.
'</span><span class="sk-word" style="display: none;">'
.
$this
->
words
[
$position
]
.
'</span></span>'
;
$sentence
=
implode
(
' '
,
$words
);
if
(
!
isset
(
$this
->
sentences
[
$sentence
]))
{
...
...
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