$templatesDrop = $attributeManager->buildAllTemplatesDropDown(); $amPopup->setHeader(AM_AJAX_CHOOSE_EXISTING_TEMPLATE_TO_OVERWRITE); $amPopup->addToContents('<br /><br />' . AM_AJAX_CHOOSE_EXISTING_TEMPLATE_TITLE . ' ' . vam_draw_pull_down_menu('existing_template', $templatesDrop, '0', 'id="existing_template" onChange="document.getElementById(\'template_name\').value=\'\';"')); $amPopup->addToContents(updateCancelButtons($_GET['section'])); $amPopup->addToContents(vam_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; case 'renameTemplate': $amPopup = new amPopups(); $amPopup->setHeader(sprintf(AM_AJAX_RENAME_TEMPLATE_ENTER_NEW_NAME, $arrExtraValues['template_name'])); $amPopup->addToContents(AM_AJAX_NEW_NAME . ' ' . vam_draw_input_field('template_new_name', '', 'id="template_new_name"')); $amPopup->addToContents(updateCancelButtons($_GET['section'])); $amPopup->addToContents(vam_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; case 'deleteTemplate': $amPopup = new amPopups(); $amPopup->setHeader(sprintf(AM_AJAX_PROMPT_DELETE_TEMPLATE, $arrExtraValues['template_name'])); $amPopup->addToContents(yesNoButtons($_GET['section'])); $amPopup->addToContents(vam_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; case 'debug': $amPopup = new amPopups(); $amPopup->setHeader(implode($valuePairs, ',')); $amPopup->addToContents(yesNoButtons($_GET['section'])); $amPopup->addToContents(vam_draw_hidden_field('debug', $arrExtraValues['debug'], 'id="debug"')); echo $amPopup->output(); break; } }
$amPopup->addToContents(tep_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; case 'saveTemplate': $amPopup = new amPopups(); $amPopup->setHeader("Please enter a new name for the new Template. Or..."); $amPopup->addToContents("New Name: " . tep_draw_input_field('template_name', '', 'id="template_name" onchange="((this.value != \'\') ? document.getElementById(\'existing_template\').selectedIndex = 0 : \'\')"')); $templatesDrop = $attributeManager->buildAllTemplatesDropDown(); $amPopup->setHeader(" ...<br /> ... Choose and existing one to overwrite"); $amPopup->addToContents("<br /><br />Existing: " . tep_draw_pull_down_menu('existing_template', $templatesDrop, '0', 'id="existing_template" onChange="document.getElementById(\'template_name\').value=\'\';"')); $amPopup->addToContents(updateCancelButtons($_GET['section'])); $amPopup->addToContents(tep_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; case 'renameTemplate': $amPopup = new amPopups(); $amPopup->setHeader("Please enter the new name for the {$arrExtraValues['template_name']} Template"); $amPopup->addToContents("New Name: " . tep_draw_input_field('template_new_name', '', 'id="template_new_name"')); $amPopup->addToContents(updateCancelButtons($_GET['section'])); $amPopup->addToContents(tep_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; case 'deleteTemplate': $amPopup = new amPopups(); $amPopup->setHeader("Are you sure you want to delete the {$arrExtraValues['template_name']} Template?<br>This cannot be undone!"); $amPopup->addToContents(yesNoButtons($_GET['section'])); $amPopup->addToContents(tep_draw_hidden_field('template_id', $arrExtraValues['template_id'], 'id="template_id"')); echo $amPopup->output(); break; } }