Browse Source

Minor - improve form UI

Julio Montoya 5 years ago
parent
commit
9f63e4895a
3 changed files with 11 additions and 14 deletions
  1. 5 5
      app/Resources/public/css/base.css
  2. 6 7
      main/inc/lib/social.lib.php
  3. 0 2
      main/social/home.php

+ 5 - 5
app/Resources/public/css/base.css

@@ -2938,14 +2938,14 @@ form .formw .freeze {
 }
 
 #social_wall_main_wall_post_button{
-    background: #f5f6f7 !important;
+    /*background: #f5f6f7 !important;
     color: #7a7a7a !important;
-    border: 1px solid #bababa !important;
+    border: 1px solid #bababa !important;*/
 }
 #social_wall_main_wall_post_button:hover{
-    border: 1px solid #162a83 !important;
+    /*border: 1px solid #162a83 !important;
     background: #162a83 !important;
-    color: #ffffff !important;
+    color: #ffffff !important;*/
 }
 .input-file-container {
     position: relative;
@@ -2955,7 +2955,7 @@ form .formw .freeze {
 }
 .js .input-file-trigger {
     display: inline-block;
-    padding: 7px 15px;
+    padding: 6px 12px;
     background: #f5f6f7;
     color: #7a7a7a;
     font-size: 14px;

+ 6 - 7
main/inc/lib/social.lib.php

@@ -1836,14 +1836,14 @@ class SocialManager extends UserManager
         }
 
         $formattedList .= '</div>';
-        $formattedList .= '<div class="mediapost-form">';
+        $formattedList .= '<div class="mediapost-form row">';
         $formattedList .= '<form class="form-horizontal" id="form_comment_'.$messageId.'" name="post_comment" method="POST">
                 <div class="col-sm-9">
                 <label for="comment" class="hide">'.get_lang('SocialWriteNewComment').'</label>
                 <input type="hidden" name = "messageId" value="'.$messageId.'" />
                 <textarea rows="3" class="form-control" placeholder="'.get_lang('SocialWriteNewComment').'" name="comment" rows="1" ></textarea>
                 </div>
-                <div class="col-sm-3">
+                <div class="col-sm-3 pull-right">
                 <a onclick="submitComment('.$messageId.');" href="javascript:void(0);" name="social_wall_new_msg_submit" class="btn btn-default btn-post">
                     <em class="fa fa-pencil"></em> '.get_lang('Post').'
                 </a>
@@ -2450,15 +2450,15 @@ class SocialManager extends UserManager
             null,
             [
                 'placeholder' => $socialWallPlaceholder,
-                'cols-size' => [1, 10, 1],
+                'cols-size' => [1, 12, 1],
                 'aria-label' => $socialWallPlaceholder,
             ]
         );
         $form->addHtml('<div class="form-group">');
-        $form->addHtml('<div class="col-sm-4 col-md-offset-1">');
+        $form->addHtml('<div class="col-sm-6">');
         $form->addFile('picture', get_lang('UploadFile'), ['custom' => true]);
         $form->addHtml('</div>');
-        $form->addHtml('<div class="col-sm-6">');
+        $form->addHtml('<div class="col-sm-6 "><div class="pull-right">');
         $form->addButtonSend(
             get_lang('Post'),
             'wall_post_button',
@@ -2468,9 +2468,8 @@ class SocialManager extends UserManager
                 'custom' => true,
             ]
         );
+        $form->addHtml('</div></div>');
         $form->addHtml('</div>');
-        $form->addHtml('</div>');
-
         $form->addHidden('url_content', '');
         $html = Display::panel($form->returnForm(), get_lang('SocialWall'));
 

+ 0 - 2
main/social/home.php

@@ -27,8 +27,6 @@ if (api_get_setting('allow_social_tool') !== 'true') {
     exit;
 }
 
-$userGroup = new UserGroup();
-
 //fast upload image
 if (api_get_setting('profile', 'picture') == 'true') {
     $form = new FormValidator('profile', 'post', 'home.php', null, []);