Commit fda23062 authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

added mode

parent 3238b219
...@@ -743,13 +743,19 @@ class Form { ...@@ -743,13 +743,19 @@ class Form {
// ======= // =======
$params=self::getFormData($params); $params=self::getFormData($params);
} else { } else {
//>>>>>>> qa //>>>>>>> qa
if(isset($_GET["form"])) if(isset($_GET["form"]))
$params["formId"] = $_GET["form"]; $params["formId"] = $_GET["form"];
else else
$params["formId"] = (isset(Yii::app()->session["costum"]["form"]["id"])) ? Yii::app()->session["costum"]["form"]["id"] : Form::generateOpenForm( $el["slug"] ); $params["formId"] = (isset(Yii::app()->session["costum"]["form"]["id"])) ? Yii::app()->session["costum"]["form"]["id"] : Form::generateOpenForm( $el["slug"] );
} }
$params["mode"] = "w";
if(isset($_GET["mode"]))
$params["mode"] = $_GET["mode"];
// else {
// if(isset($_GET["answer"]))
// }
//Rest::json($params);exit; //Rest::json($params);exit;
// $answer = ( isset(Yii::app()->session["costum"]["form"]["canModifyAnswer"]) && isset($_GET['answer'])) ? PHDB::findOne( Form::ANSWER_COLLECTION,[ "_id" => new MongoId($_GET['answer']) ] ) : null; // $answer = ( isset(Yii::app()->session["costum"]["form"]["canModifyAnswer"]) && isset($_GET['answer'])) ? PHDB::findOne( Form::ANSWER_COLLECTION,[ "_id" => new MongoId($_GET['answer']) ] ) : null;
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
<a href="javascript:;" id="globalCommunityBtn" class=' btn btn-default'><i class="fa fa-group"></i> Communauté</a> <a href="javascript:;" id="globalCommunityBtn" class=' btn btn-default'><i class="fa fa-group"></i> Communauté</a>
<a href="<?php echo Yii::app()->createUrl("/costum")?>/co/index/slug/<?php echo $el["slug"] ?>/answer/new" class='btn btn-primary' id="showAnswerBtn"><i class="fa fa-plus"></i> Ajouter <?php echo $what ?></a> <a href="<?php echo Yii::app()->createUrl("/costum")?>/co/index/slug/<?php echo $el["slug"] ?>/answer/new" class='btn btn-primary' id="showAnswerBtn"><i class="fa fa-plus"></i> Ajouter <?php echo $what ?></a>
</div> </div>
<div class="col-xs-12 text-center">
mode <?php echo $mode ?>
</div>
<div id="allAnswersContainer" class="hide col-xs-12 col-lg-offset-2 col-lg-8 margin-top-20"> <div id="allAnswersContainer" class="hide col-xs-12 col-lg-offset-2 col-lg-8 margin-top-20">
<ul id="allAnswersList"> <ul id="allAnswersList">
<?php <?php
......
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