<!-- Form Start -->
<div class="block">
    <div class="title lightTextShadow"><?php echo $this->lang->line('partition_edit'); ?></div>
    <br />

    <a href="<?= base_url() ?>partitions/admin_partitions/overview" class="button sub inlineBlock rnd3 lightTextShadow">
        <span><?php echo $this->lang->line('button_partitions'); ?></span>
    </a>

    <div class="content">
        <?php echo form_open_multipart('partitions/admin_partitions/edit/' . $partition->par_id, array('id' => 'partition_edit')) ?>
        <fieldset class="form boxStyle">                                


            <?php echo $this->template->flash_msg(); ?>

            <label for="partition_title" class="label"><?php echo $this->lang->line('partition_title'); ?></label>
            <input id="partition_title" class="textBox med rnd5" name="partition_title" value="<?= set_value('partition_title', $partition->par_title) ?>"  />
            <?php echo form_error('partition_title'); ?>
            <br />

            <label for="partition_desc" class="label"><?php echo $this->lang->line('partition_desc'); ?></label>
            <textarea id="partition_desc" rows="6" cols="0" class="textArea lrg rnd5" name="partition_desc" ><?= set_value('partition_desc', $partition->par_desc) ?></textarea>
            <?php echo form_error('partition_desc'); ?>
            <br />

            <label for="partition_topic" class="label"><?php echo $this->lang->line('partition_topic'); ?></label>
            <textarea  id="textEditor" rows="6" cols="0" class="textArea lrg rnd5" name="partition_topic" ><?= set_value('partition_topic', $partition->par_topic) ?></textarea>
            <?php echo form_error('partition_topic'); ?>          	
            <br />
            <br />

            <label class="label"><?php echo $this->lang->line('current_img'); ?></label>
            <p>
                <?php if ($partition->par_img != "" && file_exists(PUBPATH . "global/uploads/" . $partition->par_img)) { ?>
                    <img src="<?php echo base_url(); ?>global/uploads/<?php echo $partition->par_img; ?>" width="160" height="130" class="imgPreview rnd10" />
                <?php } elseif ($partition->par_link_img != "" && check_img_url($partition->par_link_img)) { ?>
                    <img src="<?php echo $partition->par_link_img ?>" width="160" height="130" class="imgPreview rnd10" />
                <?php } else { ?>
                    <img src="<?php echo base_url(); ?>global/modules/admin/images/no-img.png" width="160" height="130" class="imgPreview rnd10" />
                <?php } ?>  
            </p>
            <br />
            
            
            <label for="image_file" class="label"><?php echo $this->lang->line('image_file'); ?></label>
            <div class="fileUpload">
                <input id="file" type="file" name="image_file" value=""  />
                <span class="button rnd5 drkTextShadow">جلب الملف</span>
                <?php echo form_error('image_file'); ?>
            </div>
            <br />

            <label class="label"><?php echo $this->lang->line('or'); ?></label>
            <br />

            <label for="link_img" class="label"><?php echo $this->lang->line('link_img'); ?></label>            
            <input type="text" class="textBox med rnd5" name="link_img" value="<?= set_value('link_img') ?>"  />
            <?php echo form_error('link_img'); ?>
            <br />

            <label class="label">هل تريد تفعيل الصفحة ؟</label>
            <input type="checkbox" name="hide" id="chk1"  value="1" <?php echo set_checkbox("hide", "1", ($partition->par_hide == 1)? TRUE : FALSE); ?> /><label for="chk1"><?php echo $this->lang->line('active'); ?></label>
            <br />

            <div class="center">
                <input id="submit" type="submit" value="تفريغ الحقول" class="button sub inlineBlock rnd3 lightTextShadow" />
                <input id="submit" type="submit" value="أدخل" class="button sml inlineBlock rnd5 drkTextShadow" />
            </div>
        </fieldset>
        <?php echo form_close(); ?>
    </div>
</div>