Commit 03f8bb67 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge changes I4a4093cb,I54d06c52

* changes:
  Adding a label for the forum topic list checkbox (Bug #1426983)
  Adding ability to fill in a tinymce form (Bug #1447449)
parents 731598e4 a30b56dd
...@@ -794,4 +794,20 @@ class BehatGeneral extends BehatBase { ...@@ -794,4 +794,20 @@ class BehatGeneral extends BehatBase {
return; return;
} }
} }
/**
* Fills in WYSIWYG editor with specified id.
*
* @Given /^(?:|I )fill in "(?P<text>[^"]*)" in WYSIWYG editor "(?P<iframe>[^"]*)"$/
*/
public function iFillInInWYSIWYGEditor($text, $iframe) {
try {
$this->getSession()->switchToIFrame($iframe);
}
catch (Exception $e) {
throw new \Exception(sprintf("No iframe with id '%s' found on the page '%s'.", $iframe, $this->getSession()->getCurrentUrl()));
}
$this->getSession()->executeScript("document.body.innerHTML = '<p>".$text."</p>'");
$this->getSession()->switchToIFrame();
}
} }
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
</td> </td>
<td class="narrow"> <td class="narrow">
{if $membership && (!$forum->subscribed || $moderator)} {if $membership && (!$forum->subscribed || $moderator)}
<input type="checkbox" name="checked[{$topic->id}]" class="topic-checkbox"> <input id="topic_{$topic->id}" type="checkbox" name="checked[{$topic->id}]" class="topic-checkbox">
{/if} {/if}
</td> </td>
<td class="topic"> <td class="topic">
<h3 class="title"><a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}">{$topic->subject}</a>{if $publicgroup}<a href="{$topic->feedlink}"><img class="feedicon" src="{theme_image_url filename='feed'}"></a>{/if}</h3> <h3 class="title"><a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}"><label for="topic_{$topic->id}">{$topic->subject}</label></a>{if $publicgroup}<a href="{$topic->feedlink}"><img class="feedicon" src="{theme_image_url filename='feed'}"></a>{/if}</h3>
<div class="detail">{$topic->body|str_shorten_html:50:true:false|safe}</div> <div class="detail">{$topic->body|str_shorten_html:50:true:false|safe}</div>
</td> </td>
<td class="postertd"> <td class="postertd">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment