%PDF- %PDF-
| Direktori : /home/bitrix/www/local/components/UB/adbase.offer.edit/templates/offer/ |
| Current File : //home/bitrix/www/local/components/UB/adbase.offer.edit/templates/offer/template.php |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH.'/js/ajax-chosen.js');
$APPLICATION->AddHeadScript(SITE_TEMPLATE_PATH.'/js/jquery.datetimepicker.js');
$APPLICATION->SetAdditionalCSS(SITE_TEMPLATE_PATH.'/css/jquery.datetimepicker.css');
include_once $_SERVER['DOCUMENT_ROOT'].'/local/templates/UB/includes/localen.php';
?>
<script type="text/javascript">
<?if (SITE_ID == "dv") {?>
var LA_MESS = {
'AD_CATEGORY_IS_NOT_SELECTED': 'Category is not selected<br/>',
'AD_TITLE_IS_NOT_SPECIFIED': 'Title is not specified<br/>',
'THE_CITY_IS_NOT_SPECIFIED': 'The city is not specified<br/>',
'AD_TEXT_IS_NOT_SPECIFIED': 'Description is not specified<br/>',
'COMPENSATION_SUM_IS_NOT_SPECIFIED': 'Amount is not specified<br/>',
'START_DATE_IS_NOT_SPECIFIED': 'Job date is not specified<br/>',
'SEX_JS': '| Sex ',
'NUDE_JS': ' | Nude',
}
datetimepickerParams = {
timepicker:false,
lang:'en',
format:'m/d/Y',
yearStart:'2015',
yearEnd:'2020',
mask:true
}
<? } else {?>
var LA_MESS = {
'AD_CATEGORY_IS_NOT_SELECTED': 'Не выбрана категория объявления<br/>',
'AD_TITLE_IS_NOT_SPECIFIED': 'Не указано название объявления<br/>',
'THE_CITY_IS_NOT_SPECIFIED': 'Не указан город<br/>',
'AD_TEXT_IS_NOT_SPECIFIED': 'Не указан текст объявления<br/>',
'COMPENSATION_SUM_IS_NOT_SPECIFIED': 'Не указан размер компенсации<br/>',
'START_DATE_IS_NOT_SPECIFIED': 'Не указана дата начала<br/>',
'SEX_JS': '| Пол ',
'NUDE_JS': ' | Ню',
}
datetimepickerParams = {
timepicker:false,
lang:'ru',
format:'d.m.Y',
yearStart:'2015',
yearEnd:'2020',
mask:true
}
<?};?>
</script>
<style>
#casting-form {
padding: 0;
}
#casting-form .chosen-container,
#casting-form .register-page input.form-control {
margin: 0 0 10px;
}
#casting-form .input-group-btn {
padding: 0;
margin: 0;
vertical-align: top;
}
#casting-form label {
font-weight: normal;
}
#casting-form textarea {
height: 245px;
}
.row {
margin-right: -10px;
margin-left: -10px;
}
#casting-form .form-control[disabled],
#casting-form .form-control[readonly],
#casting-form fieldset[disabled] {
opacity: 0.7;
}
</style>
<div class="modal fade" id="imageloader" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content" style="width: 850px; margin-left: -125px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3 class="modal-title" id="myModalLabel" style="display: inline"><?=GetMessage("DOWNLOAD_IMAGE_OPTIMALLY_400_400")?></h3>
</div>
<div class="modal-body avatar-modal-body">
<div id="image-cropper">
<div class="cropit-image-preview-container">
<div class="cropit-image-preview"></div>
</div>
<div class="slider-wrapper">
<input type="range" class="cropit-image-zoom-input">
</div>
<input type="file" class="cropit-image-input" style="display: none"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn-small btn-grey" id="select-image-btn"><i class="fa fa-folder-open-o"></i><?=GetMessage("CHOOSE_FILE")?></button>
<button type="button" class="btn-small btn-grey" data-dismiss="modal"><?=GetMessage("UNDO")?></button>
<button type="button" class="btn-small btn-grey" id="save-image-btn"><?=GetMessage("SAVE")?></button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="confirm-submit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3 class="modal-title" id="myModalLabel" style="display: inline"><?=GetMessage("CONFIRMATION_OF_AD")?></h3>
</div>
<div class="modal-body confirm-submit-body" id="confirm-submit-body">
<div class="portfolio-item-menu" style="float: left; margin-right: 20px;">
<div class="portfolio-item" style="width: 150px; height: 104px;">
<div>
<?=$arResult['AVATAR']?>
</div>
</div>
</div>
<div>
<ul class="list-unstyled">
<li><i class="fa fa-asterisk"></i> <span data-id="CASTING[NAME]"></span></li>
<li><i class="fa fa-globe"></i> <span data-id="CASTING_PROPS[CITY]"></span></li>
<li><i class="fa fa-briefcase"></i> <span data-id="CASTING_PROPS[SECTIONS][]"></span></li>
<li><i class="fa fa-money"></i>
<span data-id="CASTING_PROPS[COMPENSATION_TYPE]"></span>
<span data-id="CASTING_PROPS[COMPENSATION]"></span>
<span data-id="CASTING_PROPS[COMPENSATION_CURRENCY]"></span></li>
<li><i class="fa fa-calendar"></i> <?=GetMessage("PUBLICATION_TIME")?><span data-id="CASTING_PROPS[PUBLIC_DATE]"></span>
<li style="padding-top: 15px"><i class="fa fa-newspaper-o"></i> <span data-id="CASTING_PROPS[CASTING_TEXT]"></span></li>
</ul>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn-small btn-color" data-dismiss="modal"><?=GetMessage("UNDO")?></button>
<button type="button" class="btn-small btn-color" id="post-offer-btn"><?=GetMessage("CONFIRM")?></button>
</div>
</div>
</div>
</div>
<form class="register-page" id="casting-form" method="POST">
<?=$arResult["BX_SESSION_CHECK"]?>
<?if($arResult['CASTING']['ID']>0):?>
<input type="hidden" name="CASTING[ID]" value="<?=$arResult['CASTING']['ID']?>">
<?endif;?>
<div id="alert-danger" class="alert-danger alert" style="display: none;">
<button type="button" class="close" data-dismiss="alert">×</button>
<span></span>
</div>
<?if (strlen($arResult["ERRORS"])) {
?>
<div class="alert-danger alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<?=$arResult["ERRORS"]?>
</div>
<?
}?>
<?if ($_REQUEST["POST_RESULT"]=='Y') {
?>
<div class="alert-success alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<?=GetMessage("THANKS_YOUR_AD_IS_ACCEPTED_FOR_MODERATION")?>
</div>
<?
}
elseif ($arResult["ERROR_ACCESS_DENIED"]=='Y') {
?>
<div class="alert-warning alert">
<?=GetMessage("PUBLICATION_OF_OFFERS_IS_AVAILABLE_FOR_REGISTERED")?><br>
<a data-toggle="modal" href="#" data-target="#auth_form"><?=GetMessage("LOG_IN")?></a> /
<a data-toggle="modal" href="#" data-target="#register_form"><?=GetMessage("SIGN_UP")?></a>
</div>
<?
}
elseif ($arResult["ERROR_SILENT_PERIOD"]=='Y') {
?>
<div class="alert-warning alert">
<?=GetMessage("IT_IS")?><?=$arResult["SILENT_PERIOD"]?><?=GetMessage("BEFORE_THE_POSSIBILITY_OF_OFFER_PLACEMENT")?>
</div>
<?
} else {?>
<div class="col-lg-6 col-md-6">
<label><?=GetMessage("AD_TITLE")?></label>
<input type="text" class="form-control" name="CASTING[NAME]" maxlength="255" value="<?=$arResult['CASTING']['NAME']?>">
<label><?=GetMessage("AD_TEXT")?></label>
<textarea class="form-control" name="CASTING_PROPS[CASTING_TEXT]" maxlength="3000"><?=$arResult['CASTING_PROPS']['CASTING_TEXT']?></textarea>
</div>
<div class="col-lg-6 col-md-6">
<label><?=GetMessage("FOR_WHOM")?></label>
<select class="form-control" id="sel_section" name="CASTING_PROPS[SECTIONS][]" multiple="" data-placeholder="<?=GetMessage("SELECT_CATEGORIES")?>">
<?$fwhen=0;?>
<?foreach($arResult['SECTIONS'] as $k => $v):?>
<option value="<?=$k?>"<?=in_array($k,$arResult['CASTING_PROPS']['SECTIONS'])?' selected':''?>><?=SITE_ID == "dv" ? $arCategoryEn[++$fwhen] : $v?></option>
<?endforeach;?>
</select>
<label><?=GetMessage("PLACE_CITY")?></label>
<input type="hidden" id="CASTING_CITY_PRE" value="<?=$arResult['CASTING_PROPS']['CITY']?>">
<select class="form-control" id="CASTING_CITY" name="CASTING_PROPS[CITY]" data-placeholder="<?=GetMessage("SELECT_THE_CITY")?>">
</select>
<div class="col-lg-6 col-md-6 row">
<div class="row">
<div class="col-sm-6">
<label><?=GetMessage("COMPENSATION")?></label>
<select class="form-control" id="sel_comp_type" name="CASTING_PROPS[COMPENSATION_TYPE]">
<?$comofen=0;?>
<?foreach($arResult['COMPENSATION_TYPE'] as $k => $v):?>
<option value="<?=$k?>"<?=$arResult['CASTING_PROPS']['COMPENSATION_TYPE']==$k?' selected':''?>><?=SITE_ID == "dv" ? $arCompensOfEn[++$comofen] : $v?></option>
<?endforeach;?>
</select>
</div>
<div class="col-sm-6">
<label><?=GetMessage("SUM")?></label>
<div class="input-group">
<input type="text" class="form-control" name="CASTING_PROPS[COMPENSATION]"
value="<?=$arResult['CASTING_PROPS']['COMPENSATION']?>">
<input type="hidden" class="form-control" name="CASTING_PROPS[COMPENSATION_CURRENCY]"
value="<?=$arResult['CASTING_PROPS']['COMPENSATION_CURRENCY']?>">
<div class="input-group-btn">
<button type="button" id="label_curency" class="btn btn-default dropdown-toggle"
data-toggle="dropdown"> <span class="caret"></span></button>
<ul class="dropdown-menu pull-right">
<?foreach($arResult['CURRENCY'] as $k => $v):?>
<li><a class="sel_curency" data-currency="<?=$k?>"><?=CurrencySymbols::get($v);?></a></li>
<?endforeach;?>
</ul>
</div>
</div>
</div>
</div>
<label id="casting-job-date"><?=GetMessage("AD_PUBLICATION_TIME")?></label>
<select class="form-control" name="CASTING_PROPS[PUBLIC_DATE]">
<?$publtimeofen=0;?>
<?foreach($arResult['PUBLIC_DATE'] as $k => $v):?>
<option value="<?=$k?>"<?=$arResult['CASTING_PROPS']['PUBLIC_DATE']==$k?' selected':''?>><?=SITE_ID == "dv" ? $arPublTimeOfferEn[++$publtimeofen] : $v?></option>
<?endforeach;?>
</select>
<div style="margin-left: 10px; margin-top: 10px;">
<button class="btn-special btn-grey" data-toggle="modal" data-target="#imageloader" type="button">
<i class="fa fa-camera"></i> <?=GetMessage("DOWNLOAD_IMAGE")?>
</button>
<input type="hidden" name="NEW_IMAGE" id="new_image_content">
</div>
</div>
<div class="col-lg-6 col-md-6">
<div class="portfolio-item-menu" style="margin-left: 75px; margin-top: 30px;">
<div class="portfolio-item" style="width: 150px; height: 104px;" id="new_image_preview">
<div><?=$arResult['PREVIEW_IMG']?></div>
</div>
</div>
</div>
</div>
<div style="clear:both;"></div>
<div class="hr"></div>
<div class="row">
<div class="col-lg-9">
<?$APPLICATION->IncludeComponent("bitrix:main.include",".default",
Array("AREA_FILE_SHOW" => "file", "PATH" => $arParams['POLICY'],"EDIT_TEMPLATE" => ""));?>
</div>
<div class="col-lg-3 text-right">
<button class="btn-small btn-color pull-right" type="button" id="confirm-buttom-submit"><?=GetMessage("SEND")?></button>
</div>
</div>
<? } ?>
</form>