private function validateForm()
{
$this->form_validation->set_rules('show_cart_images', 'lang:label_show_cart_images', 'xss_clean|trim|required|integer');
$this->form_validation->set_rules('fixed_cart', 'lang:label_fixed_cart', 'xss_clean|trim|required|integer');
if ($this->input->post('fixed_cart') === '1') {
$this->form_validation->set_rules('fixed_top_offset', 'lang:label_fixed_top_offset', 'xss_clean|trim|required|integer');
$this->form_validation->set_rules('fixed_bottom_offset', 'lang:label_fixed_bottom_offset', 'xss_clean|trim|required|integer');
}
if ($this->input->post('show_cart_images') === '1') {
$this->form_validation->set_rules('cart_images_h', 'lang:label_cart_images_h', 'xss_clean|trim|required|integer');
$this->form_validation->set_rules('cart_images_w', 'lang:label_cart_images_w', 'xss_clean|trim|required|integer');
}
if ($this->input->post('totals')) {
foreach ($this->input->post('totals') as $key => $value) {
$this->form_validation->set_rules('totals[' . $key . '][title]', "[{$key}] " . $this->lang->line('column_title'), 'xss_clean|trim|required|max_length[128]');
$this->form_validation->set_rules('totals[' . $key . '][admin_title]', "[{$key}] " . $this->lang->line('column_admin_title'), 'xss_clean|trim|required|max_length[128]');
$this->form_validation->set_rules('totals[' . $key . '][name]', "[{$key}] " . $this->lang->line('column_name'), 'xss_clean|trim|required|alpha_dash');
$this->form_validation->set_rules('totals[' . $key . '][status]', "[{$key}] " . $this->lang->line('column_display'), 'xss_clean|trim|required|integer');
}
}
if ($this->form_validation->run() === TRUE) {
return TRUE;
} else {
return FALSE;
}
}