From d65b12ab42c57c15033f8161b0189080e59a5556 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 20 May 2015 09:09:41 -0400 Subject: [PATCH] Retab file no tabs only spaces --- Toolkit/Videos/AdminEditVideoForm.php | 164 +++++++++++++------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/Toolkit/Videos/AdminEditVideoForm.php b/Toolkit/Videos/AdminEditVideoForm.php index 0977087..d421e0b 100644 --- a/Toolkit/Videos/AdminEditVideoForm.php +++ b/Toolkit/Videos/AdminEditVideoForm.php @@ -27,32 +27,32 @@ class Toolkit_Videos_AdminEditVideoForm extends Toolkit_FormBuilder { - /** - * What do you want the success msg to be if the form validates successfully - * - * @var string - * @access protected - */ - protected $successMsg - = '
Coupon successfully updated.
'; + /** + * What do you want the success msg to be if the form validates successfully + * + * @var string + * @access protected + */ + protected $successMsg + = '
Coupon successfully updated.
'; - /** - * The default rules to register for validating - * - * We have to register these rules, or any others we want, before - * we are able to use them in our forms. - * - * @var string - * @access protected - */ - protected $registeredRules = array( - array( - 'checkURI', - 'callback', - 'uri', - 'Validate' - ) - ); + /** + * The default rules to register for validating + * + * We have to register these rules, or any others we want, before + * we are able to use them in our forms. + * + * @var string + * @access protected + */ + protected $registeredRules = array( + array( + 'checkURI', + 'callback', + 'uri', + 'Validate' + ) + ); public $errorMsg = '
There was a Problem with your form!
'; @@ -99,7 +99,7 @@ class Toolkit_Videos_AdminEditVideoForm * @return void */ public function configureElements(PDO $dbh, Config_Container $c) - { + { $e = array(); // get reference to [conf] section of config file @@ -109,12 +109,12 @@ class Toolkit_Videos_AdminEditVideoForm ->getContent(); // All Elements are created here. // This includes group element definitions. - $e[] = array( + $e[] = array( 'type' => 'advcheckbox', 'req' => false, 'name' => 'active', - 'display' => 'Active', - 'val' => array(0, 1) + 'display' => 'Active', + 'val' => array(0, 1) ); if ($appHasFeaturedVideos) { $e[] = array( @@ -132,17 +132,17 @@ class Toolkit_Videos_AdminEditVideoForm ); } $e[] = array( - 'type' => 'text', - 'req' => true, - 'name' => 'video_url', - 'display' => 'Video Link
+ 'type' => 'text', + 'req' => true, + 'name' => 'video_url', + 'display' => 'Video Link
Click on the \'Share\' function on the YouTube video
to get your link. If you\'re having problems click on "show options" and select "long link"
', - 'opts' => array('class' => 'text','size'=>50) + 'opts' => array('class' => 'text','size'=>50) ); - $e[] = array( + $e[] = array( 'type' => 'submit', 'req' => false, 'name' => 'submit_rmv', @@ -159,8 +159,8 @@ class Toolkit_Videos_AdminEditVideoForm ); } - $this->setupElements($e); - } + $this->setupElements($e); + } /** * Setup Form filters @@ -168,19 +168,19 @@ class Toolkit_Videos_AdminEditVideoForm * @return void */ public function configureFilters() - { + { $f = array(); - $f[] = array( + $f[] = array( 'element' => '__ALL__', 'filter' => 'trim' ); $f[] = array( 'element' => 'url', - 'filter' => array('Toolkit_Common', 'filterURI') + 'filter' => array('Toolkit_Common', 'filterURI') ); - $this->setupFilters($f); - } + $this->setupFilters($f); + } /** * Runs all function to setup the Form @@ -191,15 +191,15 @@ class Toolkit_Videos_AdminEditVideoForm * @return void */ public function configureForm( - PDO $dbh, - Config_Container $c - ) { - $this->configureElements($dbh, $c); - $this->configureFilters(); - $this->configureRules(); - $this->configureDefaults($dbh); - $this->configureConstants(); - } + PDO $dbh, + Config_Container $c + ) { + $this->configureElements($dbh, $c); + $this->configureFilters(); + $this->configureRules(); + $this->configureDefaults($dbh); + $this->configureConstants(); + } /** * Setup the Form's rules @@ -207,25 +207,25 @@ class Toolkit_Videos_AdminEditVideoForm * @return void */ public function configureRules() - { + { $r = array(); - $r[] = array( - 'element' => 'video_url', - 'message' => 'ERROR: Invalid URL format (http)', - 'type' => 'checkURI', - 'format' => array( - 'allowed_schemes' => array('http'), - 'strict' => false - ), - 'validation' => $this->validationType, - 'reset' => false, - 'force' => false - ); + $r[] = array( + 'element' => 'video_url', + 'message' => 'ERROR: Invalid URL format (http)', + 'type' => 'checkURI', + 'format' => array( + 'allowed_schemes' => array('http'), + 'strict' => false + ), + 'validation' => $this->validationType, + 'reset' => false, + 'force' => false + ); - $this->setupRules($r); - } + $this->setupRules($r); + } /** * _processData function creates an video object Toolkit_Videos_Video @@ -287,23 +287,23 @@ class Toolkit_Videos_AdminEditVideoForm } } - $this->setupRenderers(); - if ($this->validate()) { - $this->cleanForm(); + $this->setupRenderers(); + if ($this->validate()) { + $this->cleanForm(); - $submitValues = $this->getSubmitValues(); - if ($this->_processData($dbh, $submitValues)) { - $this->freeze(); - $output = $this->successMsg; - } + $submitValues = $this->getSubmitValues(); + if ($this->_processData($dbh, $submitValues)) { + $this->freeze(); + $output = $this->successMsg; + } header('Location: videos.php'); - } elseif ($this->isSubmitted()) { - $output = $this->errorMsg; - $output .= parent::toHTML(); - } else { - $output = parent::toHTML(); - } - return $output; - } + } elseif ($this->isSubmitted()) { + $output = $this->errorMsg; + $output .= parent::toHTML(); + } else { + $output = parent::toHTML(); + } + return $output; + } } -- 2.17.1