From d3df4b14d2ca2eb997bf5c31b017502ca59cb15b Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Wed, 23 Nov 2011 12:52:35 -0500 Subject: [PATCH] CC-3093: SoundCloud preferences do not have email or password as required fields + firefox auto-fills the password field - Make the form fields required - Append "Required" label to the fields - Disable autocomplete for the fields --- .../application/forms/SoundcloudPreferences.php | 10 ++++++---- .../views/scripts/form/preferences_soundcloud.phtml | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/forms/SoundcloudPreferences.php b/airtime_mvc/application/forms/SoundcloudPreferences.php index ad85b22b1..1597bbe19 100644 --- a/airtime_mvc/application/forms/SoundcloudPreferences.php +++ b/airtime_mvc/application/forms/SoundcloudPreferences.php @@ -42,9 +42,10 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm //SoundCloud Username $this->addElement('text', 'SoundCloudUser', array( 'class' => 'input_text', - 'label' => 'SoundCloud Email:', - 'required' => false, + 'label' => 'SoundCloud Email', + 'required' => true, 'filters' => array('StringTrim'), + 'autocomplete' => 'off', 'value' => Application_Model_Preference::GetSoundCloudUser(), 'decorators' => array( 'ViewHelper' @@ -54,9 +55,10 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm //SoundCloud Password $this->addElement('password', 'SoundCloudPassword', array( 'class' => 'input_text', - 'label' => 'SoundCloud Password:', - 'required' => false, + 'label' => 'SoundCloud Password', + 'required' => true, 'filters' => array('StringTrim'), + 'autocomplete' => 'off', 'value' => Application_Model_Preference::GetSoundCloudPassword(), 'decorators' => array( 'ViewHelper' diff --git a/airtime_mvc/application/views/scripts/form/preferences_soundcloud.phtml b/airtime_mvc/application/views/scripts/form/preferences_soundcloud.phtml index 99456616a..20bcc92c9 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_soundcloud.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_soundcloud.phtml @@ -40,7 +40,9 @@
- +
element->getElement('SoundCloudUser') ?> @@ -53,7 +55,9 @@
- +
element->getElement('SoundCloudPassword') ?>