* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once "modules/pkgs/includes/xmlrpc.php"; if (isset($_POST["bconfirm"])) { activateAppstreamFlow($_POST['id'], $_POST['package_name'], $_POST['package_label'], $_POST['duration']); if (!isXMLRPCError() and $ret != -1) { new NotifyWidgetSuccess(_T("The stream has been added successfully. You will receive the latest updates of this stream directly in your package list.", "pkgs")); } if ($ret == -1) { new NotifyWidgetFailure(_T("Unable to add stream.", "pkgs")); } header("Location: " . urlStrRedirect("pkgs/pkgs/appstreamSettings", array())); exit; } else { $id = $_GET['id']; $package_name = $_GET['package_name']; $package_label = $_GET['package_label']; $duration = $_GET['duration']; $f = new PopupForm(_T("Activate this Appstream stream?")); $hidden = new HiddenTpl("id"); $f->add($hidden, array("value" => $id, "hide" => True)); $hidden = new HiddenTpl("package_name"); $f->add($hidden, array("value" => $package_name, "hide" => True)); $hidden = new HiddenTpl("package_label"); $f->add($hidden, array("value" => $package_label, "hide" => True)); $hidden = new HiddenTpl("duration"); $f->add($hidden, array("value" => $duration, "hide" => True)); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
function service_add($location) { $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $f = new PopupForm(sprintf(_T("Add the boot service <b>%s</b> to the default boot menu", "imaging"), $label)); $f->push(new Table()); // form preseeding $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("default_mi_label"), array("value" => $label, "hide" => True)); # $input = new TrFormElement(_T('Default menu item label', 'imaging'), new InputTpl("default_mi_label")); #$f->add($input, array("value" => '')); $check = new TrFormElement(_T('Selected by default', 'imaging'), new CheckboxTpl("do_default")); $f->add($check, array("value" => web_def_service_default() ? "checked" : "")); $check = new TrFormElement(_T('Displayed', 'imaging'), new CheckboxTpl("do_display")); $f->add($check, array("value" => web_def_service_hidden() ? "checked" : "")); $check = new TrFormElement(_T('Selected by default on WOL', 'imaging'), new CheckboxTpl("do_default_WOL")); $f->add($check, array("value" => web_def_service_default_WOL() ? "checked" : "")); $check = new TrFormElement(_T('Displayed on WOL', 'imaging'), new CheckboxTpl("do_display_WOL")); $f->add($check, array("value" => web_def_service_hidden_WOL() ? "checked" : "")); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
function image_add($type, $target_uuid) { $params = getParams(); $item_uuid = $_GET['itemid']; $label = urldecode($_GET['itemlabel']); $f = new PopupForm(sprintf(_T("Add the image <b>%s</b> to <b>%s</b>", "imaging"), $label, $params['hostname'])); # Need to get the name of the target $f->push(new Table()); // form preseeding $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True)); $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True)); $f->add(new HiddenTpl("gid"), array("value" => $_GET['gid'], "hide" => True)); $f->add(new HiddenTpl("uuid"), array("value" => $_GET['uuid'], "hide" => True)); /*$input = new TrFormElement(_T('Default menu item label', 'imaging'), new InputTpl("default_mi_label")); $f->add($input, array("value" => '')); */ $check = new TrFormElement(_T('Selected by default', 'imaging'), new CheckboxTpl("do_default")); $f->add($check, array("value" => web_def_image_default() ? "checked" : "")); $check = new TrFormElement(_T('Displayed', 'imaging'), new CheckboxTpl("do_display")); $f->add($check, array("value" => web_def_image_hidden() ? "checked" : "")); $check = new TrFormElement(_T('Selected by default on WOL', 'imaging'), new CheckboxTpl("do_default_WOL")); $f->add($check, array("value" => web_def_image_default_WOL() ? "checked" : "")); $check = new TrFormElement(_T('Displayed on WOL', 'imaging'), new CheckboxTpl("do_display_WOL")); $f->add($check, array("value" => web_def_image_hidden_WOL() ? "checked" : "")); $f->addValidateButton("bconfirm"); $f->addCancelButton("bback"); $f->display(); }
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require "modules/samba4/includes/machines-xmlrpc.inc.php"; if (isset($_GET["machine"])) { $machine = urldecode($_GET["machine"]); } if (isset($_POST["machine"])) { $machine = $_POST["machine"]; } if (isset($_POST["bdeleletemachine"])) { $deleteActionSuccess = deleteMachine($machine); if (!isXMLRPCError() and $deleteActionSuccess) { $computerDeletedMessage = sprintf(_T("Computer <strong>%s</strong> deleted.", "samba4"), $machine); new NotifyWidgetSuccess($computerDeletedMessage); } else { $computerDeletedMessage = sprintf(_T("There has been a problem while deleting <strong>%s</strong> computer.", "samba4"), $machine); new NotifyWidgetFailure($computerDeletedMessage); } header("location: " . urlStrRedirect('samba4/machines/index')); exit; } else { $form = new PopupForm(_T("Delete a computer", "samba4")); $form->addText(sprintf(_T("You will delete the %s computer", "samba4"), "<strong>{$machine}</strong>")); $form->addValidateButton("bdeleletemachine"); $form->addCancelButton("bback"); $form->display(); }