Exemplo n.º 1
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . VacancyModule::t('Add_feedback');
$this->menu = array(array('label' => tt('Vacancy_management'), 'url' => array('admin')));
$this->adminTitle = VacancyModule::t('Add_feedback');
?>

<?php 
echo $this->renderPartial('/backend/_form', array('model' => $model));
Exemplo n.º 2
0
<?php

$this->menu = array(array('label' => VacancyModule::t('Add_feedback'), 'url' => array('create')), array('label' => VacancyModule::t('Edit_vacancy'), 'url' => array('update', 'id' => $model->id)), array('label' => tt('Delete_vacancy', 'vacancy'), 'url' => '#', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => tc('Are you sure you want to delete this item?'))));
$this->adminTitle = tt('View_vacancy');
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array('id', 'name', 'email', array('label' => CHtml::encode($model->getAttributeLabel('body')), 'value' => CHtml::encode($model->body), 'type' => 'raw', 'template' => "<tr class=\"{class}\"><th>{label}</th><td>{value}</td></tr>\n"), 'date_created')));
Exemplo n.º 3
0
<?php

$this->pageTitle .= ' - ' . VacancyModule::t('Vacancy') . ' - ' . tt('Add_feedback');
$this->breadcrumbs = array(tt('Vacancy') => array('/vacancy/main/index'), tt('Add_feedback'));
?>

<h1 class="title highlight-left-right">
	<span><?php 
echo tt('Add_feedback');
?>
</span>
</h1>
<div class="clear"></div><br />

<div class="form">
	<?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->controller->createUrl('/vacancy/main/add'), 'id' => 'commentform', 'enableAjaxValidation' => false, 'clientOptions' => array('validateOnSubmit' => false)));
if (!Yii::app()->user->isGuest) {
    if ($model->name == '') {
        $model->name = Yii::app()->user->getState('username');
    }
    if ($model->email == '') {
        $model->email = Yii::app()->user->getState('email');
    }
}
?>

	<p class="note"><?php 
echo Yii::t('common', 'Fields with <span class="required">*</span> are required.');
?>
</p>
Exemplo n.º 4
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . VacancyModule::t('Edit_vacancy');
$this->menu = array(array('label' => tt('Vacancy_management'), 'url' => array('admin')), array('label' => VacancyModule::t('Add_feedback'), 'url' => array('create')), array('label' => tt('Delete_vacancy'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => tc('Are you sure you want to delete this item?'))));
$this->adminTitle = VacancyModule::t('Edit_vacancy');
?>

<?php 
echo $this->renderPartial('/backend/_form', array('model' => $model));
Exemplo n.º 5
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . VacancyModule::t('Vacancy_management');
$this->menu = array(array('label' => VacancyModule::t('Add_feedback'), 'url' => array('create')));
$this->adminTitle = VacancyModule::t('Vacancy_management');
?>

<?php 
$this->widget('CustomGridView', array('id' => 'vacancy-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'afterAjaxUpdate' => 'function(){$("a[rel=\'tooltip\']").tooltip(); $("div.tooltip-arrow").remove(); $("div.tooltip-inner").remove();}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'itemsSelected', 'selectableRows' => '2', 'htmlOptions' => array('class' => 'center')), array('class' => 'editable.EditableColumn', 'name' => 'user_ip', 'value' => 'BlockIp::displayUserIP($data)', 'headerHtmlOptions' => array('style' => 'width: 110px'), 'editable' => array('apply' => '$data->user_ip != "" && Yii::app()->user->checkAccess("blockip_admin")', 'url' => Yii::app()->controller->createUrl('/blockIp/backend/main/ajaxAdd'), 'placement' => 'right', 'emptytext' => '', 'savenochange' => 'true', 'title' => tt('Add the IP address to the list of blocked', 'blockIp'), 'options' => array('ajaxOptions' => array('dataType' => 'json')), 'onShown' => 'js: function() {
					var input = $(this).parent().find(".input-medium");

					$(input).attr("disabled", "disabled");
				}', 'success' => 'js: function(response, newValue) {
					if (response.msg == "ok") {
						message("' . tt("Ip was success added", 'blockIp') . '");
					}
					else if (response.msg == "already_exists") {
						var newValField = "' . tt("Ip was already exists", 'blockIp') . '";

						return newValField;
					}
					else if (response.msg == "save_error") {
						var newValField = "' . tt("Error. Repeat attempt later", 'blockIp') . '";

						return newValField;
					}
					else if (response.msg == "no_value") {
						var newValField = "' . tt("Enter Ip", 'blockIp') . '";

						return newValField;
					}