<?php

require_once 'ApplicationSetup.php';

class ReviewsSetup extends ApplicationSetup {
    // fields are required unless otherwise specified
    protected $fields = array(
        'pageSize' => array(
            'label' => '<strong>Results per page.</strong> How many results per page to display.',
            'type' => 'integer',
            'rules' => array('minimum' => array('must be at least 1', 1))),
        'googleMapsAPIKey' => array(
            'label' => "<strong>Google Maps API Key.</strong> Be sure to <a target='_blank' href='http://www.google.com/apis/maps/signup.html'>get a new Google Maps API key</a> and copy it into the box below.",
            'type' => 'text',
            'class' => 'wideInput'),
	'mapType' => array(
 		'label' => "Type of Google Map to use.",
		'type' => 'select',
		'choices' => array("0"=>"Street Map", "1" => "Satellite Map", "2" => "Hybrid Map")
		),
        'googleMapsInitialExtentURL' => array(
            'label' => "<strong>Google Maps Initial Extent.</strong> This is the bounding box of the map on the front page. To set this, go to <a target='_blank' href='http://maps.google.com'>Google Maps</a>, zoom to the desired area, click Link To This Page, and copy the URL into the box below. (<span class=\"note\">Note: Make sure that the URL has an \"ll=\" in it.</span> If it doesn't, drag the map a little bit then click Link To This Page again).",
            'type' => 'text',
            'class' => 'wideInput',
            'rules' => array('regex' => array('must have an "ll=" in it', '/ll=/'))));
}

$setup = new ReviewsSetup($fields);
$setup->go();
