Browse Source

Upload files to 'design/views/generic/reply'

Stortebeker 6 years ago
parent
commit
fa62988b29
2 changed files with 50 additions and 37 deletions
  1. 46
    33
      design/views/generic/reply/quickreply.php
  2. 4
    4
      design/views/generic/reply/staffpm.php

+ 46
- 33
design/views/generic/reply/quickreply.php View File

37
  */
37
  */
38
   global $HeavyInfo, $UserSubscriptions, $ThreadInfo, $Document;
38
   global $HeavyInfo, $UserSubscriptions, $ThreadInfo, $Document;
39
 
39
 
40
-  if (G::$LoggedUser['DisablePosting']) {
40
+if (G::$LoggedUser['DisablePosting']) {
41
     return;
41
     return;
42
-  }
43
-  if (!isset($TextareaCols)) {
42
+}
43
+if (!isset($TextareaCols)) {
44
     $TextareaCols = 70;
44
     $TextareaCols = 70;
45
-  }
46
-  if (!isset($TextareaRows)) {
45
+}
46
+if (!isset($TextareaRows)) {
47
     $TextareaRows = 8;
47
     $TextareaRows = 8;
48
-  }
49
-  if (!isset($InputAction)) {
48
+}
49
+if (!isset($InputAction)) {
50
     $InputAction = 'reply';
50
     $InputAction = 'reply';
51
-  }
52
-  if (!isset($InputTitle)) {
51
+}
52
+if (!isset($InputTitle)) {
53
     $InputTitle = 'Post comment';
53
     $InputTitle = 'Post comment';
54
-  }
54
+}
55
 
55
 
56
-  $ReplyText = new TEXTAREA_PREVIEW('body', 'quickpost', '',
57
-      $TextareaCols, $TextareaRows, false, false, true, array(
56
+  $ReplyText = new TEXTAREA_PREVIEW(
57
+      'body',
58
+      'quickpost',
59
+      '',
60
+      $TextareaCols,
61
+      $TextareaRows,
62
+      false,
63
+      false,
64
+      true,
65
+      array(
58
         'tabindex="1"',
66
         'tabindex="1"',
59
         'onkeyup="resize(\'quickpost\')"'
67
         'onkeyup="resize(\'quickpost\')"'
60
-      ));
61
-?>
68
+      )
69
+  );
70
+    ?>
62
 
71
 
63
       <br />
72
       <br />
64
       <div id="reply_box">
73
       <div id="reply_box">
66
         <div class="box pad">
75
         <div class="box pad">
67
           <table class="forum_post box vertical_margin hidden preview_wrap" id="preview_wrap_<?=$ReplyText->getID()?>">
76
           <table class="forum_post box vertical_margin hidden preview_wrap" id="preview_wrap_<?=$ReplyText->getID()?>">
68
             <colgroup>
77
             <colgroup>
69
-<?  if (Users::has_avatars_enabled()) { ?>
78
+<?php  if (Users::has_avatars_enabled()) { ?>
70
               <col class="col_avatar" />
79
               <col class="col_avatar" />
71
-<?  } ?>
80
+<?php  } ?>
72
               <col class="col_post_body" />
81
               <col class="col_post_body" />
73
             </colgroup>
82
             </colgroup>
74
             <tr class="colhead_dark">
83
             <tr class="colhead_dark">
84
               </td>
93
               </td>
85
             </tr>
94
             </tr>
86
             <tr>
95
             <tr>
87
-<?  if (Users::has_avatars_enabled()) { ?>
96
+<?php  if (Users::has_avatars_enabled()) { ?>
88
               <td class="avatar valign_top">
97
               <td class="avatar valign_top">
89
                 <?=Users::show_avatar(G::$LoggedUser['Avatar'], G::$LoggedUser['ID'], G::$LoggedUser['Username'], (!isset($HeavyInfo['DisableAvatars']) || $HeavyInfo['DisableAvatars']))?>
98
                 <?=Users::show_avatar(G::$LoggedUser['Avatar'], G::$LoggedUser['ID'], G::$LoggedUser['Username'], (!isset($HeavyInfo['DisableAvatars']) || $HeavyInfo['DisableAvatars']))?>
90
               </td>
99
               </td>
91
-<?  } ?>
100
+<?php  } ?>
92
               <td class="body valign_top">
101
               <td class="body valign_top">
93
                 <div id="contentpreview" style="text-align: left;">
102
                 <div id="contentpreview" style="text-align: left;">
94
                   <div id="preview_<?=$ReplyText->getID()?>"></div>
103
                   <div id="preview_<?=$ReplyText->getID()?>"></div>
96
               </td>
105
               </td>
97
             </tr>
106
             </tr>
98
           </table>
107
           </table>
99
-          <form class="send_form center" name="reply" id="quickpostform" <?=isset($Action)?'action="'.$Action.'"':''?> method="post"<? if (!check_perms('users_mod')) { ?> onsubmit="quickpostform.submit_button.disabled = true;"<? } ?> <? if (!G::$LoggedUser['DisableAutoSave']) { ?>data-autosave-text="quickpost"<? } ?>>
108
+          <form class="send_form center" name="reply" id="quickpostform" <?=isset($Action)?'action="'.$Action.'"':''?> method="post"<?php if (!check_perms('users_mod')) {
109
+                ?> onsubmit="quickpostform.submit_button.disabled = true;"<?php
110
+                                                                         } ?> <?php if (!G::$LoggedUser['DisableAutoSave']) {
111
+    ?>data-autosave-text="quickpost"<?php
112
+                                                                         } ?>>
100
             <input type="hidden" name="action" value="<?=$InputAction?>" />
113
             <input type="hidden" name="action" value="<?=$InputAction?>" />
101
             <input type="hidden" name="auth" value="<?=G::$LoggedUser['AuthKey']?>" />
114
             <input type="hidden" name="auth" value="<?=G::$LoggedUser['AuthKey']?>" />
102
             <input type="hidden" name="<?=$InputName?>" data-autosave-id="<?=$InputID?>" value="<?=$InputID?>" />
115
             <input type="hidden" name="<?=$InputName?>" data-autosave-id="<?=$InputID?>" value="<?=$InputID?>" />
103
             <div id="quickreplytext">
116
             <div id="quickreplytext">
104
-<?
117
+<?php
105
               echo $ReplyText->getBuffer();
118
               echo $ReplyText->getBuffer();
106
 ?>
119
 ?>
107
               <br />
120
               <br />
108
             </div>
121
             </div>
109
             <div class="preview_submit">
122
             <div class="preview_submit">
110
-<?
111
-  if (isset($SubscribeBox) && !isset($ForumID) && Subscriptions::has_subscribed_comments($Document, $InputID) === false) {
112
-?>
123
+<?php
124
+if (isset($SubscribeBox) && !isset($ForumID) && Subscriptions::has_subscribed_comments($Document, $InputID) === false) {
125
+    ?>
113
               <input id="subscribebox" type="checkbox" name="subscribe"<?=!empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''?> tabindex="2" />
126
               <input id="subscribebox" type="checkbox" name="subscribe"<?=!empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''?> tabindex="2" />
114
               <label for="subscribebox">Subscribe</label>
127
               <label for="subscribebox">Subscribe</label>
115
-<?
116
-  }
128
+    <?php
129
+}
117
   // Forum thread logic
130
   // Forum thread logic
118
   // This might use some more abstraction
131
   // This might use some more abstraction
119
-  if (isset($ForumID)) {
132
+if (isset($ForumID)) {
120
     if (!Subscriptions::has_subscribed($InputID)) {
133
     if (!Subscriptions::has_subscribed($InputID)) {
121
-?>
134
+        ?>
122
               <input id="subscribebox" type="checkbox" name="subscribe"<?=!empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''?> tabindex="2" />
135
               <input id="subscribebox" type="checkbox" name="subscribe"<?=!empty($HeavyInfo['AutoSubscribe']) ? ' checked="checked"' : ''?> tabindex="2" />
123
               <label for="subscribebox">Subscribe</label>
136
               <label for="subscribebox">Subscribe</label>
124
-<?
137
+        <?php
125
     }
138
     }
126
     if ($ThreadInfo['LastPostAuthorID'] == G::$LoggedUser['ID']
139
     if ($ThreadInfo['LastPostAuthorID'] == G::$LoggedUser['ID']
127
-      && (check_perms('site_forums_double_post')
128
-        || in_array($ForumID, FORUMS_TO_ALLOW_DOUBLE_POST))
140
+    && (check_perms('site_forums_double_post')
141
+      || in_array($ForumID, FORUMS_TO_ALLOW_DOUBLE_POST))
129
     ) {
142
     ) {
130
-?>
143
+        ?>
131
               <input id="mergebox" type="checkbox" name="merge" tabindex="2" />
144
               <input id="mergebox" type="checkbox" name="merge" tabindex="2" />
132
               <label for="mergebox">Merge</label>
145
               <label for="mergebox">Merge</label>
133
-<?
146
+        <?php
134
     }
147
     }
135
-  }
148
+}
136
 ?>
149
 ?>
137
               <input type="button" value="Preview" class="hidden button_preview_<?=$ReplyText->getID()?>" tabindex="1" />
150
               <input type="button" value="Preview" class="hidden button_preview_<?=$ReplyText->getID()?>" tabindex="1" />
138
               <input type="submit" value="Post reply" id="submit_button" tabindex="1" />
151
               <input type="submit" value="Post reply" id="submit_button" tabindex="1" />

+ 4
- 4
design/views/generic/reply/staffpm.php View File

6
         <br />
6
         <br />
7
 
7
 
8
         <h3><label for="message">Message</label></h3>
8
         <h3><label for="message">Message</label></h3>
9
-<?
9
+<?php
10
         $TextPrev = new TEXTAREA_PREVIEW('message', 'message', '', 95, 10, true, false);
10
         $TextPrev = new TEXTAREA_PREVIEW('message', 'message', '', 95, 10, true, false);
11
-?>
11
+    ?>
12
         <br />
12
         <br />
13
 
13
 
14
         <strong>Send to: </strong>
14
         <strong>Send to: </strong>
15
         <select name="level">
15
         <select name="level">
16
-<?      if (!isset(G::$LoggedUser['LockedAccount'])) { ?>
16
+<?php      if (!isset(G::$LoggedUser['LockedAccount'])) { ?>
17
           <option value="0" selected="selected">First Line Support</option>
17
           <option value="0" selected="selected">First Line Support</option>
18
           <option value="800">Forum Moderators</option>
18
           <option value="800">Forum Moderators</option>
19
-<?      } ?>
19
+<?php      } ?>
20
           <option value="1000">Staff</option>
20
           <option value="1000">Staff</option>
21
         </select>
21
         </select>
22
 
22
 

Loading…
Cancel
Save