Browse Source

Put bbcode toolbar on more textareas

spaghetti 3 years ago
parent
commit
2ba683489d

+ 3
- 4
sections/inbox/conversation.php View File

@@ -116,11 +116,10 @@ if (!empty($ReceiverIDs) && (empty($LoggedUser['DisablePM']) || array_intersect(
116 116
       <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
117 117
       <input type="hidden" name="toid" value="<?=implode(',', $ReceiverIDs)?>" />
118 118
       <input type="hidden" name="convid" value="<?=$ConvID?>" />
119
-      <textarea id="quickpost" class="required" name="body" cols="90" rows="10" onkeyup="resize('quickpost');"></textarea> <br />
120
-      <div id="preview" class="box vertical_space body hidden"></div>
119
+<?    $Reply = new TEXTAREA_PREVIEW('body', 'quickpost', '', 90, 10, true, false); ?>
121 120
       <div id="buttons" class="center">
122
-        <input type="button" value="Preview" onclick="Quick_Preview();" />
123
-        <input type="submit" value="Send message" />
121
+        <input type="button" value="Preview" class="hidden button_preview_<?=$Reply->getID()?>">
122
+        <input type="submit" value="Send message">
124 123
       </div>
125 124
     </div>
126 125
   </form>

+ 2
- 2
sections/requests/new_edit.php View File

@@ -95,7 +95,7 @@ if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
95 95
   }
96 96
 }
97 97
 
98
-View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'requests,form_validate');
98
+View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'bbcode,requests,form_validate');
99 99
 ?>
100 100
 <div class="thin">
101 101
   <div class="header">
@@ -238,7 +238,7 @@ View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'reques
238 238
         <tr>
239 239
           <td class="label">Description</td>
240 240
           <td>
241
-            <textarea id="req_desc" name="description" cols="70" rows="7"><?=(!empty($Request['Description']) ? $Request['Description'] : '')?></textarea> <br />
241
+<?          new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
242 242
           </td>
243 243
         </tr>
244 244
 <?  if (check_perms('site_moderate_requests')) { ?>

+ 8
- 9
sections/tools/managers/news.php View File

@@ -40,21 +40,20 @@ switch ($_GET['action']) {
40 40
   </div>
41 41
   <form class="<?= ($_GET['action'] == 'news') ? 'create_form' : 'edit_form';?>" name="news_post" action="tools.php" method="post">
42 42
     <div class="box pad">
43
-      <input type="hidden" name="action" value="<?= ($_GET['action'] == 'news') ? 'takenewnews' : 'takeeditnews';?>" />
44
-      <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
43
+      <input type="hidden" name="action" value="<?= ($_GET['action'] == 'news') ? 'takenewnews' : 'takeeditnews';?>">
44
+      <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>">
45 45
 <? if ($_GET['action'] == 'editnews') { ?>
46
-      <input type="hidden" name="newsid" value="<?=$NewsID; ?>" />
46
+      <input type="hidden" name="newsid" value="<?=$NewsID; ?>">
47 47
 <? } ?>
48 48
       <h3>Title</h3>
49
-      <input type="text" name="title" size="95"<? if (!empty($Title)) { echo ' value="'.display_str($Title).'"'; } ?> />
49
+      <input type="text" name="title" size="95"<? if (!empty($Title)) { echo ' value="'.display_str($Title).'"'; } ?>>
50 50
 <!-- Why did someone add this?  <input type="datetime" name="datetime" value="<?=sqltime()?>" /> -->
51
-      <br />
51
+      <br>
52 52
       <h3>Body</h3>
53
-      <textarea name="body" cols="95" rows="15"><? if (!empty($Body)) { echo display_str($Body); } ?></textarea> <br /><br />
54
-
55
-
53
+<?    $Textarea = new TEXTAREA_PREVIEW('body', '', display_str($Body), 95, 15, true, false); ?>
56 54
       <div class="center">
57
-        <input type="submit" value="<?= ($_GET['action'] == 'news') ? 'Create news post' : 'Edit news post';?>" />
55
+        <input type="button" value="Preview" class="hidden button_preview_<?=$Textarea->getID()?>">
56
+        <input type="submit" value="<?= ($_GET['action'] == 'news') ? 'Create news post' : 'Edit news post';?>">
58 57
       </div>
59 58
     </div>
60 59
   </form>

+ 1
- 1
sections/wiki/edit.php View File

@@ -10,7 +10,7 @@ if ($Edit > $LoggedUser['EffectiveClass']) {
10 10
   error('You do not have access to edit this article.');
11 11
 }
12 12
 
13
-View::show_header('Edit '.$Title);
13
+View::show_header('Edit '.$Title, 'bbcode');
14 14
 ?>
15 15
 <div class="thin">
16 16
   <div class="box pad">

Loading…
Cancel
Save