Пример #1
0
/**
 * Display the form for the first step of the test wizard
 * which consists in a basic check of the configuration and display of a form for testing
 */
function DisplayStep1(SetupPage $oP)
{
    $sNextOperation = 'step2';
    $oP->add("<h1>iTop email test</h1>\n");
    $oP->add("<h2>Checking prerequisites</h2>\n");
    if (CheckEmailSetting($oP)) {
        $sRedStar = '<span class="hilite">*</span>';
        $oP->add("<h2>Try to send an email</h2>\n");
        $oP->add("<form method=\"post\" onSubmit=\"return DoSubmit('Sending an email...', 10)\">\n");
        // Form goes here
        $oP->add("<fieldset><legend>Test recipient</legend>\n");
        $aForm = array();
        $aForm[] = array('label' => "To{$sRedStar}:", 'input' => "<input id=\"to\" type=\"text\" name=\"to\" value=\"\">", 'help' => ' email address (e.g. john.foo@worldcompany.com)');
        $aForm[] = array('label' => "From:", 'input' => "<input id=\"from\" type=\"text\" name=\"from\" value=\"\">", 'help' => ' defaults to \'To\'');
        $oP->form($aForm);
        $oP->add("</fieldset>\n");
        $oP->add("<input type=\"hidden\" name=\"operation\" value=\"{$sNextOperation}\">\n");
        $oP->add("<div>\n");
        $oP->add("<button style=\"float:left\" type=\"button\" onclick=\"window.location.reload()\">Refresh</button>\n");
        $oP->add("<button style=\"float:right\" type=\"submit\">Next >></button>\n");
        $oP->add("<div style=\"clear:both;\"></div>\n");
        $oP->add("</div>\n");
        $oP->add("</form>\n");
    }
}
Пример #2
0
/**
 * Display the form for the first step of the test wizard
 * which consists in a basic check of the configuration and display of a form for testing
 */
function DisplayStep1(SetupPage $oP)
{
    $sNextOperation = 'step2';
    $oP->add("<h1>iTop email test</h1>\n");
    $oP->add("<h2>Checking prerequisites</h2>\n");
    if (CheckEmailSetting($oP)) {
        $sRedStar = '<span class="hilite">*</span>';
        $oP->add("<h2>Try to send an email</h2>\n");
        $oP->add("<form method=\"post\" onSubmit=\"return DoSubmit('Sending an email...', 10)\">\n");
        // Form goes here
        $oP->add("<fieldset><legend>Test configuration</legend>\n");
        $aForm = array();
        $aForm[] = array('label' => "To{$sRedStar}:", 'input' => "<input id=\"to\" type=\"text\" name=\"to\" value=\"\">", 'help' => ' pure email address (john.foo@worldcompany.com)');
        $aForm[] = array('label' => "From:", 'input' => "<input id=\"from\" type=\"text\" name=\"from\" value=\"\">", 'help' => ' defaults to \'To\'');
        $oP->form($aForm);
        $oP->add("</fieldset>\n");
        $oP->add("<input type=\"hidden\" name=\"operation\" value=\"{$sNextOperation}\">\n");
        $oP->add("<button type=\"submit\">Next >></button>\n");
        $oP->add("</form>\n");
    }
}