Esempio n. 1
0
 public static function value($name, $code)
 {
     if (!isset($code)) {
         return null;
     }
     $fv = FieldNames::values($name);
     return $fv[$code];
 }
Esempio n. 2
0
echo $form->labelEx($model, 'marriage_status');
?>
		<?php 
echo $form->dropDownList($model, 'marriage_status', FieldNames::values('marriage_status'), array('prompt' => '--- Select ---'));
?>
		<?php 
echo $form->error($model, 'marriage_status');
?>
	</span>

	<span class="rightHalf">
		<?php 
echo $form->labelEx($model, 'monthly_income');
?>
		<?php 
echo $form->dropDownList($model, 'monthly_income', FieldNames::values('monthly_household_income'), array('prompt' => '--- Select ---'));
?>
		<?php 
echo $form->error($model, 'monthly_income');
?>
	</span>
	</div>

	<?php 
/* if (!$model->isNewRecord): ?>
	<div class="row">
	<span class="leftHalf">
		<?php echo $form->labelEx($model,'disabled'); ?>
		<?php echo $form->dropDownList($model,'disabled',array(0=>'No',1=>'Yes')); ?>
	</span>
	<span class="rightHalf">
Esempio n. 3
0
# Alive Parish Software is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
?>

<table class="cellular">
<thead>
<tr>
	<th rowspan="2">Need Item</th>
	<th colspan="<?php 
$fv = FieldNames::values('need_level');
echo count($fv);
?>
">Need Level Percentage (Count)</th>
	<th rowspan="2">Total</th>
</tr>
<tr>
<?php 
foreach ($fv as $nv => $val) {
    echo '<th class="option">' . $val . '</th>';
}
?>
</tr>
</thead>

<?php 
Esempio n. 4
0
	<div class="row">
		<?php 
echo $form->label($model, 'language');
?>
		<?php 
echo $form->dropDownList($model, "language", FieldNames::values('languages'), array('prompt' => '-- Select --'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'day');
?>
		<?php 
echo $form->dropDownList($model, "day", FieldNames::values('weekdays'), array('prompt' => '-- Select --'));
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Search');
?>
	</div>

<?php 
$this->endWidget();
?>

</div><!-- search-form -->
Esempio n. 5
0
	<div class="row">
		<?php 
echo $form->label($model, 'name');
?>
		<?php 
echo $form->textField($model, 'name', array('size' => 50, 'maxlength' => 50));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'sex');
?>
		<?php 
echo $form->dropDownList($model, "sex", FieldNames::values('sex'), array('prompt' => '--- Select ---'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'fathers_name');
?>
		<?php 
echo $form->textField($model, 'fathers_name', array('size' => 60, 'maxlength' => 75));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'mothers_name');
Esempio n. 6
0
}
?>
	</tr>
</thead>

<?php 
foreach ($awarenessItems as $data) {
    ?>
	
	<th><?php 
    echo CHtml::encode($data->text);
    ?>
:</th>

	<?php 
    $sid = $data->id;
    $fv = FieldNames::values('awareness_level');
    foreach ($fv as $fid => $attr) {
        $chk = isset($awarenessData[$sid]) ? $awarenessData[$sid] == $fid : false;
        echo '<td>';
        echo CHtml::radioButton("AwarenessData[{$sid}]", $chk, array('id' => "AwarenessData_{$sid}_value_{$fid}", 'value' => $fid));
        echo "</td>";
    }
    ?>
	</tr>
<?php 
}
?>
</table>

Esempio n. 7
0
		<?php 
echo $form->labelEx($model, 'visit_dt');
?>
		<?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => "visit_dt", 'options' => array('dateFormat' => Yii::app()->params['dateFmtDP'], 'yearRange' => 'c-10:c+10', 'changeYear' => true), 'htmlOptions' => array('size' => '10', 'maxlength' => '10')));
?>
		<?php 
echo $form->error($model, 'visit_dt');
?>
	</span>
	<span class="rightHalf">
		<?php 
echo $form->labelEx($model, 'purpose');
?>
		<?php 
echo $form->dropDownList($model, "purpose", FieldNames::values('visit_purpose'), array('prompt' => '--- Select ---'));
?>
		<?php 
echo $form->error($model, 'purpose');
?>
	</span>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
?>
	</div>

<?php 
$this->endWidget();
Esempio n. 8
0
echo $form->labelEx($model, 'email');
?>
		<?php 
echo $form->textField($model, 'email', array('size' => 30, 'maxlength' => 30));
?>
		<?php 
echo $form->error($model, 'email');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'role');
?>
		<?php 
echo $form->dropDownList($model, 'role', FieldNames::values('pastor_role'));
?>
		<?php 
echo $form->error($model, 'role');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
?>
	</div>

<?php 
$this->endWidget();
?>
Esempio n. 9
0
	<div class="row">
		<?php 
echo $form->label($model, 'bride_residence');
?>
		<?php 
echo $form->textField($model, 'bride_residence', array('size' => 25, 'maxlength' => 25));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'marriage_type');
?>
		<?php 
echo $form->dropDownList($model, 'marriage_type', FieldNames::values('marriage_type', $model->marriage_type), array('prompt' => '-- Select one --'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'banns_licence');
?>
		<?php 
echo $form->dropDownList($model, 'banns_licence', array('banns' => 'Banns', 'licence' => 'Licence'), array('prompt' => '-- Select one --'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'minister');
Esempio n. 10
0
		<?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => "groom_baptism_dt", 'options' => array('dateFormat' => Yii::app()->params['dateFmtDP'], 'yearRange' => '1900:c+10', 'changeYear' => true), 'htmlOptions' => array('size' => '10', 'maxlength' => '10')));
?>
		<?php 
echo $form->error($model, 'groom_baptism_dt');
?>
	</span>
	</div>

	<div class="row">
	<span class="leftHalf">
		<?php 
echo $form->labelEx($model, 'groom_status');
?>
		<?php 
echo $form->dropDownList($model, 'groom_status', FieldNames::values('marital_status'), array('prompt' => '-- Select --'));
?>
		<?php 
echo $form->error($model, 'groom_status');
?>
	</span>

	<span class="rightHalf">
		<?php 
echo $form->labelEx($model, 'groom_rank_prof');
?>
		<?php 
echo $form->textField($model, 'groom_rank_prof', array('size' => 25, 'maxlength' => 25));
?>
		<?php 
echo $form->error($model, 'groom_rank_prof');
# Alive Parish Software is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
?>

<table class="cellular">
<thead>
<tr>
	<th rowspan="2">Satisfaction Item</th>
	<th colspan="<?php 
$fv = FieldNames::values('satisfaction_level');
echo count($fv);
?>
">Satisfaction Level Percentage (Count)</th>
	<th rowspan="2">Total</th>
</tr>
<tr>
<?php 
foreach ($fv as $nv => $val) {
    echo '<th class="option">' . $val . '</th>';
}
?>
</tr>
</thead>

<?php 
Esempio n. 12
0
		<?php 
echo $form->labelEx($model, 'time');
?>
		<?php 
echo $form->textField($model, 'time', array('size' => 10, 'maxlength' => 10));
?>
		<?php 
echo $form->error($model, 'time');
?>
	</span>
	<span class="rightThird">
		<?php 
echo $form->labelEx($model, 'language');
?>
		<?php 
echo $form->dropDownList($model, "language", FieldNames::values('languages'));
?>
		<?php 
echo $form->error($model, 'language');
?>
	</span>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
?>
	</div>

<?php 
$this->endWidget();
 public function actionMasses()
 {
     Yii::trace('massBooking/masses called', 'application.controllers.MassBooking');
     if (isset($_POST['MassBooking'])) {
         $mass_dt = $_POST['MassBooking']['mass_dt'];
         $dt = new DateTime(date('Y-m-d', CDateTimeParser::parse($mass_dt, Yii::app()->locale->getDateFormat('short'))));
         $data = $this->getMasses($dt);
         $lv = FieldNames::values('languages');
         echo CHtml::tag('option', array('value' => ''), '--- Select ---', true);
         $today = Yii::app()->dateFormatter->formatDateTime(time(), 'short', null);
         $now = Yii::app()->dateFormatter->formatDateTime(time(), null, 'short');
         if ($dt < new DateTime()) {
             return;
         }
         foreach ($data as $mass) {
             if ($today === $mass_dt and $mass->time < $now) {
                 continue;
             }
             echo CHtml::tag('option', array('value' => $mass->id), CHtml::encode($mass->time . " -- " . $lv[$mass->language]), true);
         }
     }
 }
Esempio n. 14
0
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
/* @var $this NeedItemsController */
/* @var $dataProvider CActiveDataProvider */
$this->breadcrumbs = array('Admin' => array('site/page', 'view' => 'admin'), 'Need Items');
?>

<table>
<?php 
$needModel = new NeedData();
$needLevels = FieldNames::values('need_level');
?>

<thead>
	<tr>
		<th>&nbsp;</th>
<?php 
foreach ($needLevels as $level) {
    echo '<th>' . $level . '</th>';
}
?>
		<th>
	</tr>
</thead>

<?php 
Esempio n. 15
0
# Alive Parish - software to manage tomorrow's parish
# Copyright (C) 2013  Redemptorist Media Center
#
# Alive Parish Software is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# Alive Parish Software is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
/* @var $this SatisfactionItemController */
/* @var $data SatisfactionItems */
?>

	<b><?php 
echo CHtml::encode($data->text);
?>
:</b>

	<?php 
$sid = $data->id;
echo $form->dropDownList($model, "[SatisfactionData][{$sid}]value", FieldNames::values('satisfaction_level'));
?>
	<br />
Esempio n. 16
0
		<?php 
echo $form->labelEx($model, "[{$person}]lang_edu");
?>
		<?php 
echo $form->dropDownList($model, "[{$person}]lang_edu", FieldNames::values('languages'));
?>
		<?php 
echo $form->error($model, "[{$person}]lang_edu");
?>
	</span>
	<span class="rightHalf">
		<?php 
echo $form->labelEx($model, "[{$person}]rite");
?>
		<?php 
echo $form->dropDownList($model, "[{$person}]rite", FieldNames::values('rite'), array('prompt' => '--- Select ---'));
?>
		<?php 
echo $form->error($model, "[{$person}]rite");
?>
	</span>
	</div>

	<div class="row">
	<span class="leftHalf">
		<?php 
echo $form->labelEx($model, "[{$person}]baptism_dt");
?>
		<?php 
$pstr = preg_replace('/\\]\\[/', '_', $person);
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => "[{$person}]baptism_dt", 'options' => array('dateFormat' => Yii::app()->params['dateFmtDP'], 'yearRange' => '1900:c+10', 'changeYear' => true, 'maxDate' => 0, 'beforeShowDay' => 'js:function(dt) {
Esempio n. 17
0
 public static function values($type)
 {
     return FieldNames::values($type);
 }