Example #1
0
 private function getLocation()
 {
     $location = new Location();
     $location->Address = $this->locationStreet;
     $location->City = $this->locationCity;
     $location->State = Location::GetStates()[$this->locationState];
     $location->Zip = $this->locationZip;
     $result = Location::model()->findExisting($location);
     if ($result == null) {
         $location->save();
         $result = $location;
     }
     return $result;
 }
Example #2
0
            </div>

        </div>
    </div>
    <!------- end main content container----->
</div>

<style>
    #map {
        width: 100%;
        height: 200px;
    }
</style>

<?php 
$address = $model->locationStreet . ', ' . $model->locationCity . ', ' . Location::GetStates()[$model->locationState];
?>

<script type="text/javascript">
    $(document).ready(function ()
    {
        google.load('maps', '3.x', {other_params:'sensor=true', callback:function ()
        {
            $("#map").gmap3({
                map   :{
                    address :'<?php 
echo $address;
?>
',
                    options :{
                        mapTypeId         :google.maps.MapTypeId.ROADMAP,
Example #3
0
        <div class="row">
            <div class="four columns">
                <label class="inline right">Address</label>
            </div>
            <div class="eight columns">
                <input id="address" type="text" placeholder="Street Address" />
            </div>
        </div>
        <div class="row">
            <div class="three columns offset-by-four">
                <input id="city" type="text" placeholder="City">
            </div>
            <div class="two columns">
                <select id="state">
                    <?php 
foreach (Location::GetStates() as $state) {
    echo "<option value='{$state}}'>{$state}</option>\n";
}
?>
                </select>
            </div>
            <div class="three columns">
                <input id="zip" type="text" maxlength="5" placeholder="Zip Code" />
            </div>
        </div>

    </div>

    <h4>Bank Account Information</h4>

    <div class="row">
Example #4
0
            </div>
            <div class="eight columns">
                <?php 
echo $form->textField($model, 'locationStreet', array('maxlength' => 2000, 'placeholder' => 'Street ex. 444 Charles Ave'));
?>
            </div>
        </div>
        <div class="row">
            <div class="three columns offset-by-four">
                <?php 
echo $form->textField($model, 'locationCity', array('maxlength' => 255, 'placeholder' => 'City'));
?>
            </div>
            <div class="three columns">
                <?php 
echo $form->dropDownList($model, 'locationState', Location::GetStates());
?>
            </div>
            <div class="two columns">
                <?php 
echo $form->textField($model, 'locationZip', array('maxlength' => 5));
?>
            </div>
        </div>

        <?php 
if (isset($model->Audience) && $model->Audience == ExperienceAudience::Kids) {
    ?>

        <!----- Only show this if they previously selected that this is a kids experience------>
        <div class="row">
Example #5
0
            </div>
            <div class="eight columns">
                <?php 
echo $form->textField($model, 'locationStreet', array('maxlength' => 2000, 'placeholder' => 'Street ex. 444 Charles Ave'));
?>
            </div>
        </div>
        <div class="row">
            <div class="three columns offset-by-four">
                <?php 
echo $form->textField($model, 'locationCity', array('maxlength' => 255, 'placeholder' => 'City'));
?>
            </div>
            <div class="three columns">
                <?php 
echo $form->dropDownList($model, 'locationState', array_combine(Location::GetStates(), Location::GetStates()));
?>
            </div>
            <div class="two columns">
                <?php 
echo $form->textField($model, 'locationZip', array('maxlength' => 5));
?>
            </div>
        </div>

        <?php 
if (isset($model->Audience) && $model->Audience == ExperienceAudience::Kids) {
    ?>

        <!----- Only show this if they previously selected that this is a kids experience------>
        <div class="row">
Example #6
0
 public function setLocationState($value)
 {
     if (is_numeric($value)) {
         $value = Location::GetStates()[$value];
     }
     $this->location->State = $value;
     $this->location->save();
 }