$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_enabled'] = $this->language->get('text_enabled');
$this->data['text_disabled'] = $this->language->get('text_disabled');
$this->data['entry_title'] = $this->language->get('entry_title');
$this->data['entry_code'] = $this->language->get('entry_code');
$this->data['entry_value'] = $this->language->get('entry_value');
$this->data['entry_symbol_left'] = $this->language->get('entry_symbol_left');
$this->data['entry_symbol_right'] = $this->language->get('entry_symbol_right');
$this->data['entry_decimal_place'] = $this->language->get('entry_decimal_place');
$this->data['entry_status'] = $this->language->get('entry_status');
$this->data['button_save'] = $this->language->get('button_save');
$this->data['button_cancel'] = $this->language->get('button_cancel');
$this->data['tab_general'] = $this->language->get('tab_general');
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
if (isset($this->error['title'])) {
$this->data['error_title'] = $this->error['title'];
} else {
$this->data['error_title'] = '';
}
if (isset($this->error['code'])) {
$this->data['error_code'] = $this->error['code'];
} else {
$this->data['error_code'] = '';
}
$url = '';
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => false
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('localisation/currency', 'token=' . $this->session->data['token'] . $url, 'SSL'),
'separator' => ' :: '
);
if (!isset($this->request->get['currency_id'])) {
$this->data['action'] = $this->url->link('localisation/currency/insert', 'token=' . $this->session->data['token'] . $url, 'SSL');
} else {
$this->data['action'] = $this->url->link('localisation/currency/update', 'token=' . $this->session->data['token'] . '¤cy_id=' . $this->request->get['currency_id'] . $url, 'SSL');
}
$this->data['cancel'] = $this->url->link('localisation/currency', 'token=' . $this->session->data['token'] . $url, 'SSL');
if (isset($this->request->get['currency_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
$currency_info = $this->model_localisation_currency->getCurrency($this->request->get['currency_id']);
}
if (isset($this->request->post['title'])) {
$this->data['title'] = $this->request->post['title'];
} elseif (!empty($currency_info)) {
$this->data['title'] = $currency_info['title'];
} else {
$this->data['title'] = '';
}
if (isset($this->request->post['code'])) {
$this->data['code'] = $this->request->post['code'];
} elseif (!empty($currency_info)) {
$this->data['code'] = $currency_info['code'];
} else {
$this->data['code'] = '';
}
if (isset($this->request->post['symbol_left'])) {
$this->data['symbol_left'] = $this->request->post['symbol_left'];
} elseif (!empty($currency_info)) {
$this->data['symbol_left'] = $currency_info['symbol_left'];
} else {
$this->data['symbol_left'] = '';
}
if (isset($this->request->post['symbol_right'])) {
$this->data['symbol_right'] = $this->request->post['symbol_right'];
} elseif (!empty($currency_info)) {
$this->data['symbol_right'] = $currency_info['symbol_right'];
} else {
$this->data['symbol_right'] = '';
}
if (isset($this->request->post['decimal_place'])) {
$this->data['decimal_place'] = $this->request->post['decimal_place'];
} elseif (!empty($currency_info)) {
$this->data['decimal_place'] = $currency_info['decimal_place'];
} else {
$this->data['decimal_place'] = '';
}
if (isset($this->request->post['value'])) {
$this->data['value'] = $this->request->post['value'];
} elseif (!empty($currency_info)) {
$this->data['value'] = $currency_info['value'];
} else {
$this->data['value'] = '';
}
if (isset($this->request->post['status'])) {
$this->data['status'] = $this->request->post['status'];
} elseif (!empty($currency_info)) {
$this->data['status'] = $currency_info['status'];
} else {
$this->data['status'] = '';
}
$this->template = 'localisation/currency_form.tpl';
$this->children = array(
'common/header',
'common/footer'
);
$this->response->setOutput($this->render());