Code Duplication    Length = 15-18 lines in 2 locations

main/inc/lib/groupmanager.lib.php 1 location

@@ 2841-2855 (lines=15) @@
2838
     * Returns the search form
2839
     * @return string
2840
     */
2841
    public static function getSearchForm()
2842
    {
2843
        $url = api_get_path(WEB_CODE_PATH).'group/group_overview.php?'.api_get_cidreq();
2844
        $form = new FormValidator(
2845
            'search_groups',
2846
            'get',
2847
            $url,
2848
            null,
2849
            array('class' => 'form-search'),
2850
            FormValidator::LAYOUT_INLINE
2851
        );
2852
        $form->addElement('text', 'keyword');
2853
        $form->addButtonSearch();
2854
        return $form->toHtml();
2855
    }
2856
2857
    /**
2858
     * @param int $groupId

main/inc/lib/message.lib.php 1 location

@@ 1960-1977 (lines=18) @@
1957
     *
1958
     * @return FormValidator
1959
     */
1960
    public static function getSearchForm($url)
1961
    {
1962
        $form = new FormValidator(
1963
            'search',
1964
            'post',
1965
            $url,
1966
            null,
1967
            [],
1968
            FormValidator::LAYOUT_INLINE
1969
        );
1970
1971
        $form->addElement('text', 'keyword', false, array(
1972
            'aria-label' => get_lang('Search')
1973
        ));
1974
        $form->addButtonSearch(get_lang('Search'));
1975
1976
        return $form;
1977
    }
1978
1979
    /**
1980
     * Send a notification to all admins when a new user is registered