This repository has been archived by the owner on Sep 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Now we can edit a folder: bug: 9583
- Loading branch information
Charles Marion
committed
May 4, 2011
1 parent
a653908
commit 22c7e15
Showing
12 changed files
with
197 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
class FolderForm extends AppForm | ||
{ | ||
/** create edit folder form */ | ||
public function createEditForm() | ||
{ | ||
$form = new Zend_Form; | ||
|
||
$form->setAction($this->webroot.'/folder/edit') | ||
->setMethod('post'); | ||
|
||
$name = new Zend_Form_Element_Text('name'); | ||
$name ->setRequired(true) | ||
->addValidator('NotEmpty', true); | ||
|
||
$description = new Zend_Form_Element_Textarea('description'); | ||
$teaser = new Zend_Form_Element_Text('teaser'); | ||
$teaser->setAttrib('MAXLENGTH', '250'); | ||
$submit = new Zend_Form_Element_Submit('submit'); | ||
$submit ->setLabel($this->t("Save")); | ||
|
||
$form->addElements(array($name,$description,$submit,$teaser)); | ||
return $form; | ||
} | ||
|
||
} // end class | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
class Upgrade_3_0_4 extends MIDASUpgrade | ||
{ | ||
public function preUpgrade() | ||
{ | ||
|
||
} | ||
|
||
public function mysql() | ||
{ | ||
$sql = "ALTER TABLE folder ADD COLUMN teaser varchar(250) DEFAULT ''; "; | ||
$this->db->query($sql); | ||
} | ||
|
||
public function pgsql() | ||
{ | ||
$sql = "ALTER TABLE folder ADD COLUMN teaser varying(250) DEFAULT '', ; "; | ||
$this->db->query($sql); | ||
} | ||
|
||
public function postUpgrade() | ||
{ | ||
|
||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
form#editFolderForm input[type="text"], form#editFolderForm input[type="password"] ,form#editFolderForm textarea | ||
{ | ||
width: 350px!important; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
div.defaultSideTrigger{ | ||
display:none; | ||
} | ||
|
||
div.viewAction{ | ||
display:inherit!important; | ||
} | ||
|
||
div.viewInfo{ | ||
display:inherit!important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** AJAX Action !!!! */ | ||
echo '<script type="text/javascript" src="' . $this->coreWebroot . '/public/js/folder/folder.edit.js?'.time().'"></script>'; | ||
?> | ||
|
||
<link type="text/css" rel="stylesheet" href="<?php echo $this->coreWebroot?>/public/css/folder/folder.edit.css" /> | ||
|
||
<form id="editFolderForm" class="genericForm" method="<?php echo $this->form['method']?>" action="<?php echo $this->form['action']?>"> | ||
<input type="hidden" name="folderId" value="<?php echo $this->folderDao->getKey()?>"/> | ||
<div > | ||
<label for="name"><?php echo $this->t("Name")?></label> | ||
<?php echo $this->form['name']?> | ||
</div> | ||
<div > | ||
<label for="description"><?php echo $this->t("Description")?></label> | ||
<?php echo $this->form['description']?> | ||
</div> | ||
<div > | ||
<label for="teaser"><?php echo $this->t("Teaser")?></label> | ||
<?php echo $this->form['teaser']?> | ||
</div> | ||
<div> | ||
<?php echo $this->form['submit']?> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters