Added instance description field

This commit is contained in:
Duncan Sommerville 2014-09-19 12:55:02 -04:00
parent 26d875ed66
commit 3a1efa39eb
2 changed files with 46 additions and 4 deletions

View File

@ -27,7 +27,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => _('Untitled Show'), 'value' => _('Untitled Show'),
'validators' => array($notEmptyValidator, array('StringLength', false, array(0, $maxLens['name']))) 'validators' => array($notEmptyValidator, array('StringLength', false, array(0, $maxLens['name'])))
)); ));
@ -63,7 +63,33 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'viewScript' => 'form/add-show-block.phtml', 'viewScript' => 'form/add-show-block.phtml',
'class' => 'block-display' 'class' => 'block-display'
)))); ))));
// Add the instance description
$this->addElement('textarea', 'add_show_instance_description', array(
'label' => _('Instance Description:'),
'required' => false,
'class' => 'input_text_area',
'validators' => array(array('StringLength', false, array(0, $maxLens['description'])))
));
$instanceDesc = $this->getElement('add_show_instance_description');
$instanceDesc->setDecorators(array(array('ViewScript', array(
'viewScript' => 'form/add-show-block.phtml',
'class' => 'block-display'
))));
$instanceDesc->setAttrib('disabled','disabled');
}
/**
* Enable the instance description when editing a show instance
*/
public function enableInstanceDesc()
{
$el = $this->getElement('add_show_instance_description');
Logging::info($el);
$el->setAttrib('disabled', null);
$el->setAttrib('readonly', null);
} }
public function disable() public function disable()

View File

@ -21,6 +21,7 @@
#schedule-add-show .ui-tabs-panel { #schedule-add-show .ui-tabs-panel {
padding-top: 8px; padding-top: 8px;
} }
#schedule-add-show fieldset { #schedule-add-show fieldset {
padding:8px; padding:8px;
margin-bottom:8px; margin-bottom:8px;
@ -33,6 +34,7 @@
padding:0; padding:0;
width:100%; width:100%;
} }
#schedule-add-show dd { #schedule-add-show dd {
padding: 4px 0; padding: 4px 0;
float: left; float: left;
@ -40,6 +42,7 @@
margin: 0; margin: 0;
padding: 4px 0 4px 15px; padding: 4px 0 4px 15px;
} }
#schedule-add-show dt, #schedule-add-show dt.big { #schedule-add-show dt, #schedule-add-show dt.big {
clear: left; clear: left;
color: #666666; color: #666666;
@ -52,9 +55,11 @@
min-width:103px; min-width:103px;
clear:left; clear:left;
} }
#schedule-add-show dt.big { #schedule-add-show dt.big {
min-width:130px; min-width:130px;
} }
#schedule-add-show dt.block-display, #schedule-add-show dd.block-display { #schedule-add-show dt.block-display, #schedule-add-show dd.block-display {
display:block; display:block;
float:none; float:none;
@ -65,12 +70,14 @@
#schedule-add-show dt label { #schedule-add-show dt label {
padding-right:0; padding-right:0;
} }
.wrapp-label { .wrapp-label {
padding:0; padding:0;
height:16px; height:16px;
display:block; display:block;
line-height:18px; line-height:18px;
} }
label.wrapp-label input[type="checkbox"] { label.wrapp-label input[type="checkbox"] {
float:left; float:left;
margin:-1px 2px 0 0; margin:-1px 2px 0 0;
@ -79,18 +86,22 @@ label.wrapp-label input[type="checkbox"] {
#schedule-add-show fieldset:last-child { #schedule-add-show fieldset:last-child {
margin-bottom:0; margin-bottom:0;
} }
#schedule-add-show fieldset dd input[type="checkbox"] { #schedule-add-show fieldset dd input[type="checkbox"] {
margin-top:2px; margin-top:2px;
} }
#add_show_day_check-element.block-display { #add_show_day_check-element.block-display {
margin-bottom:15px; margin-bottom:15px;
margin-top:7px; margin-top:7px;
} }
#add_show_day_check-element.block-display label.wrapp-label { #add_show_day_check-element.block-display label.wrapp-label {
font-size:12px; font-size:12px;
float:left; float:left;
margin-right:10px; margin-right:10px;
} }
#add_show_name-element .input_text { #add_show_name-element .input_text {
/*width:99%;*/ /*width:99%;*/
} }
@ -125,7 +136,12 @@ label.wrapp-label input[type="checkbox"] {
width: 65px; width: 65px;
} }
#show_logo_current, #show_logo_preview { [id^=add_show_instance_description] {
display: none;
}
#add_show_logo_current,
#add_show_logo_preview {
border: 1px solid #5b5b5b; border: 1px solid #5b5b5b;
-webkit-box-shadow: 0px 0px 2px 1px rgba(48,48,48,1); -webkit-box-shadow: 0px 0px 2px 1px rgba(48,48,48,1);
-moz-box-shadow: 0px 0px 2px 1px rgba(48,48,48,1); -moz-box-shadow: 0px 0px 2px 1px rgba(48,48,48,1);
@ -136,7 +152,7 @@ label.wrapp-label input[type="checkbox"] {
cursor: default; cursor: default;
} }
#show_remove_logo { #add_show_logo_current_remove {
display: none; display: none;
height: 28px; height: 28px;
} }