Polycapa пре 7 година
родитељ
комит
73ba61f5f3

+ 19 - 6
main/admin/course_add.php

@@ -42,10 +42,13 @@ $form = new FormValidator('update_course');
 $form->addElement('header', $tool_name);
 
 // Title
-$form->addText('title', get_lang('Title'), true,
-array(
-    'id' => 'title'
-));
+$form->addText(
+    'title',
+    get_lang('Title'),
+    true,
+    array(
+        'id' => 'title'
+    ));
 $form->applyFilter('title', 'html_filter');
 $form->applyFilter('title', 'trim');
 
@@ -96,12 +99,22 @@ $form->addElement(
 );
 
 // Course department
-$form->addText('department_name', get_lang('CourseDepartment'), false, array('size' => '60', 'id' => 'department_name'));
+$form->addText(
+    'department_name',
+    get_lang('CourseDepartment'),
+    false,
+    array('size' => '60', 'id' => 'department_name')
+);
 $form->applyFilter('department_name', 'html_filter');
 $form->applyFilter('department_name', 'trim');
 
 // Department URL
-$form->addText('department_url', get_lang('CourseDepartmentURL'), false, array('size' => '60', 'id' => 'department_url'));
+$form->addText(
+    'department_url',
+    get_lang('CourseDepartmentURL'),
+    false,
+    array('size' => '60', 'id' => 'department_url')
+);
 $form->applyFilter('department_url', 'html_filter');
 
 // Course language.

+ 6 - 1
main/admin/course_list.php

@@ -351,7 +351,12 @@ if (isset ($_GET['search']) && $_GET['search'] === 'advanced') {
     }
     // Create a search-box
     $form = new FormValidator('search_simple', 'get', '', '', array(), FormValidator::LAYOUT_INLINE);
-    $form->addElement('text', 'keyword', null, array('id' => 'course-search-keyword', 'aria-label' => get_lang('SearchCourse')));
+    $form->addElement(
+        'text',
+        'keyword',
+        null,
+        array('id' => 'course-search-keyword', 'aria-label' => get_lang('SearchCourse'))
+    );
     $form->addButtonSearch(get_lang('SearchCourse'));
     $advanced = '<a class="btn btn-default" href="'.api_get_path(WEB_CODE_PATH).'admin/course_list.php?search=advanced"><em class="fa fa-search"></em> '.get_lang('AdvancedSearch').'</a>';
 

+ 9 - 2
main/admin/index.php

@@ -201,7 +201,10 @@ if (api_is_platform_admin()) {
 
     $search_form = ' <form method="get" action="settings.php" class="form-inline">
             <div class="form-group">
-                <input class="form-control" type="text" name="search_field" value="" aria-label="'.get_lang('Search').'" >
+                <input class="form-control"
+                type="text"
+                name="search_field" value=""
+                aria-label="'.get_lang('Search').'" >
                 <input type="hidden" value="search_setting" name="category">
                 <button class="btn btn-default" type="submit">
                     <em class="fa fa-search"></em> ' . get_lang('Search').'
@@ -282,7 +285,11 @@ $sessionPath = api_get_path(WEB_CODE_PATH).'session/';
 
 $search_form = ' <form method="GET" class="form-inline" action="'.$sessionPath.'session_list.php">
                     <div class="form-group">
-                        <input class="form-control" type="text" name="keyword" value="" aria-label="'.get_lang('Search').'">
+                        <input class="form-control"
+                        type="text"
+                        name="keyword"
+                        value=""
+                        aria-label="'.get_lang('Search').'">
                         <button class="btn btn-default" type="submit">
                             <em class="fa fa-search"></em> ' . get_lang('Search').'
                         </button>

+ 22 - 3
main/admin/settings.lib.php

@@ -1370,7 +1370,13 @@ function generateSettingsForm($settings, $settings_by_access_list)
                     if (file_exists($file)) {
                         $value = file_get_contents($file);
                     }
-                    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10', 'id' => $row['variable']), $hideme);
+                    $form->addElement(
+                        'textarea',
+                        $row['variable'],
+                        array(get_lang($row['title']), get_lang($row['comment'])),
+                        array('rows'=>'10', 'id' => $row['variable']),
+                        $hideme
+                    );
                     $default_values[$row['variable']] = $value;
                 } elseif ($row['variable'] == 'footer_extra_content') {
                     $file = api_get_home_path().'footer_extra_content.txt';
@@ -1378,10 +1384,23 @@ function generateSettingsForm($settings, $settings_by_access_list)
                     if (file_exists($file)) {
                         $value = file_get_contents($file);
                     }
-                    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10', 'id' => $row['variable']), $hideme);
+                    $form->addElement(
+                        'textarea',
+                        $row['variable'],
+                        array(get_lang($row['title']), get_lang($row['comment'])),
+                        array('rows'=>'10', 'id' => $row['variable']),
+                        $hideme
+                    );
                     $default_values[$row['variable']] = $value;
                 } else {
-                    $form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10', 'id' => $row['variable']), $hideme);
+                    $form->addElement(
+                        'textarea',
+                        $row['variable'],
+                        array(get_lang($row['title']),
+                        get_lang($row['comment'])),
+                        array('rows'=>'10', 'id' => $row['variable']),
+                        $hideme
+                    );
                     $default_values[$row['variable']] = $row['selected_value'];
                 }
                 break;

+ 6 - 4
main/admin/subscribe_user2course.php

@@ -293,8 +293,9 @@ if (is_array($extra_field_list)) {
      <b><?php echo get_lang('UserList'); ?></b>
      <br/><br/>
         <?php echo get_lang('FirstLetterUser'); ?> :
-     <select name="firstLetterUser" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();"
-     aria-label="<?php echo get_lang('FirstLetterUser'); ?>">
+     <select name="firstLetterUser"
+        onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();"
+        aria-label="<?php echo get_lang('FirstLetterUser'); ?>">
       <option value="">--</option>
       <?php
         echo Display :: get_alphabet_options($first_letter_user);
@@ -306,8 +307,9 @@ if (is_array($extra_field_list)) {
      <b><?php echo get_lang('CourseList'); ?> :</b>
      <br/><br/>
         <?php echo get_lang('FirstLetterCourse'); ?> :
-     <select name="firstLetterCourse" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();"
-     aria-label="<?php echo get_lang('FirstLetterCourse'); ?>">
+     <select name="firstLetterCourse" 
+        onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();"
+        aria-label="<?php echo get_lang('FirstLetterCourse'); ?>">
       <option value="">--</option>
       <?php
       echo Display :: get_alphabet_options($first_letter_course);

+ 41 - 21
main/admin/user_add.php

@@ -102,45 +102,65 @@ $form = new FormValidator('user_add');
 $form->addElement('header', '', $tool_name);
 if (api_is_western_name_order()) {
     // Firstname
-    $form->addElement('text', 'firstname', get_lang('FirstName'),
-    array(
-        'id' => 'firstname'
-    ));
+    $form->addElement(
+        'text',
+        'firstname',
+        get_lang('FirstName'),
+        array(
+            'id' => 'firstname'
+        )
+    );
     $form->applyFilter('firstname', 'html_filter');
     $form->applyFilter('firstname', 'trim');
     $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
     // Lastname
-    $form->addElement('text', 'lastname', get_lang('LastName'),
-    array(
-        'id' => 'lastname'
-    ));
+    $form->addElement(
+        'text',
+        'lastname',
+        get_lang('LastName'),
+        array(
+            'id' => 'lastname'
+        )
+    );
     $form->applyFilter('lastname', 'html_filter');
     $form->applyFilter('lastname', 'trim');
     $form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required');
 } else {
     // Lastname
-    $form->addElement('text', 'lastname', get_lang('LastName'),
-    array(
-        'id' => 'lastname'
-    ));
+    $form->addElement(
+        'text',
+        'lastname',
+        get_lang('LastName'),
+        array(
+            'id' => 'lastname'
+        )
+    );
     $form->applyFilter('lastname', 'html_filter');
     $form->applyFilter('lastname', 'trim');
     $form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required');
     // Firstname
-    $form->addElement('text', 'firstname', get_lang('FirstName'),
-    array(
-        'id' => 'firstname'
-    ));
+    $form->addElement(
+        'text',
+        'firstname',
+        get_lang('FirstName'),
+        array(
+            'id' => 'firstname'
+        )
+    );
     $form->applyFilter('firstname', 'html_filter');
     $form->applyFilter('firstname', 'trim');
     $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
 }
 // Official code
-$form->addElement('text', 'official_code', get_lang('OfficialCode'),
-array(
-    'size' => '40',
-    'id' => 'official_code'
-));
+$form->addElement(
+    'text',
+    'official_code',
+    get_lang('OfficialCode'),
+    array(
+        'size' => '40',
+        'id' => 'official_code'
+    )
+);
 $form->applyFilter('official_code', 'html_filter');
 $form->applyFilter('official_code', 'trim');
 // Email

+ 8 - 4
main/admin/user_list.php

@@ -816,10 +816,14 @@ if (!empty($action)) {
 
 // Create a search-box
 $form = new FormValidator('search_simple', 'get', null, null, null, 'inline');
-$form->addText('keyword', get_lang('Search'), false,
-array(
-    'aria-label' => get_lang("SearchUsers")
-));
+$form->addText(
+    'keyword',
+    get_lang('Search'),
+    false,
+    array(
+        'aria-label' => get_lang("SearchUsers")
+    )
+);
 $form->addButtonSearch(get_lang('Search'));
 
 $searchAdvanced = '

+ 6 - 1
main/inc/lib/extra_field.lib.php

@@ -911,7 +911,12 @@ class ExtraField extends Model
                             $field_details['display_text'],
                             false,
                             false,
-                            array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130', 'id' => 'extra_'.$field_details['variable'])
+                            array(
+                                'ToolbarSet' => 'Profile',
+                                'Width' => '100%',
+                                'Height' => '130',
+                                'id' => 'extra_'.$field_details['variable']
+                            )
                         );
                         $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
                         $form->applyFilter('extra_'.$field_details['variable'], 'trim');