Código:
<?php if (!defined("AT_DIR")) die('!!!'); ?> <?php $this->add_script( 'jquery.selectik', 'assets/js/jquery/jquery.selectik.js'); ?> <?php $this->add_script( 'jquery.form', 'assets/js/jquery/jquery.form.js'); ?> <?php $this->add_script( 'jquery.validate', 'assets/js/jquery/jquery.validate.js'); ?> <?php $this->add_script( 'plupload', 'assets/js/plupload/plupload.full.min.js'); ?> <?php $this->add_script( 'vehicles', 'assets/js/vehicles.js'); ?> <?php $this->add_script( 'google-map', 'https://maps.googleapis.com/maps/api/js?v=3.exp'); ?> <?php $this->add_script( 'jquery.gmap3', 'assets/js/jquery/jquery.gmap3.js'); ?> <div class="step_breadcrumb"> <a href="#" class="active" id="step_1"><?php echo __( 'step 1. announcement', AT_TEXTDOMAIN );?></a> <a href="#" class="" id="step_2"><?php echo __( 'step 2. specifications', AT_TEXTDOMAIN );?></a> ................................ </div> <font color="red" size="4">Los campos con asterisco con obligatorios</font> <div class="sell_box step_1" style="display:;"> <h2><?php echo __( '<strong>Vehicle</strong> data', AT_TEXTDOMAIN );?></h2> <div class="col_1"> <div class="select_wrapper"> <label><span>* </span><strong><?php echo __( 'Transport Type:', AT_TEXTDOMAIN ); ?></strong></label> <select class=" text" id="_transport_type_id" name="_transport_type_id" required value-invalid="0" > <option value="0"><?php echo __( 'Select', AT_TEXTDOMAIN ); ?></option> <?php foreach ($transport_types as $key => $value) { ?> <option <?php echo (!empty($car_info['options']['_transport_type_id']) && $car_info['options']['_transport_type_id']['id'] == $value['id']) ? 'selected="selected"' : ''; ?> value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option> <?php } ?> </select> </div> <div class="select_wrapper"> <label><span>* </span><strong><?php echo __( 'Make:', AT_TEXTDOMAIN ); ?></strong></label> <select class=" text select2" id="_manufacturer_id" name="_manufacturer_id" <?php echo ( !empty($car_info['options']['_manufacturer_id'] ) ? 'readonly' : ' required value-invalid="0"' ); ?>> <option value="0"><?php echo __( 'Select', AT_TEXTDOMAIN ); ?></option> <?php if( !empty( $car_info['options']['_manufacturer_id'] ) ) { ?> <option selected="selected" value="<?php echo $car_info['options']['_manufacturer_id']['id']; ?>"><?php echo $car_info['options']['_manufacturer_id']['name']; ?></option> <?php } else { ?> <?php foreach ($manufacturers as $key => $value) { ?> <option <?php echo (!empty($car_info['options']['_manufacturer_id']) && $car_info['options']['_manufacturer_id']['id'] == $value['id']) ? 'selected="selected"' : ''; ?> value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option> <?php } ?> <?php } ?> </select> </div> <div class="input_wrapper price"> <label><span>* </span><strong><?php echo __( 'Currency:', AT_TEXTDOMAIN ); ?></strong></label> <select class="text" id="_currency_id" name="_currency_id"> <?php foreach ($currencies as $key => $value) { ?> <option <?php echo (!empty($car_info['options']['_currency_id']) && $car_info['options']['_currency_id']['id'] == $value['id']) ? 'selected="selected"' : ''; ?> value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option> <?php } ?> </select> </div> <div class="select_wrapper"> <label><span> </span><strong><?php echo __( 'Technical condition:', AT_TEXTDOMAIN ); ?> </strong></label> <select class="text" id="_technical_condition_id" name="_technical_condition_id"> <option value="0"><?php echo __( 'Select', AT_TEXTDOMAIN ); ?></option> <?php foreach ($technical_conditions as $key => $value) { ?> <option <?php echo (!empty($car_info['options']['_technical_condition_id']) && $car_info['options']['_technical_condition_id']['id'] == $value['id']) ? 'selected="selected"' : ''; ?> value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option> <?php } ?> </select> </div> <!-- <?php if( count($affiliates) > 0 ) {?> <div class="select_wrapper"> <label><span> </span><strong><?php echo __( 'Affiliate:', AT_TEXTDOMAIN ); ?> </strong></label> <select class="text" id="_affiliate_id" name="_affiliate_id"> <option value="0"><?php echo __( 'Default affiliate', AT_TEXTDOMAIN ); ?></option> <?php foreach ($affiliates as $key => $value) { ?> <option <?php echo (!empty($car_info['options']['_affiliate_id']) && $car_info['options']['_affiliate_id'] == $value['id']) ? 'selected="selected"' : ''; ?> value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option> <?php } ?> </select> </div> <?php } ?> --> </div> <div class="clear"></div> <div class="col_all"> <div class="input_wrapper fullwidth"> <label><span> </span><strong><?php echo __( 'Description:', AT_TEXTDOMAIN ); ?> </strong></label> <textarea class="text" id="post_content" name="post_content"><?php echo (!empty($car_info['post_content']) ? $car_info['post_content'] : ''); ?></textarea> </div> </div> <div class="clear"></div> <h2></h2> <div class="checkbox_items"> <span class="custom_chb_wrapper"> <span class="custom_chb"> <input name="_price_negotiable" type="checkbox" id="_price_negotiable" <?php if( isset($car_info) && (isset($car_info['options']) && isset($car_info['options']['_price_negotiable']) && !empty($car_info['options']['_price_negotiable']) && $car_info['options']['_price_negotiable'] == 'on' || $car_info['options']['_price_negotiable'] == '1')) { ?>checked="checked"<?php } ?>/> <input name="_price_negotiable" type="hidden" id="_price_negotiable" <?php if( isset($car_info) && (isset($car_info['options']) && isset($car_info['options']['_price_negotiable']) && !empty($car_info['options']['_price_negotiable']) && $car_info['options']['_price_negotiable'] == 'on' || $car_info['options']['_price_negotiable'] == '1' )) { ?>value="1"<?php }else{ ?> value="0"<?php } ?>/> </span> <label><?php echo __( 'Price Negotiable', AT_TEXTDOMAIN ); ?></label> </span> <!-- <span class="custom_chb_wrapper"> <span class="custom_chb"> <input type="checkbox" name=""> </span> <label><?php echo __( 'Can be exchanged for real estate', AT_TEXTDOMAIN ); ?></label> </span> <span class="custom_chb_wrapper"> <span class="custom_chb"> <input type="checkbox" name=""> </span> <label><?php echo __( 'Can be exchanged for real estate', AT_TEXTDOMAIN ); ?></label> </span> --> </div> <h2></h2> <div class="btn-next"> <a href="#" class="btn1"><?php echo __( 'Next', AT_TEXTDOMAIN ); ?></a> </div> </div> <div class="sell_box step_2" style="display:none;"> <h2><?php echo __( '<strong>Technical</strong> Specifications', AT_TEXTDOMAIN );?></h2> <div class="col_1"> <div class="select_wrapper"> <label><span> </span><strong><?php echo __( 'Transmission:', AT_TEXTDOMAIN ); ?></strong></label> .................................................................................. <div id="loaded-images"></div> <div class="foto_wrapper" id="container"> <span id="upload-photos"> <img src="<?php echo AT_Common::static_url('/assets/images/upload.png');?>" alt="" class="upload"/> <?php echo __( 'upload photo', AT_TEXTDOMAIN );?> </span> </div> <div class="clear"></div> <h2></h2> <div class="btn-next"> <a href="#" class="btn3"><?php echo __( 'Back', AT_TEXTDOMAIN );?></a> <?php if (empty($car_info)) { ?> <a href="#" class="btn1"><?php echo __( 'Add', AT_TEXTDOMAIN );?></a> <?php } else { ?> <a href="#" class="btn1"><?php echo __( 'Save', AT_TEXTDOMAIN );?></a> <?php } ?> <span class="form_loading"><img src="<?php echo AT_Common::static_url('assets/images/loading.gif'); ?>" /></span> </div> </div> </form> </div>