Commit a932b070 authored by Clément Damiens's avatar Clément Damiens
Browse files

up uploader read and list docs & config openform

parent d1c0e3fb
......@@ -23,18 +23,23 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
}
</style>
<div class="uploader_container col-xs-12 no-padding margin-bottom-20">
<br/><h4><?php echo @$inputsObj["label"] ?></h4>
<?php if(isset($inputsObj["info"])){ ?>
<br/>
<label for="<?php echo $kunik ?>">
<h4 style="color:<?php echo ($titleColor) ? $titleColor : "black"; ?>"><?php echo $label.$editQuestionBtn ?>
</h4>
</label><!--<h4><?php echo @$inputsObj["label"] ?></h4>-->
<?php if(isset($inputsObj["info"])){ ?>
<span class="italic">
<?php echo $inputsObj["info"] ?>
</span>
<?php } ?>
<?php if(!isset($uploaderObj["paste"]) || $uploaderObj["paste"]){ ?>
<input type="text" name="upload" id="<?php echo $domUploader ?>_paste" placeholder="coller une image de votre navigateur ici" class="form-control text-center qq-paste-input"/>
<?php } ?>
<div class="col-xs-12 fine-uploader-manual-trigger no-padding" id="<?php echo $domUploader; ?>" data-type="" data-id=""></div>
<?php }
if($mode=="r"){
echo $this->renderPartial("co2.views.pod.docsList",array("edit"=>false, "documents"=>$initAnswerFiles,"docType"=>@$uploaderObj["docType"]) );
} else{
if(!isset($uploaderObj["paste"]) || $uploaderObj["paste"]){ ?>
<input type="text" name="upload" id="<?php echo $domUploader ?>_paste" placeholder="coller une image de votre navigateur ici" class="form-control text-center qq-paste-input"/>
<?php } ?>
<div class="col-xs-12 fine-uploader-manual-trigger no-padding" id="<?php echo $domUploader; ?>" data-type="" data-id=""></div>
<?php if(isset($uploaderObj["docType"]) && $uploaderObj["docType"]=="image"){ ?>
<script type="text/template" id="qq-template-gallery">
<?php }else{ ?>
......@@ -53,7 +58,6 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
<div class="qq-upload-button-selector btn btn-primary">
<div>Selectionner un document</div>
</div>
</div>
<button type="button" id="trigger-upload" class="btn btn-danger hide">
<i class="icon-upload icon-white"></i> <?php echo Yii::t("common", "Save") ?>
......@@ -85,7 +89,7 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
<input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
<span class="qq-upload-size-selector qq-upload-size"></span>
<button type="button" class="qq-btn qq-upload-delete-selector qq-upload-delete">
<span class="qq-btn qq-delete-icon" aria-label="Delete"></span>
<?php echo Yii::t("common", "Delete") ?>
</button>
<button type="button" class="qq-btn qq-upload-pause-selector qq-upload-pause">
<span class="qq-btn qq-pause-icon" aria-label="Pause"></span>
......@@ -106,16 +110,13 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
<span class="qq-upload-spinner-selector qq-upload-spinner"></span>
<img class="qq-thumbnail-selector" qq-max-size="100" qq-server-scale>
<a href="" target="_blank" class="qq-upload-link">
<span class="qq-upload-file-selector qq-upload-file"></span>
<input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
<span class="qq-upload-size-selector qq-upload-size"></span>
</a>
<button type="button" class="qq-btn qq-upload-cancel-selector qq-upload-cancel"><?php echo Yii::t("common", "Cancel") ?></button>
<button type="button" class="qq-btn qq-upload-retry-selector qq-upload-retry"><?php echo Yii::t("common", "Retry") ?></button>
<button type="button" class="qq-btn qq-upload-delete-selector qq-upload-delete"><?php echo Yii::t("common", "Delete") ?></button>
<button type="button" class="view-btn hide btn">View</button>
<span role="status" class="qq-upload-status-text-selector qq-upload-status-text"></span>
</li>
......@@ -143,12 +144,13 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
</div>
</dialog>
<div class="col-xs-12 text-center" style="display: none;">
<a href="javascript:;" class="btn btn-success margin-top-10 col-sm-6 col-sm-offset-3" id="<?php echo $domUploader ?>_submit">Enregistrer</a>
<a href="javascript:;" class="btn btn-success margin-top-10 col-sm-6 col-sm-offset-3" id="<?php echo $domUploader ?>_submit"><?php echo Yii::t("common","Save") ?></a>
</div>
</div>
</script>
<!---->
</div>
</div>
<?php } ?>
<script type="text/javascript">
//var domUploader="<?php echo $domUploader ?>";
var uploadAnswerObj=<?php echo json_encode($uploaderObj); ?>;
......
......@@ -123,7 +123,7 @@ function showStepForm(id){
echo htmlentities($this->costum["cms"][$form["id"]."desc"]);
else
echo "<span style='color:#aaa'>* section description</span>";
if($canEditForm)
if(@$canEditForm)
echo "<a class='btn btn-xs btn-danger editBtn' href='javascript:;' data-key='".@$form["id"]."desc' data-type='textarea' data-markdown='1' data-path='costum.cms.".@$form["id"]."desc' data-label='Expliquez les objectifs de cette étape ? '> <i class='fa fa-pencil'></i></a>";
echo "</div>";
......@@ -137,7 +137,7 @@ function showStepForm(id){
"mode" => @$mode,
"showForm" => $showForm,
"canEdit" => $canEdit,
"canEditForm" => $canEditForm,
"canEditForm" => @$canEditForm,
"el" => $el ] ,true );
echo "</div>";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment