Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
d942e476c6
|
@ -93,6 +93,8 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
|
||||||
$port = new Zend_Form_Element_Text('port');
|
$port = new Zend_Form_Element_Text('port');
|
||||||
$port->setLabel("Port")
|
$port->setLabel("Port")
|
||||||
->setValue(isset($setting[$prefix.'_port'])?$setting[$prefix.'_port']:"")
|
->setValue(isset($setting[$prefix.'_port'])?$setting[$prefix.'_port']:"")
|
||||||
|
->setValidators(array(new Zend_Validate_Between(array('min'=>0, 'max'=>99999))))
|
||||||
|
->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>'Only numbers are allowed.')))
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
if($disable_all){
|
if($disable_all){
|
||||||
$port->setAttrib("disabled", "disabled");
|
$port->setAttrib("disabled", "disabled");
|
||||||
|
|
|
@ -2,8 +2,8 @@ function showErrorSections() {
|
||||||
|
|
||||||
$(".errors").each(function(i){
|
$(".errors").each(function(i){
|
||||||
if($(this).length > 0){
|
if($(this).length > 0){
|
||||||
$(this).closest("div").show();
|
// -250 is due to static panel on the top
|
||||||
$(window).scrollTop($(this).position().top);
|
$(window).scrollTop($(this).closest("div").position().top-250);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue