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,69 +23,73 @@ $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"])){ ?>
<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(isset($uploaderObj["docType"]) && $uploaderObj["docType"]=="image"){ ?>
<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 }
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{ ?>
<script type="text/template" id="qq-template-manual-trigger">
<?php } ?>
<div class="qq-uploader-selector qq-uploader qq-upload-drop-area-active<?php if(isset($fieldObj["docType"]) && $fieldObj["docType"]=="image"){ echo " qq-gallery"; } ?>" qq-drop-area-text="drop files" style="<?php if(!isset($uploaderObj["paste"]) || $uploaderObj["paste"]){ ?>border-radius:0px 0px 10px 10px;<?php } ?>">
<div class="qq-total-progress-bar-container-selector qq-total-progress-bar-container">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-total-progress-bar-selector qq-progress-bar qq-total-progress-bar"></div>
</div>
<!--<div class="qq-paste-element-triger"><input type="text" value="" placeholder="paste a link"/></div>qq-hide-dropzone-->
<div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
<span class="qq-upload-drop-area-text-selector"></span>
</div>
<div class="col-xs-12 margin-bottom-10 text-center">
<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") ?>
</button>
<span class="qq-drop-processing-selector qq-drop-processing">
<span>En cours de progression...</span>
<span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
</span>
<?php if(isset($uploaderObj["docType"]) && $uploaderObj["docType"]=="image"){ ?>
<ul class="qq-upload-list-selector qq-upload-list" role="region" aria-live="polite" aria-relevant="additions removals">
<li>
<span role="status" class="qq-upload-status-text-selector qq-upload-status-text"></span>
<div class="qq-progress-bar-container-selector qq-progress-bar-container">
<div class="qq-total-progress-bar-container-selector qq-total-progress-bar-container">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-total-progress-bar-selector qq-progress-bar qq-total-progress-bar"></div>
</div>
<!--<div class="qq-paste-element-triger"><input type="text" value="" placeholder="paste a link"/></div>qq-hide-dropzone-->
<div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
<span class="qq-upload-drop-area-text-selector"></span>
</div>
<div class="col-xs-12 margin-bottom-10 text-center">
<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") ?>
</button>
<span class="qq-drop-processing-selector qq-drop-processing">
<span>En cours de progression...</span>
<span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
</span>
<?php if(isset($uploaderObj["docType"]) && $uploaderObj["docType"]=="image"){ ?>
<ul class="qq-upload-list-selector qq-upload-list" role="region" aria-live="polite" aria-relevant="additions removals">
<li>
<span role="status" class="qq-upload-status-text-selector qq-upload-status-text"></span>
<div class="qq-progress-bar-container-selector qq-progress-bar-container">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-progress-bar-selector qq-progress-bar"></div>
</div>
<span class="qq-upload-spinner-selector qq-upload-spinner"></span>
<div class="qq-thumbnail-wrapper">
</div>
<span class="qq-upload-spinner-selector qq-upload-spinner"></span>
<div class="qq-thumbnail-wrapper">
<img class="qq-thumbnail-selector" qq-max-size="120" qq-server-scale>
</div>
<button type="button" class="qq-upload-cancel-selector qq-upload-cancel">X</button>
<button type="button" class="qq-upload-retry-selector qq-upload-retry">
</div>
<button type="button" class="qq-upload-cancel-selector qq-upload-cancel">X</button>
<button type="button" class="qq-upload-retry-selector qq-upload-retry">
<span class="qq-btn qq-retry-icon" aria-label="Retry"></span>
Retry
</button>
<div class="qq-file-info">
</button>
<div class="qq-file-info">
<div class="qq-file-name">
<span class="qq-upload-file-selector qq-upload-file"></span>
</div>
<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>
......@@ -93,62 +97,60 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
<button type="button" class="qq-btn qq-upload-continue-selector qq-upload-continue">
<span class="qq-btn qq-continue-icon" aria-label="Continue"></span>
</button>
</div>
<button type="button" class="view-btn hide btn">View</button>
</li>
</ul>
<?php }else{ ?>
<ul class="qq-upload-list-selector qq-upload-list" aria-live="polite" aria-relevant="additions removals">
<li>
<div class="qq-progress-bar-container-selector">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-progress-bar-selector qq-progress-bar"></div>
</div>
<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>
</ul>
<?php } ?>
<dialog class="qq-alert-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">Close</button>
</div>
</dialog>
<dialog class="qq-confirm-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">No</button>
<button type="button" class="qq-ok-button-selector">Yes</button>
</div>
</dialog>
<dialog class="qq-prompt-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<input type="text">
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">Cancel</button>
<button type="button" class="qq-ok-button-selector">Ok</button>
</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>
</div>
</div>
</script>
<button type="button" class="view-btn hide btn">View</button>
</li>
</ul>
<?php }else{ ?>
<ul class="qq-upload-list-selector qq-upload-list" aria-live="polite" aria-relevant="additions removals">
<li>
<div class="qq-progress-bar-container-selector">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-progress-bar-selector qq-progress-bar"></div>
</div>
<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>
</ul>
<?php } ?>
<dialog class="qq-alert-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">Close</button>
</div>
</dialog>
<dialog class="qq-confirm-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">No</button>
<button type="button" class="qq-ok-button-selector">Yes</button>
</div>
</dialog>
<dialog class="qq-prompt-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<input type="text">
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">Cancel</button>
<button type="button" class="qq-ok-button-selector">Ok</button>
</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"><?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