We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

yammerauthinitform.php 1.28 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php

class YammerAuthInitForm extends Form
{
    /**
     * ID of the form
     *
     * @return int ID of the form
     */

    function id()
    {
        return 'yammer-auth-init-form';
    }


    /**
     * class of the form
     *
     * @return string of the form class
     */

    function formClass()
    {
25
        return 'form_yammer_auth_init form_settings';
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    }


    /**
     * Action of the form
     *
     * @return string URL of the action
     */

    function action()
    {
        return common_local_url('yammeradminpanel');
    }


    /**
     * Legend of the Form
     *
     * @return void
     */
    function formLegend()
    {
        $this->out->element('legend', null, _m('Connect to Yammer'));
    }

    /**
     * Data elements of the form
     *
     * @return void
     */

    function formData()
    {
59 60 61 62 63 64
        $this->out->hidden('subaction', 'authinit');

        $this->out->elementStart('fieldset');
        $this->out->submit('submit', _m('Start authentication'), 'submit', null, _m('Request authorization to connect to Yammer account'));
        $this->out->submit('change-apikey', _m('Change API key'));
        $this->out->elementEnd('fieldset');
65 66 67 68 69 70 71 72 73 74 75 76
    }

    /**
     * Action elements
     *
     * @return void
     */

    function formActions()
    {
    }
}