<style>
	.price_inputs {
		width: 26%;
	}

</style>

<?php

$titles = __('error_titles', true);

$bodies = __('error_bodies', true);

?>

<div class="row wrapper border-bottom white-bg page-heading">

    <div class="col-sm-12">

        <div class="row">

            <div class="col-lg-9 col-md-8 col-sm-6">

                <h2><?php echo @$titles['AS10'];?></h2>

                <ol class="breadcrumb">

					<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminSuperServices&amp;action=pjActionIndex"><?php __('infoUpdateSuperServiceTitle'); ?></a></li>

					<li class="active">

						<strong><?php echo @$titles['AS10'];?></strong>

					</li>

				</ol>

            </div>

            <div class="col-lg-3 col-md-4 col-sm-6 btn-group-languages">

				<?php if ($tpl['is_flag_ready']) : ?>

				<div class="multilang"></div>

				<?php endif; ?>

			</div>

        </div>



        <p class="m-b-none"><i class="fa fa-info-circle"></i> <?php echo @$bodies['AS10']; ?></p>

    </div>

</div>



<div class="row wrapper wrapper-content animated fadeInRight">

    <div class="col-lg-12">

        <div class="ibox float-e-margins">

			<form action="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminSuperServices&amp;action=pjActionUpdate" method="post" id="frmUpdateService" class="form pj-form" autocomplete="off" enctype="multipart/form-data">

				<input type="hidden" name="service_update" value="1" />

				<input type="hidden" name="id" value="<?php echo $tpl['arr']['id']; ?>" />

            	<div class="ibox-content">

                    <div class="row">

                        

                        <div class="col-lg-12 col-md-12 col-sm-12">

                            <div class="form-group">

                                <label class="title"><?php __('service_name'); ?></label>

                                <?php

								foreach ($tpl['lp_arr'] as $v)

								{

									?>

									<div class="<?php echo $tpl['is_flag_ready'] ? 'input-group' : NULL;?>pj-multilang-wrap price_inputs" data-index="<?php echo $v['id']; ?>" style="display: <?php echo (int) $v['is_default'] === 1 ? NULL : 'none'; ?>">

										<input type="text" class="form-control<?php echo (int) $v['is_default'] === 0 ? NULL : ' required'; ?>" name="i18n[<?php echo $v['id']; ?>][name]" data-msg-required="<?php __('plugin_base_this_field_is_required', false, true);?>" value="<?php echo pjSanitize::html($tpl['arr']['i18n'][$v['id']]['name']); ?>">	

										<!-- <?php if ($tpl['is_flag_ready']) : ?>

										<span class="input-group-addon pj-multilang-input"><img src="<?php echo PJ_INSTALL_URL . PJ_FRAMEWORK_LIBS_PATH . 'pj/img/flags/' . $v['file']; ?>" alt="<?php echo pjSanitize::html($v['name']); ?>"></span>

										<?php endif; ?> -->

									</div>

									<?php 

								}

								?>

                            </div>

                        </div>

                        

                        <div class="col-lg-12 col-md-12 col-sm-12">

                            <div class="form-group">

                                <label class="title"><?php __('service_price_from'); ?></label>

                                <div class="input-group price_inputs">

                                    <input type="text" name="price_from" id="price_from" class="form-control required number" data-msg-required="<?php __('plugin_base_this_field_is_required', false, true);?>" data-msg-number="<?php __('prices_invalid_price', false, true);?>" value="<?php echo $tpl['arr']['price_from']; ?>"/>



											<span class="input-group-addon"><?php echo pjCurrency::getCurrencySign($tpl['option_arr']['o_currency'], false) ?></span>

                    			</div>

                            </div>

                        </div>

					    

					    

                        <div class="col-lg-12 col-md-12 col-sm-12">

                            <div class="form-group">

                                <label class="title"><?php __('service_price_to'); ?></label>

                                

                                    <div class="input-group price_inputs">

											<input type="text" name="price_to" id="price_to" class="form-control required number" data-msg-required="<?php __('plugin_base_this_field_is_required', false, true);?>" data-msg-number="<?php __('prices_invalid_price', false, true);?>" value="<?php echo $tpl['arr']['price_to']; ?>"/>



											<span class="input-group-addon"><?php echo pjCurrency::getCurrencySign($tpl['option_arr']['o_currency'], false) ?></span>

										</div>

                    			

                            </div>

                        </div>

					</div>

					

	            </div>



				<div class="hr-line-dashed"></div>

                    

				<div class="clearfix">

					<button type="submit" class="ladda-button btn btn-primary btn-lg btn-phpjabbers-loader pull-left" data-style="zoom-in">

						<span class="ladda-label"><?php __('btnSave', false, true); ?></span>

						<?php include $controller->getConstant('pjBase', 'PLUGIN_VIEWS_PATH') . 'pjLayouts/elements/button-animation.php'; ?>

					</button>



					<button type="button" class="btn btn-white btn-lg pull-right" onclick="window.location.href='<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjAdminSuperServices&action=pjActionIndex';"><?php __('btnCancel'); ?></button>

				</div>

			</form>

        </div>

    </div>

</div>



<script type="text/javascript">

var myLabel = myLabel || {};

myLabel.positiveNumber = "<?php __('positive_number', false, true); ?>";

myLabel.isFlagReady = "<?php echo $tpl['is_flag_ready'] ? 1 : 0;?>";

myLabel.choose = "<?php __('lblChoose', false, true); ?>";

<?php if ($tpl['is_flag_ready']) : ?>

	var pjLocale = pjLocale || {};

	pjLocale.langs = <?php echo $tpl['locale_str']; ?>;

	pjLocale.flagPath = "<?php echo PJ_FRAMEWORK_LIBS_PATH; ?>pj/img/flags/";

<?php endif; ?>

</script>