if ($error == false) { if (!ac_admin_ops::UpdateMultiInput($input_id, $multi_input[$input_id]['input_fields'])) { $error = true; $errormessage .= $this->lang('error_updating_multi_input') . '<br />'; } else { if (!ac_admin_ops::UpdateTplAssoc('multi_input', $input_id, $multi_input[$input_id]['tpl_name'])) { $error = true; $errormessage .= $this->lang('error_updating_multi_input_assocs') . '<br />'; } else { $this->Redirect($id, 'defaultadmin', $returnid, array('message' => 'multi_input_updated', 'active_tab' => 'multi_input', 'submit' => true)); } } } } ################################################################################ # smarty stuff $this->smarty->assign('start_form', $this->CreateFormStart($id, 'editMultiInput', $returnid, 'post', 'multipart/form-data')); $this->smarty->assign('end_form', $this->CreateFormEnd()); $this->smarty->assign('submit', $this->CreateInputSubmit($id, 'submit', lang('submit'))); $this->smarty->assign('cancel', $this->CreateInputSubmit($id, 'cancel', lang('cancel'))); $this->smarty->assign('input_id_text', $this->lang('input_id')); $this->smarty->assign('input_id_input', $input_id); $this->smarty->assign('input_tpl_text', $this->lang('multi_input_tpl')); $this->smarty->assign('input_tpl_input', $this->CreateInputDropdown($id, 'input_tpl', ac_admin_ops::GetTplList('multi_input'), '', $multi_input[$input_id]['tpl_name'])); $this->smarty->assign('input_fields_text', $this->lang('input_fields')); $this->smarty->assign('input_fields_input', $this->CreateTextArea(false, $id, $multi_input[$input_id]['input_fields'], 'input_fields', '', 'input_fields') . $this->CreateInputHidden($id, 'input_id', $input_id)); if ($error) { echo $this->ShowErrors($errormessage); } # Display the populated template echo $this->_pp() . $this->ProcessTemplate('addMultiInput.tpl');