<?xml version="1.0" encoding="UTF-8"?>
<modification>
	<name>id и class в html</name>
	<code>id-class-html</code>
	<version>1.0</version>
	<author>staix</author>
	<!-- id и class в HTML-->
	<file path="admin/controller/extension/module/html.php">
		<operation>
			<search><![CDATA[if (isset($this->request->post['status'])) {]]></search>
			<add position="before"><![CDATA[
		// system/html.ocmod.xml
		$data['text_class'] = $this->language->get('text_class');
		$data['text_id'] = $this->language->get('text_id');
		if (isset($this->request->post['id'])) {
			$data['id'] = $this->request->post['id'];
		} elseif (!empty($module_info) && isset($module_info['id'])) {
			$data['id'] = $module_info['id'];
		} else {
			$data['id'] = '';
		}

		if (isset($this->request->post['class'])) {
			$data['class'] = $this->request->post['class'];
		} elseif (!empty($module_info) && isset($module_info['class'])) {
			$data['class'] = $module_info['class'];
		} else {
			$data['class'] = '';
		}
		// END system/html.ocmod.xml
]]></add>
		</operation>
	</file>
	<file path="admin/view/template/extension/module/html.twig">
		<operation>
			<search index="2"><![CDATA[<div class="form-group">]]></search>
			<add position="before"><![CDATA[
		{# system/html.ocmod.xml #}
		 <div class="form-group">
            <label class="col-sm-2 control-label" for="input-id">{{ text_id }}</label>
            <div class="col-sm-10">
                {% if id %}
                <input class="form-control" type="text" name="id" value="{{ id }}" id="input-id" />
                {% else %}
                <input class="form-control" type="text" name="id" value="" id="input-id" />
                {% endif %}
            </div>
         </div>
		 <div class="form-group">
            <label class="col-sm-2 control-label" for="input-class">{{ text_class }}</label>
            <div class="col-sm-10">
                {% if class %}
                <input class="form-control" type="text" name="class" value="{{ class }}" id="input-class" />
                {% else %}
                <input class="form-control" type="text" name="class" value="" id="input-class" />
                {% endif %}
            </div>
         </div>
		{# system/html.ocmod.xml #}
]]></add>
		</operation>
	</file>
	<file path="admin/language/ru-ru/extension/module/html.php">
		<operation>
			<search><![CDATA[$_['entry_status']      = 'Статус';]]></search>
			<add position="after"><![CDATA[
// system/html.ocmod.xml
	$_['text_id']       = "id блока";
	$_['text_class']	= "Класс блока";
// END system/html.ocmod.xml
				]]></add>
		</operation>
	</file>
	<file path="catalog/controller/extension/module/html.php">
		<operation>
			<search><![CDATA[return $this->load->view('extension/module/html', $data);]]></search>
			<add position="before"><![CDATA[
		// system/html.ocmod.xml
		if (isset($setting['class']) && $setting['class']) {
			$data['class'] = $setting['class'];
		} else {
			$data['class'] = '';
		}

		if (isset($setting['id']) && $setting['id']) {
			$data['id'] = $setting['id'];
		} else {
			$data['id'] = '';
		}
		// END system/html.ocmod.xml
]]></add>
		</operation>
	</file>
	<file path="catalog/view/theme/default/template/extension/module/html.twig">
		<operation>
			<search index="0"><![CDATA[<div>]]></search>
			<add position="replace"><![CDATA[
{# system/html.ocmod.xml #}
<div{% if id %} id="{{ id }}"{% endif %}{% if class %} class="{{ class }}"{% endif %}>
{# END system/html.ocmod.xml #}
]]></add>
		</operation>
	</file>
</modification>