Fix CS
[tt-rss-micropub.git] / commentform.phtml
1 <h2>Reply to this post</h2>
2 <div class="postReply" id="postReply">
3  <form method="post" action="backend.php" id="postReplyForm"
4        dojoType="dijit.form.Form">
5   <script type="dojo/method" event="onSubmit" args="evt">
6   evt.preventDefault();
7   if (this.validate()) {
8       notify_progress('Sending reply...', true);
9
10       new Ajax.Request('backend.php', {
11           parameters: dojo.objectToQuery(this.getValues()),
12           onSuccess: function(transport) {
13               notify_info(transport.responseJSON.message);
14               $('postReplyUrl').writeAttribute(
15                   'href', transport.responseJSON.location
16               );
17               $('postReplyUrl').innerHTML = transport.responseJSON.location;
18               //Effect.Shrink('postReply');
19               //Effect.Grow('postReplySuccess');
20               $('postReply').hide();
21               $('postReplySuccess').show();
22           },
23           onFailure: function(transport) {
24               notify_error(transport.responseText);
25           }
26       });
27   }
28   </script>
29
30   <?php print_hidden('op', 'pluginhandler'); ?>
31   <?php print_hidden('plugin', 'micropub'); ?>
32   <?php print_hidden('method', 'action'); ?>
33   <?php print_hidden('mode', 'post'); ?>
34
35   <?php print_hidden('replyTo', htmlspecialchars($article['link'])); ?>
36
37   <?php if (count($accounts) == 1) { ?>
38    <?php print_hidden('me', htmlspecialchars(reset($accounts))); ?>
39   <?php } else { ?>
40    <label for="micropub-me">Identity:</label>
41    <?php print_select('micropub-me', null, $accounts,
42      'dojoType="dijit.form.Select" size="1"', 'me'); ?>
43    <br/>
44   <?php } ?>
45
46   <textarea name="content" rows="4" cols="60"
47             style="width:95%; height: auto"
48             dojoType="dijit.form.SimpleTextarea"
49    ></textarea><br/>
50   <button type="submit">Post comment</button>
51  </form>
52
53  <div class="reply" style="text-align: right">
54   or
55   <a href="<?= htmlspecialchars($quillUrl) ?>" class="mpbutton dijitButton" target="_blank">
56    Reply with Quill
57   </a>
58  </div>
59 </div>
60
61 <div id="postReplySuccess" class="alert alert-success" style="display:none">
62  Post created at <a id="postReplyUrl" href="#"></a>.
63 </div>