style(legacy): fix code format with php-cs-fixer (#1674)
This commit is contained in:
parent
e1dc69af9e
commit
69d8eae845
111 changed files with 1163 additions and 1163 deletions
|
@ -84,7 +84,7 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
|||
|
||||
$show_end->add(new DateInterval("PT{$duration[0]}H"));
|
||||
$show_end->add(new DateInterval("PT{$duration[1]}M"));
|
||||
$show_end->add(new DateInterval('PT1H')); //min time to wait until a rebroadcast
|
||||
$show_end->add(new DateInterval('PT1H')); // min time to wait until a rebroadcast
|
||||
|
||||
$rebroad_start = $day . ' ' . $formData['add_show_rebroadcast_time_absolute_' . $i];
|
||||
$rebroad_start = new DateTime($rebroad_start);
|
||||
|
|
|
@ -17,7 +17,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
|
|||
->setRequired(false);
|
||||
$this->addElement($cb_custom_auth);
|
||||
|
||||
//custom username
|
||||
// custom username
|
||||
$custom_username = new Zend_Form_Element_Text('custom_username');
|
||||
$custom_username->setAttrib('class', 'input_text')
|
||||
->setAttrib('autocomplete', 'off')
|
||||
|
@ -28,7 +28,7 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
|
|||
new ConditionalNotEmpty(['cb_custom_auth' => '1']), ]);
|
||||
$this->addElement($custom_username);
|
||||
|
||||
//custom password
|
||||
// custom password
|
||||
$custom_password = new Zend_Form_Element_Password('custom_password');
|
||||
$custom_password->setAttrib('class', 'input_text')
|
||||
->setAttrib('autocomplete', 'off')
|
||||
|
|
|
@ -92,7 +92,7 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
|||
|
||||
$show_end->add(new DateInterval("PT{$duration[0]}H"));
|
||||
$show_end->add(new DateInterval("PT{$duration[1]}M"));
|
||||
$show_end->add(new DateInterval('PT1H')); //min time to wait until a rebroadcast
|
||||
$show_end->add(new DateInterval('PT1H')); // min time to wait until a rebroadcast
|
||||
|
||||
$rebroad_start = $formData['add_show_start_date'] . ' ' . $formData['add_show_rebroadcast_time_' . $i];
|
||||
$rebroad_start = new DateTime($rebroad_start);
|
||||
|
|
|
@ -8,7 +8,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
|||
$linked->setLabel(_('Link:'));
|
||||
$this->addElement($linked);
|
||||
|
||||
//Add type select
|
||||
// Add type select
|
||||
$this->addElement('select', 'add_show_repeat_type', [
|
||||
'required' => true,
|
||||
'label' => _('Repeat Type:'),
|
||||
|
@ -98,7 +98,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
|||
$end_timestamp = $formData['add_show_end_date'];
|
||||
$showTimeZone = new DateTimeZone($formData['add_show_timezone']);
|
||||
|
||||
//We're assuming all data is valid at this point (timezone, etc.).
|
||||
// We're assuming all data is valid at this point (timezone, etc.).
|
||||
|
||||
$startDate = new DateTime($start_timestamp, $showTimeZone);
|
||||
$endDate = new DateTime($end_timestamp, $showTimeZone);
|
||||
|
|
|
@ -25,7 +25,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
])
|
||||
->setValue('future')
|
||||
->setDecorators(['ViewHelper']);
|
||||
//$startDate->setAttrib('alt', 'date');
|
||||
// $startDate->setAttrib('alt', 'date');
|
||||
$this->addElement($startNow);
|
||||
|
||||
// Add start date element
|
||||
|
@ -135,7 +135,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
$start_time = $formData['add_show_start_date'] . ' ' . $formData['add_show_start_time'];
|
||||
$end_time = $formData['add_show_end_date_no_repeat'] . ' ' . $formData['add_show_end_time'];
|
||||
|
||||
//have to use the timezone the user has entered in the form to check past/present
|
||||
// have to use the timezone the user has entered in the form to check past/present
|
||||
$showTimezone = new DateTimeZone($formData['add_show_timezone']);
|
||||
$nowDateTime = new DateTime('now', $showTimezone);
|
||||
$showStartDateTime = new DateTime($start_time, $showTimezone);
|
||||
|
@ -164,7 +164,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
$valid = false;
|
||||
}
|
||||
|
||||
//validate duration.
|
||||
// validate duration.
|
||||
$duration = $showStartDateTime->diff($showEndDateTime);
|
||||
|
||||
if ($showStartDateTime > $showEndDateTime) {
|
||||
|
@ -193,7 +193,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
* upto this point
|
||||
*/
|
||||
if ($valid) {
|
||||
//we need to know the start day of the week in show's local timezome
|
||||
// we need to know the start day of the week in show's local timezome
|
||||
$startDow = $showStartDateTime->format('w');
|
||||
|
||||
$utc = new DateTimeZone('UTC');
|
||||
|
@ -201,7 +201,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
$showEndDateTime->setTimezone($utc);
|
||||
|
||||
if ($formData['add_show_repeats']) {
|
||||
//get repeating show end date
|
||||
// get repeating show end date
|
||||
if ($formData['add_show_no_end']) {
|
||||
$date = Application_Model_Preference::GetShowsPopulatedUntil();
|
||||
|
||||
|
@ -217,7 +217,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
$populateUntilDateTime->setTimezone($utc);
|
||||
}
|
||||
|
||||
//get repeat interval
|
||||
// get repeat interval
|
||||
if ($formData['add_show_repeat_type'] == 0) {
|
||||
$interval = 'P7D';
|
||||
} elseif ($formData['add_show_repeat_type'] == 1) {
|
||||
|
@ -280,7 +280,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
$repeatShowEnd->setTimezone($showTimezone);
|
||||
$repeatShowStart->add(new DateInterval('P' . $daysAdd . 'D'));
|
||||
$repeatShowEnd->add(new DateInterval('P' . $daysAdd . 'D'));
|
||||
//set back to UTC
|
||||
// set back to UTC
|
||||
$repeatShowStart->setTimezone($utc);
|
||||
$repeatShowEnd->setTimezone($utc);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
*/
|
||||
while ($repeatShowStart->getTimestamp() < $populateUntilDateTime->getTimestamp()) {
|
||||
if ($formData['add_show_id'] == -1) {
|
||||
//this is a new show
|
||||
// this is a new show
|
||||
$overlapping = Application_Model_Schedule::checkOverlappingShows(
|
||||
$repeatShowStart,
|
||||
$repeatShowEnd
|
||||
|
|
|
@ -18,7 +18,7 @@ class Application_Form_AddShowWho extends Zend_Form_SubForm
|
|||
$options[$host['index']] = $host['label'];
|
||||
}
|
||||
|
||||
//Add hosts selection
|
||||
// Add hosts selection
|
||||
$hosts = new Zend_Form_Element_MultiCheckbox('add_show_hosts');
|
||||
$hosts->setLabel(_('DJs:'))
|
||||
->setMultiOptions($options);
|
||||
|
|
|
@ -49,7 +49,7 @@ class Application_Form_AddTracktype extends Zend_Form
|
|||
'0' => _('Disabled'),
|
||||
'1' => _('Enabled'),
|
||||
]);
|
||||
//$visibility->getValue();
|
||||
// $visibility->getValue();
|
||||
$visibility->setRequired(true);
|
||||
$this->addElement($visibility);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class Application_Form_AddUser extends Zend_Form
|
|||
$login->setRequired(true);
|
||||
$login->addValidator($notEmptyValidator);
|
||||
$login->addFilter('StringTrim');
|
||||
//$login->addValidator('UserNameValidate');
|
||||
// $login->addValidator('UserNameValidate');
|
||||
$this->addElement($login);
|
||||
|
||||
$password = new Zend_Form_Element_Password('password');
|
||||
|
|
|
@ -10,7 +10,7 @@ class Application_Form_DangerousPreferences extends Zend_Form_SubForm
|
|||
|
||||
$clearLibrary = new Zend_Form_Element_Button('clear_library');
|
||||
$clearLibrary->setLabel(_('Delete All Tracks in Library'));
|
||||
//$submit->removeDecorator('Label');
|
||||
// $submit->removeDecorator('Label');
|
||||
$clearLibrary->setAttribs(['class' => 'btn centered']);
|
||||
$clearLibrary->setAttrib('onclick', 'deleteAllFiles();');
|
||||
$clearLibrary->removeDecorator('DtDdWrapper');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class Application_Form_EditHistory extends Zend_Form
|
||||
{
|
||||
public const VALIDATE_DATETIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
|
||||
//this is used by the javascript widget, unfortunately h/H is opposite from Zend.
|
||||
// this is used by the javascript widget, unfortunately h/H is opposite from Zend.
|
||||
public const TIMEPICKER_DATETIME_FORMAT = 'yyyy-MM-dd hh:mm:ss';
|
||||
|
||||
public const VALIDATE_DATE_FORMAT = 'yyyy-MM-dd';
|
||||
|
@ -151,8 +151,8 @@ class Application_Form_EditHistory extends Zend_Form
|
|||
|
||||
for ($i = 0, $len = count($template); $i < $len; ++$i) {
|
||||
$item = $template[$i];
|
||||
//don't dynamically add this as it should be included in the
|
||||
//init() function already if it should show up in the UI..
|
||||
// don't dynamically add this as it should be included in the
|
||||
// init() function already if it should show up in the UI..
|
||||
if (in_array($item['name'], $required)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ class Application_Form_EditHistory extends Zend_Form
|
|||
$options = isset($arr[self::ITEM_OPTIONS]) ? $arr[self::ITEM_OPTIONS] : null;
|
||||
$validator = new $arr[self::ITEM_CLASS]($options);
|
||||
|
||||
//extra validator info
|
||||
// extra validator info
|
||||
if (isset($arr['params'])) {
|
||||
foreach ($arr['params'] as $key => $value) {
|
||||
$method = 'set' . ucfirst($key);
|
||||
|
|
|
@ -43,7 +43,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory
|
|||
$ends->addFilter('StringTrim');
|
||||
$ends->setLabel(_('End Time'));
|
||||
$ends->setDecorators(['ViewHelper']);
|
||||
//$ends->setRequired(true);
|
||||
// $ends->setRequired(true);
|
||||
$this->addElement($ends);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory
|
|||
$possibleInstances['0'] = _('No Show');
|
||||
|
||||
$instance = new Zend_Form_Element_Select('his_instance_select');
|
||||
//$instance->setLabel(_("Choose Show Instance"));
|
||||
// $instance->setLabel(_("Choose Show Instance"));
|
||||
$instance->setMultiOptions($possibleInstances);
|
||||
$instance->setValue($default);
|
||||
$instance->setDecorators(['ViewHelper']);
|
||||
|
|
|
@ -20,7 +20,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$defaultFadeIn = Application_Model_Preference::GetDefaultFadeIn();
|
||||
$defaultFadeOut = Application_Model_Preference::GetDefaultFadeOut();
|
||||
|
||||
//Station name
|
||||
// Station name
|
||||
$this->addElement('text', 'stationName', [
|
||||
'class' => 'input_text',
|
||||
'label' => _('Station Name'),
|
||||
|
@ -57,7 +57,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$stationLogoRemove->setAttrib('onclick', 'removeLogo();');
|
||||
$this->addElement($stationLogoRemove);
|
||||
|
||||
//Default station crossfade duration
|
||||
// Default station crossfade duration
|
||||
$this->addElement('text', 'stationDefaultCrossfadeDuration', [
|
||||
'class' => 'input_text',
|
||||
'label' => _('Default Crossfade Duration (s):'),
|
||||
|
@ -71,7 +71,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'value' => Application_Model_Preference::GetDefaultCrossfadeDuration(),
|
||||
]);
|
||||
|
||||
//Default station fade in
|
||||
// Default station fade in
|
||||
$this->addElement('text', 'stationDefaultFadeIn', [
|
||||
'class' => 'input_text',
|
||||
'label' => _('Default Fade In (s):'),
|
||||
|
@ -85,7 +85,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'value' => $defaultFadeIn,
|
||||
]);
|
||||
|
||||
//Default station fade out
|
||||
// Default station fade out
|
||||
$this->addElement('text', 'stationDefaultFadeOut', [
|
||||
'class' => 'input_text',
|
||||
'label' => _('Default Fade Out (s):'),
|
||||
|
@ -126,7 +126,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
]);
|
||||
$podcast_album_override->setValue(Application_Model_Preference::GetPodcastAlbumOverride());
|
||||
$podcast_album_override->setDescription(_('Enabling this feature will cause podcast episode tracks to have their Artist, Title, and Album metatags set from podcast feed values. Note that enabling this feature is recommended in order to ensure reliable scheduling of episodes via smartblocks.'));
|
||||
$podcast_album_override->setSeparator(' '); //No <br> between radio buttons
|
||||
$podcast_album_override->setSeparator(' '); // No <br> between radio buttons
|
||||
$podcast_album_override->addDecorator('HtmlTag', ['tag' => 'dd',
|
||||
'id' => 'podcastAlbumOverride-element',
|
||||
'class' => 'radio-inline-list',
|
||||
|
@ -141,14 +141,14 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
]);
|
||||
$podcast_auto_smartblock->setValue(Application_Model_Preference::GetPodcastAutoSmartblock());
|
||||
$podcast_auto_smartblock->setDescription(_('If this option is enabled, a new smartblock and playlist matching the newest track of a podcast will be generated immediately upon creation of a new podcast. Note that the "Overwrite Podcast Episode Metatags" feature must also be enabled in order for smartblocks to reliably find episodes.'));
|
||||
$podcast_auto_smartblock->setSeparator(' '); //No <br> between radio buttons
|
||||
$podcast_auto_smartblock->setSeparator(' '); // No <br> between radio buttons
|
||||
$podcast_auto_smartblock->addDecorator('HtmlTag', ['tag' => 'dd',
|
||||
'id' => 'podcastAutoSmartblock-element',
|
||||
'class' => 'radio-inline-list',
|
||||
]);
|
||||
$this->addElement($podcast_auto_smartblock);
|
||||
|
||||
//TODO add and insert Podcast Smartblock and Playlist autogenerate options
|
||||
// TODO add and insert Podcast Smartblock and Playlist autogenerate options
|
||||
|
||||
$third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
|
||||
$third_party_api->setLabel(_('Public LibreTime API'));
|
||||
|
@ -160,8 +160,8 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());
|
||||
$third_party_api->setDescription(_('Enabling this feature will allow LibreTime to provide schedule data
|
||||
to external widgets that can be embedded in your website.'));
|
||||
$third_party_api->setSeparator(' '); //No <br> between radio buttons
|
||||
//$third_party_api->addDecorator(new Zend_Form_Decorator_Label(array('tag' => 'dd', 'class' => 'radio-inline-list')));
|
||||
$third_party_api->setSeparator(' '); // No <br> between radio buttons
|
||||
// $third_party_api->addDecorator(new Zend_Form_Decorator_Label(array('tag' => 'dd', 'class' => 'radio-inline-list')));
|
||||
$third_party_api->addDecorator('HtmlTag', ['tag' => 'dd',
|
||||
'id' => 'thirdPartyApi-element',
|
||||
'class' => 'radio-inline-list',
|
||||
|
@ -218,7 +218,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
]);
|
||||
$feature_preview_mode->setValue(Application_Model_Preference::GetFeaturePreviewMode());
|
||||
$feature_preview_mode->setDescription(_('Enable this to opt-in to test new features.'));
|
||||
$feature_preview_mode->setSeparator(' '); //No <br> between radio buttons
|
||||
$feature_preview_mode->setSeparator(' '); // No <br> between radio buttons
|
||||
$feature_preview_mode->addDecorator('HtmlTag', ['tag' => 'dd',
|
||||
'id' => 'featurePreviewMode-element',
|
||||
'class' => 'radio-inline-list',
|
||||
|
|
|
@ -34,7 +34,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
->setValue($defaultFade);
|
||||
$this->addElement($transition_fade);
|
||||
|
||||
//Master username
|
||||
// Master username
|
||||
$master_username = new Zend_Form_Element_Text('master_username');
|
||||
$master_username->setAttrib('autocomplete', 'off')
|
||||
->setAllowEmpty(true)
|
||||
|
@ -43,7 +43,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
->setValue(Application_Model_Preference::GetLiveStreamMasterUsername());
|
||||
$this->addElement($master_username);
|
||||
|
||||
//Master password
|
||||
// Master password
|
||||
if ($isDemo) {
|
||||
$master_password = new Zend_Form_Element_Text('master_password');
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
->setValue(Application_Model_Preference::GetMasterDJSourceConnectionURL());
|
||||
$this->addElement($masterSourceHost);
|
||||
|
||||
//liquidsoap harbor.input port
|
||||
// liquidsoap harbor.input port
|
||||
$betweenValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(1024, 49151);
|
||||
|
||||
$m_port = Application_Model_StreamSetting::getMasterLiveStreamPort();
|
||||
|
@ -97,7 +97,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
->setValue(Application_Model_Preference::GetLiveDJSourceConnectionURL());
|
||||
$this->addElement($showSourceHost);
|
||||
|
||||
//liquidsoap harbor.input port
|
||||
// liquidsoap harbor.input port
|
||||
$l_port = Application_Model_StreamSetting::getDjLiveStreamPort();
|
||||
|
||||
$showSourcePort = new Zend_Form_Element_Text('show_source_port');
|
||||
|
|
|
@ -9,8 +9,8 @@ class Application_Form_Login extends Zend_Form
|
|||
// Set the method for the display form to POST
|
||||
$this->setMethod('post');
|
||||
|
||||
//If the request comes from an origin we consider safe, we disable the CSRF
|
||||
//token checking ONLY for the login page.
|
||||
// If the request comes from an origin we consider safe, we disable the CSRF
|
||||
// token checking ONLY for the login page.
|
||||
$request = Zend_Controller_Front::getInstance()->getRequest();
|
||||
if ($request) {
|
||||
$refererUrl = $request->getHeader('referer');
|
||||
|
|
|
@ -26,7 +26,7 @@ class Application_Form_Preferences extends Zend_Form
|
|||
|
||||
$this->addSubForm($general_pref, 'preferences_general');
|
||||
|
||||
//tunein form
|
||||
// tunein form
|
||||
$tuneinPreferences = new Application_Form_TuneInPreferences();
|
||||
$this->addSubForm($tuneinPreferences, 'preferences_tunein');
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Application_Form_Preferences extends Zend_Form
|
|||
|
||||
$submit = new Zend_Form_Element_Submit('submit');
|
||||
$submit->setLabel(_('Save'));
|
||||
//$submit->removeDecorator('Label');
|
||||
// $submit->removeDecorator('Label');
|
||||
$submit->setAttribs(['class' => 'btn right-floated']);
|
||||
$submit->removeDecorator('DtDdWrapper');
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$storedCrit = $bl->getCriteriaGrouped();
|
||||
Logging::info($storedCrit);
|
||||
|
||||
//need to convert criteria to be displayed in the user's timezone if there's some timestamp type.
|
||||
// need to convert criteria to be displayed in the user's timezone if there's some timestamp type.
|
||||
self::convertTimestamps($storedCrit['crit']);
|
||||
|
||||
/* $modRoadMap stores the number of same criteria
|
||||
|
@ -297,8 +297,8 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
if (isset($storedCrit['crit'])) {
|
||||
$criteriaKeys = array_keys($storedCrit['crit']);
|
||||
}
|
||||
//the way the everything is currently built it setups 25 smartblock criteria forms and then disables them
|
||||
//but this creates 29 elements
|
||||
// the way the everything is currently built it setups 25 smartblock criteria forms and then disables them
|
||||
// but this creates 29 elements
|
||||
$numElements = count($this->getCriteriaOptions());
|
||||
// loop through once for each potential criteria option ie album, composer, track
|
||||
// criteria from different groups are separated already by the getCriteriaGrouped call
|
||||
|
@ -309,7 +309,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
// if there is a criteria found then count the number of rows for this specific criteria ie > 1 track title
|
||||
// need to refactor this to maintain separation based upon criteria grouping
|
||||
if (isset($criteriaKeys[$i])) {
|
||||
//Logging::info($criteriaKeys[$i]);
|
||||
// Logging::info($criteriaKeys[$i]);
|
||||
Logging::info($storedCrit['crit'][$criteriaKeys[$i]]);
|
||||
$critCount = count($storedCrit['crit'][$criteriaKeys[$i]]);
|
||||
} else {
|
||||
|
@ -387,7 +387,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$criteriaValue = new Zend_Form_Element_Select('sp_criteria_value_' . $i . '_' . $j);
|
||||
$criteriaValue->setAttrib('class', 'input_select sp_input_select')->setDecorators(['viewHelper']);
|
||||
|
||||
if (isset($criteriaKeys[$i])) { //do if $relativeTT above
|
||||
if (isset($criteriaKeys[$i])) { // do if $relativeTT above
|
||||
$criteriaValue->setAttrib('enabled', 'enabled');
|
||||
} else {
|
||||
$criteriaValue->setAttrib('disabled', 'disabled');
|
||||
|
@ -505,8 +505,8 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$criteriaExtraDatetimeSelect->setAttrib('disabled', 'disabled');
|
||||
}
|
||||
$this->addElement($criteriaExtraDatetimeSelect);
|
||||
}//for
|
||||
}//for
|
||||
}// for
|
||||
}// for
|
||||
|
||||
$repeatTracks = new Zend_Form_Element_Checkbox('sp_repeat_tracks');
|
||||
$repeatTracks->setDecorators(['viewHelper'])
|
||||
|
@ -845,7 +845,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$element->addError(_('Only non-negative integer numbers are allowed (e.g 1 or 5) for the text value'));
|
||||
$isValid = false;
|
||||
// TODO validate this on numeric input with whatever parsing also do for extra
|
||||
//if the modifier is before ago or between we skip validation until we confirm format
|
||||
// if the modifier is before ago or between we skip validation until we confirm format
|
||||
} elseif (isset($d['sp_criteria_datetime_select']) && $d['sp_criteria_datetime_select'] == '0') {
|
||||
$element->addError(_('You must select a time unit for a relative datetime.'));
|
||||
$isValid = false;
|
||||
|
@ -912,9 +912,9 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$element->addError(_('Value cannot be empty'));
|
||||
$isValid = false;
|
||||
}
|
||||
}//end foreach
|
||||
}//for loop
|
||||
}//if
|
||||
}// end foreach
|
||||
}// for loop
|
||||
}// if
|
||||
|
||||
return $isValid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue