AppendObject(new BS_Alert("Successfully executed batch operation on zone " . $zone));
}
public static function GetForm($parent)
{
global $g_audit, $g_selected_domain, $g_domains, $g_editable;
$form = new Form("index.php?action=batch", $parent);
$form->Method = FormMethod::Post;
$layout = new HtmlTable($form);
$layout->BorderSize = 0;
$dl = new BS_ComboBox("zone", $layout);
foreach ($g_domains as $key => $info)
{
if (!IsAuthorizedToWrite($key))
continue;
if ($g_selected_domain == $key)
$dl->AddDefaultValue($key, $key);
else
$dl->AddValue($key, $key);
}
$layout->Width = "600px";
$layout->AppendRow( [ "This form allows execution of nsupdate commands, so that you can execute multiple nsupdate operations at once
" .
"Example:
update add record.domain.org 3600 A 1.2.3.4\nupdate delete record2.domain.org" ] ); $layout->AppendRow( [ "Note: only update statements are allowed, don't put send there, it will be there automatically" ] ); $layout->AppendRow( [ $dl ] ); $input = new BS_TextBox("record", NULL, NULL, $layout); $input->SetMultiline(); $layout->AppendRow( [ $input ] ); if ($g_audit) { $comment = new BS_TextBox("comment", NULL, NULL, $layout); $comment->Placeholder = 'Optional comment for audit log'; $layout->AppendRow( [ $comment ] ); } $form->AppendObject(new BS_Button("submit", "Submit")); return $form; } }