SAAS-238: Password reset: hide these options in the preferences, allow them to be set using airtime-system command

-these options are hidden is instance is saas
This commit is contained in:
denise 2012-05-18 12:58:09 -04:00
parent 766f897dfe
commit 8710c00970
2 changed files with 40 additions and 33 deletions

View File

@ -2,11 +2,16 @@
class Application_Form_GeneralPreferences extends Zend_Form_SubForm class Application_Form_GeneralPreferences extends Zend_Form_SubForm
{ {
private $isSaas;
public function init() public function init()
{ {
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
$this->isSaas = $isSaas;
Logging::log($this->isSaas==true?"true":"false");
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml')) array('ViewScript', array('viewScript' => 'form/preferences_general.phtml', "isSaas" => $isSaas))
)); ));
$defaultFade = Application_Model_Preference::GetDefaultFade(); $defaultFade = Application_Model_Preference::GetDefaultFade();

View File

@ -72,7 +72,7 @@
</label> </label>
</dt> </dt>
<dd id="weekStartDay-element" class="block-display"> <dd id="weekStartDay-element" class="block-display">
<?php $i=0; <?php $i=0;
$value = $this->element->getElement('weekStartDay')->getValue(); $value = $this->element->getElement('weekStartDay')->getValue();
?> ?>
<select id="weekStartDay" name="weekStartDay"> <select id="weekStartDay" name="weekStartDay">
@ -94,35 +94,37 @@
</dd> </dd>
<!-- Enable System Email option --> <!-- Enable System Email option -->
<dt id="enableSystemEmail-label" class="block-display"> <?php if( !$this->isSaas ){?>
<label class="required" for="timezone"><?php echo $this->element->getElement('enableSystemEmail')->getLabel() ?>: <dt id="enableSystemEmail-label" class="block-display">
</label> <label class="required" for="timezone"><?php echo $this->element->getElement('enableSystemEmail')->getLabel() ?>:
</dt> </label>
<dd id="enableSystemEmail-element" class="block-display"> </dt>
<?php echo $this->element->getElement('enableSystemEmail') ?> <dd id="enableSystemEmail-element" class="block-display">
<?php if($this->element->getElement('enableSystemEmail')->hasErrors()) : ?> <?php echo $this->element->getElement('enableSystemEmail') ?>
<ul class='errors'> <?php if($this->element->getElement('enableSystemEmail')->hasErrors()) : ?>
<?php foreach($this->element->getElement('enableSystemEmail')->getMessages() as $error): ?> <ul class='errors'>
<li><?php echo $error; ?></li> <?php foreach($this->element->getElement('enableSystemEmail')->getMessages() as $error): ?>
<?php endforeach; ?> <li><?php echo $error; ?></li>
</ul> <?php endforeach; ?>
<?php endif; ?> </ul>
</dd> <?php endif; ?>
</dd>
<!-- System Email option -->
<dt id="systemEmail-label" class="block-display"> <!-- System Email option -->
<label class="required" for="timezone"><?php echo $this->element->getElement('systemEmail')->getLabel() ?>: <dt id="systemEmail-label" class="block-display">
</label> <label class="required" for="timezone"><?php echo $this->element->getElement('systemEmail')->getLabel() ?>:
</dt> </label>
<dd id="systemEmail-element" class="block-display"> </dt>
<?php echo $this->element->getElement('systemEmail') ?> <dd id="systemEmail-element" class="block-display">
<?php if($this->element->getElement('systemEmail')->hasErrors()) : ?> <?php echo $this->element->getElement('systemEmail') ?>
<ul class='errors'> <?php if($this->element->getElement('systemEmail')->hasErrors()) : ?>
<?php foreach($this->element->getElement('systemEmail')->getMessages() as $error): ?> <ul class='errors'>
<li><?php echo $error; ?></li> <?php foreach($this->element->getElement('systemEmail')->getMessages() as $error): ?>
<?php endforeach; ?> <li><?php echo $error; ?></li>
</ul> <?php endforeach; ?>
<?php endif; ?> </ul>
</dd> <?php endif; ?>
</dd>
<?php } ?>
</dl> </dl>
</fieldset> </fieldset>