This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1772ba5
commit c481cca
Showing
14 changed files
with
73 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?php | ||
/** | ||
* | ||
*/ | ||
|
||
class sfValidatorHourCustom extends sfValidatorTime | ||
{ | ||
protected function doClean($value) { | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
class sfWidgetFormInputDoctrineAutocomplete extends sfWidgetFormInputAutocomplete | ||
{ | ||
/** | ||
|
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,51 @@ | ||
<?php | ||
|
||
class sfWidgetFormInputFilemanager extends sfWidgetFormInputText | ||
{ | ||
protected function configure($options = array(), $attributes = array()) | ||
{ | ||
parent::configure($options, $attributes); | ||
$this->addOption('path', '/uploads'); | ||
$this->addOption('button_label', 'Parcourir'); | ||
$this->addOption('is_image', false); | ||
$this->addOption('width', 900); | ||
$this->addOption('height', 500); | ||
$this->addOption('returnFunction'); | ||
} | ||
|
||
/** | ||
* Renders the widget. | ||
* | ||
* @param string $name The element name | ||
* @param string $value The value displayed in this widget | ||
* @param array $attributes An array of HTML attributes to be merged with the default HTML attributes | ||
* @param array $errors An array of errors for the field | ||
* | ||
* @return string An HTML tag string | ||
* | ||
* @see sfWidgetForm | ||
*/ | ||
public function render($name, $value = null, $attributes = array(), $errors = array()) | ||
{ | ||
return parent::render($name, $value, $attributes, $errors).sprintf(<<<EOF | ||
%s | ||
%s | ||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
$('#%s_filemanager').click(function(){ | ||
window.open("/sfEPFactoryFormPlugin/ckeditor/filemanager/index.html?path=%s&returnId=%s%s", "Gestionnaire de fichiers", "width=%s,height=%s"); | ||
}); | ||
}); | ||
</script> | ||
EOF | ||
, $this->getOption('is_image') ? image_tag($value)."<br />" : null | ||
, $this->renderTag("input", array('type' => 'button', 'value' => $this->getOption('button_label'), 'id' => $this->generateId($name, $value).'_filemanager')) | ||
, $this->generateId($name, $value) | ||
, $this->getOption('path') | ||
, $this->generateId($name, $value) | ||
, $this->getOption('returnFunction') ? "&returnFunction=".$this->getOption('returnFunction') : null | ||
, $this->getOption('width') | ||
, $this->getOption('height') | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* sfWidgetFormInputStarEvaluation represents an evaluation with stars | ||
* | ||
|
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