$editsurvey .= "<div class='header ui-widget-header'>" . $clang->gT("Edit survey text elements") . "</div>\n";
 $editsurvey .= "<form id='addnewsurvey' class='form30' name='addnewsurvey' action='{$scriptname}' method='post'>\n" . '<div id="tabs">';
 $i = 0;
 foreach ($grplangs as $grouplang) {
     // this one is created to get the right default texts fo each language
     $bplang = new limesurvey_lang($grouplang);
     $esquery = "SELECT * FROM " . db_table_name("surveys_languagesettings") . " WHERE surveyls_survey_id={$surveyid} and surveyls_language='{$grouplang}'";
     $esresult = db_execute_assoc($esquery);
     //Checked
     $esrow = $esresult->FetchRow();
     $tab_title[$i] = getLanguageNameFromCode($esrow['surveyls_language'], false);
     if ($esrow['surveyls_language'] == GetBaseLanguageFromSurveyID($surveyid)) {
         $tab_title[$i] .= '(' . $clang->gT("Base language") . ')';
     }
     $esrow = array_map('htmlspecialchars', $esrow);
     $tab_content[$i] = "<ul>\n" . "<li><label for=''>" . $clang->gT("Survey title") . ":</label>\n" . "<input type='text' size='80' name='short_title_" . $esrow['surveyls_language'] . "' value=\"{$esrow['surveyls_title']}\" /></li>\n" . "<li><label for=''>" . $clang->gT("Description:") . "</label>\n" . "<textarea cols='80' rows='15' name='description_" . $esrow['surveyls_language'] . "'>{$esrow['surveyls_description']}</textarea>\n" . getEditor("survey-desc", "description_" . $esrow['surveyls_language'], "[" . $clang->gT("Description:", "js") . "](" . $esrow['surveyls_language'] . ")", $surveyid, '', '', $action) . "</li>\n" . "<li><label for=''>" . $clang->gT("Welcome message:") . "</label>\n" . "<textarea cols='80' rows='15' name='welcome_" . $esrow['surveyls_language'] . "'>{$esrow['surveyls_welcometext']}</textarea>\n" . getEditor("survey-welc", "welcome_" . $esrow['surveyls_language'], "[" . $clang->gT("Welcome:", "js") . "](" . $esrow['surveyls_language'] . ")", $surveyid, '', '', $action) . "</li>\n" . "<li><label for=''>" . $clang->gT("End message:") . "</label>\n" . "<textarea cols='80' rows='15' name='endtext_" . $esrow['surveyls_language'] . "'>{$esrow['surveyls_endtext']}</textarea>\n" . getEditor("survey-endtext", "endtext_" . $esrow['surveyls_language'], "[" . $clang->gT("End message:", "js") . "](" . $esrow['surveyls_language'] . ")", $surveyid, '', '', $action) . "</li>\n" . "<li><label for=''>" . $clang->gT("End URL:") . "</label>\n" . "<input type='text' size='80' name='url_" . $esrow['surveyls_language'] . "' value=\"{$esrow['surveyls_url']}\" />\n" . "</li>" . "<li><label for=''>" . $clang->gT("URL description:") . "</label>\n" . "<input type='text' size='80' name='urldescrip_" . $esrow['surveyls_language'] . "' value=\"{$esrow['surveyls_urldescription']}\" />\n" . "</li>" . "<li><label for=''>" . $clang->gT("Date format:") . "</label>\n" . "<select size='1' name='dateformat_" . $esrow['surveyls_language'] . "'>\n";
     foreach (getDateFormatData() as $index => $dateformatdata) {
         $tab_content[$i] .= "<option value='{$index}'";
         if ($esrow['surveyls_dateformat'] == $index) {
             $tab_content[$i] .= " selected='selected'";
         }
         $tab_content[$i] .= ">" . $dateformatdata['dateformat'] . '</option>';
     }
     $tab_content[$i] .= "</select></li>" . "<li><label for=''>" . $clang->gT("Decimal separator:") . "</label>\n";
     $tab_content[$i] .= "<select size='1' name='numberformat_" . $esrow['surveyls_language'] . "'>\n";
     foreach (getRadixPointData() as $index => $radixptdata) {
         $tab_content[$i] .= "<option value='{$index}'";
         if ($esrow['surveyls_numberformat'] == $index) {
             $tab_content[$i] .= " selected='selected'";
         }
         $tab_content[$i] .= ">" . $radixptdata['desc'] . '</option>';
Example #2
0
    echo $grouplang;
    ?>
'><?php 
    eT("Description:");
    ?>
</label>
                        <div class="htmleditor">
                            <textarea cols='80' rows='8' id='description_<?php 
    echo $grouplang;
    ?>
' name='description_<?php 
    echo $grouplang;
    ?>
'></textarea>
                            <?php 
    echo getEditor("group-desc", "description_" . $grouplang, "[" . gT("Description:", "js") . "](" . $grouplang . ")", $surveyid, '', '', $action);
    ?>
                        </div>
                    </li>
                    <?php 
    if ($grouplang == $baselang) {
        ?>
                        <li><label for='randomization_group'><?php 
        eT("Randomization group:");
        ?>
</label><input type='text' size='20' maxlength='20' name='randomization_group' id='randomization_group' /></li>
                        <li>
                            <label for='grelevance'><?php 
        eT("Relevance equation:");
        ?>
</label>
    $clang->eT("Description:");
    ?>
</label>
                        <div class="htmleditor">
                            <textarea cols='70' rows='8' id='description_<?php 
    echo $aGroupData[$i]['language'];
    ?>
' name='description_<?php 
    echo $aGroupData[$i]['language'];
    ?>
'><?php 
    echo htmlspecialchars($aGroupData[$i]['description']);
    ?>
</textarea>
                            <?php 
    echo getEditor("group-desc", "description_" . $aGroupData[$i]['language'], "[" . $clang->gT("Description:", "js") . "](" . $aGroupData[$i]['language'] . ")", $surveyid, $gid, '', $action);
    ?>
                        </div>
                    </li>
                </ul>
                <div style='clear:both'></div>
            </div>
            <?php 
}
?>


    </div>
    <ul>
        <li>
            <label for='randomization_group'><?php 
function createnews()
{
    global $context, $txt, $boardurl, $sourcedir;
    checkSession('get');
    //Load main trader template.
    $context['sub_template'] = 'createnews';
    $context['page_title'] = $txt['adkmod_block_add_news'];
    $context['save_action'] = 'savecreatenews';
    //Editor
    getEditor();
    //Compatibility template
    $context['edit'] = array('autor' => '', 'title' => '', 'id' => '');
}
                                            { ?>
                                            <?php if($row->title) {$sPattern="^([a-zA-Z0-9]*|{$row->title})$";}else{$sPattern="^[a-zA-Z0-9]*$";} ?>
                                            <img class='handle' src='<?php echo $sImageURL; ?>handle.png' alt=''/></td>
                                            <td><input type='hidden' class='oldcode' id='oldcode_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>' name='oldcode_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>' value="<?php echo $row->title; ?>" />
                                            <input type='text' id='code_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>' class='code' name='code_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>' value="<?php echo $row->title; ?>" maxlength='20' size='5' pattern='<?php echo $sPattern; ?>' required='required' />

                                            <?php }
                                            else
                                            { ?>
                                        </td><td><?php echo $row->title; ?>

                                            <?php } ?>

                                    </td><td>
                                        <input type='text' size='100' class='answer' id='answer_<?php echo $row->language; ?>_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>' name='answer_<?php echo $row->language; ?>_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>' placeholder='<?php $clang->eT("Some example subquestion","js") ?>' value="<?php echo $row->question; ?>" onkeypress=" if(event.keyCode==13) { if (event && event.preventDefault) event.preventDefault(); document.getElementById('saveallbtn_<?php echo $anslang; ?>').click(); return false;}" />
                                        <?php echo  getEditor("editanswer","answer_".$row->language."_".$row->qid."_{$row->scale_id}", "[".$clang->gT("Subquestion:", "js")."](".$row->language.")",$surveyid,$gid,$qid,'editanswer'); ?>
                                    </td>
                                    <td>


                                        <?php if ($activated != 'Y' && $first)
                                            { ?>
                                            <img src='<?php echo $sImageURL; ?>addanswer.png' class='btnaddanswer' alt='<?php $clang->eT("Insert a new subquestion after this one") ?>' />
                                            <img src='<?php echo $sImageURL; ?>deleteanswer.png' class='btndelanswer' alt='<?php $clang->eT("Delete this subquestion") ?>' />
                                            <?php } ?>

                                    </td></tr>
                                <?php $position++;
                                }
                                ++$anscount; ?>
                        </tbody></table>
?>
</label>
        <div class='htmleditor'>
        <textarea cols='80' rows='15' id='endtext_<?php 
echo $esrow['surveyls_language'];
?>
' name='endtext_<?php 
echo $esrow['surveyls_language'];
?>
'><?php 
echo $esrow['surveyls_endtext'];
?>
</textarea>
        </div>
        <?php 
echo getEditor("survey-endtext", "endtext_" . $esrow['surveyls_language'], "[" . $clang->gT("End message:", "js") . "](" . $esrow['surveyls_language'] . ")", $surveyid, '', '', $action);
?>
    </li>
    <li><label for='url_<?php 
echo $esrow['surveyls_language'];
?>
'><?php 
$clang->eT("End URL:");
?>
</label>
        <input type='text' size='80' id='url_<?php 
echo $esrow['surveyls_language'];
?>
' name='url_<?php 
echo $esrow['surveyls_language'];
?>
            <?php 
$templateusein = GetEmailUseInArray();
echo CHtml::dropDownList('template_usein', '', $templateusein, array('ajax' => array('type' => 'POST', 'data' => array('emailUseIN' => 'js:this.value'), 'url' => CController::createUrl('admin/get/sa/fetchtemplatevariable'), 'update' => '#variabledetail')));
?>
        </td>
    </tr>
    <tr>
        <td align="right" style="text-align: right; width: 20%">
            <label for='email_body'><?php 
$clang->eT("Email Body : ");
?>
</label>
        </td>
        <td>
            <textarea rows="3" cols="10" name="email_body" id="email_body"></textarea>
        </td>
        <?php 
echo getEditor("email-body", "email_body", "[" . $clang->gT("Email Body : ", "js") . "]", '125345', '', '', '');
?>
    </tr>
</table>
<div id="variabledetail"></div>

<p style="padding-top: 1em;">
    <input type='submit' value='<?php 
$clang->eT("Save");
?>
' />
    <input type='hidden' name='action' value='addemailbody' />
</p>
</form>
/**
 * displayTranslateFields() Formats and displays translation fields (base language as well as to language)
 * @global $dbprefix, $clang;
 * @param string $surveyid Survey id
 * @param string $gid Group id
 * @param string $qid Question id
 * @param string $type Type of database field that is being translated, e.g. title, question, etc.
 * @param array $amTypeOptions Array containing options associated with each $type
 * @param string $baselangdesc The source translation language, e.g. "English"
 * @param string $tolangdesc The target translation language, e.g. "German"
 * @param string $textfrom The text to be translated in source language
 * @param string $textto The text to be translated in target language
 * @param integer $i Counter
 * @param string $rowfrom Contains current row of database query
 * @param boolean $evenRow True for even rows, false for odd rows
 * @return string $translateoutput
 */
function displayTranslateFields($surveyid, $gid, $qid, $type, $amTypeOptions, $baselangdesc, $tolangdesc, $textfrom, $textto, $i, $rowfrom, $evenRow)
{
    $translateoutput = "";
    if ($evenRow) {
        $translateoutput .= "<tr class=\"odd\">";
    } else {
        $translateoutput .= "<tr class=\"even\">";
    }
    $value1 = "";
    if ($amTypeOptions["id1"] != "") {
        $value1 = $rowfrom[$amTypeOptions["id1"]];
    }
    $value2 = "";
    if ($amTypeOptions["id2"] != "") {
        $value2 = $rowfrom[$amTypeOptions["id2"]];
    }
    // Display text in original language
    // Display text in foreign language. Save a copy in type_oldvalue_i to identify changes before db update
    $translateoutput .= "" . "<td class='_from_' id='{$type}_from_{$i}'>{$textfrom}</td>\n" . "<td>\n";
    $translateoutput .= "<input type='hidden' name='{$type}_id1_{$i}' value='{$value1}' />\n";
    $translateoutput .= "<input type='hidden' name='{$type}_id2_{$i}' value='{$value2}' />\n";
    $nrows = max(calc_nrows($textfrom), calc_nrows($textto));
    $translateoutput .= "<input type='hidden' " . "name='" . $type . "_oldvalue_" . $i . "' " . "value='" . htmlspecialchars($textto, ENT_QUOTES) . "' />\n";
    $translateoutput .= "<textarea cols='80' rows='" . $nrows . "' " . " name='{$type}_newvalue_{$i}' >" . htmlspecialchars($textto) . "</textarea>\n";
    if ($amTypeOptions["HTMLeditorDisplay"] == "Inline") {
        $translateoutput .= "" . getEditor("edit" . $type, $type . "_newvalue_" . $i, htmlspecialchars($textto), $surveyid, $gid, $qid, "translate" . $amTypeOptions["HTMLeditorType"]);
    }
    if ($amTypeOptions["HTMLeditorDisplay"] == "Popup") {
        $translateoutput .= "" . getPopupEditor("edit" . $type, $type . "_newvalue_" . $i, urlencode($amTypeOptions['description']), $surveyid, $gid, $qid, "translate" . $amTypeOptions["HTMLeditorType"]);
    }
    $translateoutput .= "\n</td>\n" . "</tr>\n";
    return $translateoutput;
}
										var status=new LiveValidation('status');
										status.add(Validate.Presence);
									 </script>
								</td>
							</tr>
							<tr id="teachersNotesRow">
								<td colspan=2> 
									<b><?php 
                    print _('Description');
                    ?>
</b>
									<?php 
                    $expenseRequestTemplate = getSettingByScope($connection2, "Finance", "expenseRequestTemplate");
                    ?>
									<?php 
                    print getEditor($guid, TRUE, "body", $expenseRequestTemplate, 25, true, false, false);
                    ?>
								</td>
							</tr>
							<tr>
								<td> 
									<b><?php 
                    print _('Total Cost');
                    ?>
 *</b><br/>
									<span style="font-size: 90%">
										<i>
										<?php 
                    if ($_SESSION[$guid]["currency"] != "") {
                        print sprintf(_('Numeric value of the fee in %1$s.'), $_SESSION[$guid]["currency"]);
                    } else {
        ?>
'><?php 
        eT("Help:");
        ?>
</label>
                            <div class="htmleditor">
                            <textarea cols='50' rows='4' id='help_<?php 
        echo $addlanguage;
        ?>
' name='help_<?php 
        echo $addlanguage;
        ?>
'></textarea>
                            </div>
                            <?php 
        echo getEditor("question-help", "help_" . $addlanguage, "[" . gT("Help:", "js") . "](" . $addlanguage . ")", $surveyid, $gid, $qid, $action);
        ?>
                        </li></ul>
                </div>
                <?php 
    }
}
?>
        <div id='questionbottom'>
            <ul>
                <li><label for='question_type'><?php 
eT("Question Type:");
?>
</label>
                    <?php 
if ($activated != "Y") {
											}
										});
									 </script>
								</td>
							</tr>
							<?php 
                }
                ?>
						<tr>
							<td colspan=2 style='padding-top: 15px;'> 
								<b><?php 
                print _('Note');
                ?>
 *</b><br/>
								<?php 
                print getEditor($guid, TRUE, "note", "", 25, true, true, false);
                ?>
							</td>
						</tr>
						<tr>
							<td>
								<span style="font-size: 90%"><i>* <?php 
                print _("denotes a required field");
                ?>
</i></span>
							</td>
							<td class="right">
								<input type="hidden" name="address" value="<?php 
                print $_SESSION[$guid]["address"];
                ?>
">
 if (!$adding) {
     $aqquery = "SELECT * FROM {$dbprefix}questions WHERE sid={$surveyid} AND gid={$gid} AND qid={$qid} AND language != '{$baselang}'";
     $aqresult = db_execute_assoc($aqquery);
     while (!$aqresult->EOF) {
         $aqrow = $aqresult->FetchRow();
         $editquestion .= '<div id="' . $aqrow['language'] . '">';
         $aqrow = array_map('htmlspecialchars', $aqrow);
         $editquestion .= "\t<div class='settingrow'><span class='settingcaption'>" . $clang->gT("Question:") . "</span>\n" . "<span class='settingentry'><textarea cols='50' rows='4' name='question_{$aqrow['language']}'>{$aqrow['question']}</textarea>\n" . getEditor("question-text", "question_" . $aqrow['language'], "[" . $clang->gT("Question:", "js") . "](" . $aqrow['language'] . ")", $surveyid, $gid, $qid, $action) . "\t</span></div>\n" . "\t<div class='settingrow'><span class='settingcaption'>" . $clang->gT("Help:") . "</span>\n" . "<span class='settingentry'><textarea cols='50' rows='4' name='help_{$aqrow['language']}'>{$aqrow['help']}</textarea>\n" . getEditor("question-help", "help_" . $aqrow['language'], "[" . $clang->gT("Help:", "js") . "](" . $aqrow['language'] . ")", $surveyid, $gid, $qid, $action) . "\t</span></div>\n";
         $editquestion .= '</div>';
     }
 } else {
     $addlanguages = GetAdditionalLanguagesFromSurveyID($surveyid);
     foreach ($addlanguages as $addlanguage) {
         $editquestion .= '<div id="' . $addlanguage . '">';
         $editquestion .= '</h2>';
         $editquestion .= "\t<div class='settingrow'><span class='settingcaption'>" . $clang->gT("Question:") . "</span>\n" . "<span class='settingentry'><textarea cols='50' rows='4' name='question_{$addlanguage}'></textarea>\n" . getEditor("question-text", "question_" . $addlanguage, "[" . $clang->gT("Question:", "js") . "](" . $addlanguage . ")", $surveyid, $gid, $qid, $action) . "\t</span></div>\n" . "\t<div class='settingrow'><span class='settingcaption'>" . $clang->gT("Help:") . "</span>\n" . "<span class='settingentry'><textarea cols='50' rows='4' name='help_{$addlanguage}'></textarea>\n" . getEditor("question-help", "help_" . $addlanguage, "[" . $clang->gT("Help:", "js") . "](" . $addlanguage . ")", $surveyid, $gid, $qid, $action) . "\t</span></div>\n" . "\t<div class='settingrow'><span class='settingcaption'>&nbsp;</span>\n" . "<span class='settingentry'>&nbsp;\n" . "\t</span></div>\n";
         $editquestion .= '</div>';
     }
 }
 //question type:
 $editquestion .= "\t<div id='questionbottom'><ul>\n" . "<li><label for='question_type'>" . $clang->gT("Question Type:") . "</label>\n";
 if ($activated != "Y") {
     $editquestion .= "<select id='question_type' style='margin-bottom:5px' name='type' " . ">\n" . getqtypelist($eqrow['type'], 'group') . "</select>\n";
 } else {
     $qtypelist = getqtypelist('', 'array');
     $editquestion .= "{$qtypelist[$eqrow['type']]['description']} - " . $clang->gT("Cannot be changed (survey is active)") . "\n" . "<input type='hidden' name='type' id='question_type' value='{$eqrow['type']}' />\n";
 }
 $editquestion .= "\t</li>\n";
 if (!$adding) {
     $qattributes = questionAttributes();
 } else {
Example #13
0
                    }
                ?>
                <div id="<?php echo $language; ?>">

                    <ul>
                        <li><label for='from_<?php echo $language; ?>'><?php $clang->eT("From"); ?>:</label>
                            <?php echo CHtml::textField("from_{$language}",$thissurvey[$baselang]['adminname']." <".$thissurvey[$baselang]['adminemail'].">",array('size'=>50)); ?>
                        </li>
                        <li><label for='subject_<?php echo $language; ?>'><?php $clang->eT("Subject"); ?>:</label>
                            <?php echo CHtml::textField("subject_{$language}",$subject,array('size'=>83)); ?>
                        </li>

                        <li><label for='message_<?php echo $language; ?>'><?php $clang->eT("Message"); ?>:</label>
                            <div class="htmleditor">
                                <?php echo CHtml::textArea("message_{$language}",$textarea,array('cols'=>80,'rows'=>20)); ?>
                                <?php echo getEditor("email-inv", "message_$language", "[" . $clang->gT("Invitation email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens"); ?>
                            </div>
                        </li>
                    </ul></div>
                <?php } ?>

            <p>
                <label for='bypassbademails'><?php $clang->eT("Bypass token with failing email addresses"); ?>:</label>
                <?php echo CHtml::dropDownList('bypassbademails', 'Y',array("Y"=>gT("Yes"),"N"=>gT("No"))); ?>
            </p>
            <p>
                <input type='submit' value='<?php $clang->eT("Send Invitations"); ?>' />
                <input type='hidden' name='ok' value='absolutely' />
                <input type='hidden' name='subaction' value='email' />
                <?php if (!empty($tokenids)) { ?>
                    <input type='hidden' name='tokenids' value='<?php echo implode('|', (array) $tokenids); ?>' />
</label>
        <textarea cols='80' rows='20' name='email_<?php 
echo $tab;
?>
_<?php 
echo $grouplang;
?>
' id='<?php 
echo "email_{$tab}_{$grouplang}";
?>
'><?php 
echo htmlspecialchars($esrow->{$details['field']['body']});
?>
</textarea>
       <?php 
echo getEditor("email-{$tab}", "email_{$tab}_{$grouplang}", "", $surveyid, '', '', 'editemailtemplates');
?>
        <input 
            type='button' 
            value='<?php 
$clang->eT("Reset");
?>
' 
            class="fillin"
            data-target="<?php 
echo "email_{$tab}_{$grouplang}";
?>
"
            data-value="<?php 
echo htmlspecialchars(conditionalNewlineToBreak($details['default']['body'], $ishtml), ENT_QUOTES);
?>
     }
     $tokenoutput .= "</h2><ul>\n" . "<li><label for='from_{$language}' >" . $clang->gT("From") . ":</label>\n" . "<input type='text' size='50' name='from_{$language}' id='from_{$language}' value=\"{$thissurvey['adminname']} <{$thissurvey['adminemail']}>\" /></li>\n" . "<li><label for='subject_{$language}' >" . $clang->gT("Subject") . ":</label>\n";
     $fieldsarray["{ADMINNAME}"] = $thissurvey['adminname'];
     $fieldsarray["{ADMINEMAIL}"] = $thissurvey['adminemail'];
     $fieldsarray["{SURVEYNAME}"] = $thissurvey['name'];
     $fieldsarray["{SURVEYDESCRIPTION}"] = $thissurvey['description'];
     $fieldsarray["{EXPIRY}"] = $thissurvey["expiry"];
     $subject = Replacefields($thissurvey['email_remind_subj'], $fieldsarray);
     $textarea = Replacefields($thissurvey['email_remind'], $fieldsarray);
     if ($ishtml !== true) {
         $textarea = str_replace(array('<x>', '</x>'), array(''), $textarea);
     }
     $tokenoutput .= "<input type='text' size='83' id='subject_{$language}' name='subject_{$language}' value=\"{$subject}\" /></li>\n";
     $tokenoutput .= "\t<li>\n" . "<label for='message_{$language}'>" . $clang->gT("Message") . ":</label>\n" . "<textarea name='message_{$language}' id='message_{$language}' rows='20' cols='80' >\n";
     $tokenoutput .= htmlspecialchars($textarea);
     $tokenoutput .= "</textarea>\n" . getEditor("email-rem", "message_{$language}", "[" . $clang->gT("Reminder Email:", "js") . "](" . $language . ")", $surveyid, '', '', $action) . "</li>\n" . "</ul></div>";
 }
 $tokenoutput .= "</div><ul>\n";
 if (isset($tokenids)) {
     $tokenoutput .= "\t<li>\n" . "<label>" . $clang->gT("Send reminder to token ID(s):") . "</label>\n" . implode(", ", $tokenids) . "</li>\n";
 } elseif (!isset($tokenid)) {
     $tokenoutput .= "<li><label>" . $clang->gT("Sending to:") . "</label>" . $clang->gT("All token entries to whom a reminder email would apply") . "</li>";
     $tokenoutput .= "\t<li>\n" . "<label for='last_tid'>" . $clang->gT("Start at Token ID:") . "</label>\n" . "<input type='text' size='5' id='last_tid' name='last_tid' />\n" . "\t</li>\n";
 } elseif (isset($tokenid)) {
     $tokenoutput .= "\t<li>\n" . "<label>" . $clang->gT("Send reminder to token ID(s):") . "</label>\n" . "{$tokenid}</li>\n";
 }
 $tokenoutput .= "<li><label for='bypassbademails'>\n" . $clang->gT("Bypass token with failing email addresses") . ":</label>\n" . "<select id='bypassbademails' name='bypassbademails'>\n" . "\t<option value='Y'>" . $clang->gT("Yes") . "</option>\n" . "\t<option value='N'>" . $clang->gT("No") . "</option>\n" . "</select></li>\n" . "<li><label for='minreminderdelay'>\n" . $clang->gT("Min days between reminders") . ":</label>\n" . "<input type='text' value='' name='minreminderdelay' id='minreminderdelay' /></li>\n" . "<li><label for='maxremindercount'>\n" . $clang->gT("Max reminders") . ":</label>\n" . "<input type='text' value='' name='maxremindercount' id='maxremindercount' /></li>\n" . "</ul><p>\n" . "<input type='submit' value='" . $clang->gT("Send Reminders") . "' />\n" . "\t<input type='hidden' name='ok' value='absolutely' />\n" . "\t<input type='hidden' name='sid' value='{$_GET['sid']}' />\n" . "\t<input type='hidden' name='subaction' value='remind' />\n";
 if (isset($tokenid)) {
     $tokenoutput .= "\t<input type='hidden' name='tid' value='{$tokenid}' />\n";
 }
 if (isset($tokenids)) {
Example #16
0
            }
            ?>
									];
									$( "#homeworkDueDateTime" ).autocomplete({source: availableTags});
								});
							</script>
						</td>
					</tr>
					<tr id="homeworkDetailsRow">
						<td colspan=2> 
							<b><?php 
            print _('Homework Details');
            ?>
 *</b> 
							<?php 
            print getEditor($guid, TRUE, "homeworkDetails", "", 25, true, true, true);
            ?>
						</td>
					</tr>
					<tr id="homeworkSubmissionRow">
						<td> 
							<b><?php 
            print _('Online Submission?');
            ?>
 *</b><br/>
						</td>
						<td class="right">
							<input type="radio" name="homeworkSubmission" value="Yes" class="homeworkSubmission" /> Yes
							<input checked type="radio" name="homeworkSubmission" value="No" class="homeworkSubmission" /> No
						</td>
					</tr>
Example #17
0
            $position=sprintf("%05d", $position);
            if (!isset($_SESSION['nextlabelcode'])) $_SESSION['nextlabelcode']='';
            if ($first)
            {  $tab_content[$i].= "<tr><td><br /></td></tr><tr><td align='right'>"
            ."<input type='hidden' name='sortorderids' value='$sortorderids' />\n"
            ."<input type='hidden' name='codeids' value='$codeids' />\n"
            ."<strong>".$clang->gT("New label").":</strong> <input type='text' maxlength='5' name='insertcode' size='6' value='".$_SESSION['nextlabelcode']."' id='code_$maxsortorder' onkeypress=\"if(event.keyCode!=13) {return goodchars(event,'1234567890abcdefghijklmnopqrstuvwxyz');}; return catchenter(event,'addnewlabelbtn');\" />\n"
            ."\t</td>\n"
            ."<td style='text-align:center;'>"
            ."<input style='text-align:right;' type='text' maxlength='5' name='insertassessmentvalue' size='6' id='insertassessmentvalue' value='0' "
            ."onkeypress=\"if(event.keyCode==13) {if (event && event.preventDefault) event.preventDefault(); document.getElementById('addnewlabelbtn').click(); return false;} return goodchars(event,'1234567890-')\" />"
            ."\t</td>\n"
            ."\t<td>\n"
            ."\t<input type='text' maxlength='3000' name='inserttitle' size='80' onkeypress=\"return catchenter(event,'addnewlabelbtn');\"/>\n"
            . getEditor("addlabel", "inserttitle", "[".$clang->gT("Label:", "js")."](".$lslanguage.")",'','','',$action)
            ."\t</td>\n"
            ."\t<td colspan='2'>\n"
            ."\t<input type='submit' name='method' value='".$clang->gT("Add new label")."' id='addnewlabelbtn' />\n"
            ."<script type='text/javascript'>\n"
            ."<!--\n"
            ."document.getElementById('code_$maxsortorder').focus();\n"
            ."function catchenter(evt, btnid)\n"
            ."{\n"
            ."\tvar mykey = window.event ? evt.keyCode : evt.which;\n"
            ."\tif (mykey == 13)\n"
            ."\t{\n"
            ."\t\tvar mybtn = document.getElementById(btnid);\n"
            ."\t\tmybtn.click();\n"
            ."\t\treturn false;\n"
            ."\t}\n"
                                <input type='hidden' name='email_confirm_default_<?php echo $esrow->surveyls_language; ?>' id='email_confirm_default_<?php echo $grouplang; ?>' value='<?php echo htmlspecialchars(conditionalNewlineToBreak($aDefaultTexts['confirmation'],$ishtml),ENT_QUOTES); ?>' />
                                <input type='button' value='<?php $clang->eT("Use default"); ?>' onclick='javascript: fillin("email_confirm_<?php echo $grouplang; ?>","email_confirm_default_<?php echo $grouplang; ?>")' />
                            </li>
                        </ul>
                    </div>

                    <div id='tab-<?php echo $grouplang; ?>-registration'>
                        <ul>
                            <li><label for='email_register_subj_<?php echo $grouplang; ?>'><?php $clang->eT("Public registration email subject:"); ?></label>
                                <input type='text' size='80' name='email_register_subj_<?php echo $esrow->surveyls_language; ?>' id='email_register_subj_<?php echo $grouplang; ?>' value="<?php echo $esrow->surveyls_email_register_subj; ?>" />
                                <input type='hidden' name='email_register_subj_default_<?php echo $esrow->surveyls_language; ?>' id='email_register_subj_default_<?php echo $grouplang; ?>' value='<?php echo $aDefaultTexts['registration_subject'] ?>' />
                                <input type='button' value='<?php $clang->eT("Use default"); ?>' onclick='javascript: fillin("email_register_subj_<?php echo $grouplang; ?>","email_register_subj_default_<?php echo $grouplang; ?>")' />
                            </li>
                            <li><label for='email_register_<?php echo $grouplang; ?>'><?php $clang->eT("Public registration email:"); ?></label>
                                <textarea cols='80' rows='20' name='email_register_<?php echo $grouplang; ?>' id='email_register_<?php echo $grouplang; ?>'><?php echo htmlspecialchars($esrow->surveyls_email_register); ?></textarea>
                                <?php echo getEditor("email-reg","email_register_$grouplang", "[".$clang->gT("Public registration email:", "js")."](".$grouplang.")",$surveyid,'','','editemailtemplates'); ?>
                                <input type='hidden' name='email_register_default_<?php echo $esrow->surveyls_language; ?>' id='email_register_default_<?php echo $grouplang; ?>' value='<?php echo htmlspecialchars(conditionalNewlineToBreak($aDefaultTexts['registration'],$ishtml),ENT_QUOTES); ?>' />
                                <input type='button' value='<?php $clang->eT("Use default"); ?>' onclick='javascript: fillin("email_register_<?php echo $grouplang; ?>","email_register_default_<?php echo $grouplang; ?>")' />
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <?php endforeach; ?>
    </div>
    <p>
        <input type='submit' class='standardbtn' value='<?php $clang->eT("Save"); ?>' />
        <input type='hidden' name='action' value='tokens' />
        <input type='hidden' name='language' value="<?php echo $esrow->surveyls_language; ?>" />
    </p>
    </form>
Example #19
0
									});
								</script>
							</td>
						</tr>
						<tr id="homeworkDetailsRow">
							<td colspan=2> 
								<b><?php 
                print _('Homework Details');
                ?>
 *</b> 
								<?php 
                $initiallyHidden = true;
                if ($row["homework"] == "Y") {
                    $initiallyHidden = false;
                }
                print getEditor($guid, TRUE, "homeworkDetails", $row["homeworkDetails"], 25, true, true, $initiallyHidden);
                ?>
							</td>
						</tr>
						<tr id="homeworkSubmissionRow">
							<td> 
								<b><?php 
                print _('Online Submission?');
                ?>
 *</b><br/>
							</td>
							<td class="right">
								<input <?php 
                print $submissionYes;
                ?>
 type="radio" name="homeworkSubmission" value="Yes" class="homeworkSubmission" /> <?php 
Example #20
0
                    </div>                    
                </div>            
    
                <!-- End message -->
                <div class="form-group">
                    <label for='endtext' class="col-sm-2 control-label">
                        <?php 
eT("End message:");
?>
  
                    </label>
                    <br/><br/>
                    <div class='htmleditor col-sm-offset-2' style="position: relative; top: -30px; left: 1em;" >
                        <textarea cols='80' id='endtext' rows='10' name='endtext'></textarea>
                        <?php 
echo getEditor("survey-endtext", "endtext", "[" . gT("End message:", "js") . "]", '', '', '', $action);
?>
                    </div>                    
                </div>                        
    
            </div>
        </div>
        
        <!-- Settings in accordion -->
        <div class='col-lg-4'>
            <?php 
$this->renderPartial('/admin/survey/subview/accordion/_accordion_container', array('data' => $data));
?>
        
        </div>
'><?php 
        $clang->eT("Message");
        ?>
:</label>
	    <textarea name='assessmentmessage_<?php 
        echo $assessmentlang;
        ?>
' id='assessmentmessage_<?php 
        echo $assessmentlang;
        ?>
' rows='10' cols='80'><?php 
        echo $message;
        ?>
</textarea>
        <?php 
        echo getEditor("assessment-text", "assessmentmessage_{$assessmentlang}", "[" . $clang->gT("Message:", "js") . "]", $surveyid, $gid, null, $action);
        ?>
        </li>
        <li style="text-align:center;"><input type='submit' value='<?php 
        $clang->eT("Save");
        ?>
'/></li></ul>
	    </div>
    <?php 
    }
    ?>
    </div>
    <div>
    <?php 
    if ($action == "assessmentedit") {
        echo "&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' value='" . $clang->gT("Cancel") . "' onclick=\"document.assessmentsform.action.value='assessments'\" />\n ";
Example #22
0
                            </div>

                            <div class='form-group'>
                                <label class='control-label col-sm-2' for='message_<?php 
    echo $language;
    ?>
'><?php 
    eT("Message:");
    ?>
</label>
                                <div class="htmleditor col-sm-6">
                                    <?php 
    echo CHtml::textArea("message_{$language}", $textarea, array('cols' => 80, 'rows' => 20, 'class' => 'form-control'));
    ?>
                                    <?php 
    echo getEditor("email-rem", "message_{$language}", "[" . gT("Reminder Email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens");
    ?>
                                </div>
                            </div>
                        </div>
                    <?php 
}
?>
                </div>
                    <?php 
if (count($tokenids) > 0) {
    ?>
                        <div class='form-group'>
                            <label class='control-label col-sm-2'><?php 
    eT("Send reminder to token ID(s):");
    ?>
Example #23
0
<!--    <table style="width: 80%; margin: 0px auto;" id="contenteditor">
        <tr>
            <td align="right" style="text-align: right;">
                <label for='page_content'><?php 
    $clang->eT("Page Content* : ");
    ?>
</label>
            </td>
            <td>
                <textarea rows="3" cols="80" name="page_content" id="page_content"><?php 
    echo $mrw['page_content'];
    ?>
</textarea>
            </td>
            <?php 
    echo getEditor("page-content", "page_content", "[" . $clang->gT("Page Content:", "js") . "]", '2541', '', '', '');
    ?>
        </tr>

        <tr>
            <?php 
    $chk = '';
    if ($mrw['IsActive'] == 1) {
        $chk = 'checked=checked';
    }
    ?>
            <td align="right" style="text-align: right;">
                <label for='IsActive'><?php 
    $clang->eT("IsActive : ");
    ?>
</label>
					<script type="text/javascript">
						var subject=new LiveValidation('subject');
						subject.add(Validate.Presence);
					</script>
				</td>
			</tr>
			<tr>
				<td colspan=2> 
					<b><?php 
    print _('Body');
    ?>
 *</b>
					<?php 
    //Attempt to build a signature for the user
    $signature = getSignature($guid, $connection2, $_SESSION[$guid]["gibbonPersonID"]);
    print getEditor($guid, TRUE, "body", $signature, 20, true, true, false, true);
    ?>
				</td>
			</tr>
			
			<select name="roleCategories[]" id="roleCategories[]" multiple style="display: none">
				<?php 
    try {
        $dataSelect = array();
        $sqlSelect = "SELECT DISTINCT category FROM gibbonRole ORDER BY category";
        $resultSelect = $connection2->prepare($sqlSelect);
        $resultSelect->execute($dataSelect);
    } catch (PDOException $e) {
    }
    while ($rowSelect = $resultSelect->fetch()) {
        print "<option selected value='" . $rowSelect["category"] . "'>" . htmlPrep(_($rowSelect["category"])) . "</option>";
            $subject = Replacefields($thissurvey[$language]['email_remind_subj'], $fieldsarray, false);
            $textarea = Replacefields($thissurvey[$language]['email_remind'], $fieldsarray, false);
            if ($ishtml !== true)
            {
                $textarea = str_replace(array('<x>', '</x>'), array(''), $textarea);
            }

            echo "<input type='text' size='83' id='subject_$language' name='subject_$language' value=\"$subject\" /></li><li>\n"
            . "<label for='message_$language'>" . $clang->gT("Message") . ":</label>\n"
            . "<div  class='htmleditor'>\n"
            . "<textarea name='message_$language' id='message_$language' rows='20' cols='80' >";
            echo htmlspecialchars($textarea);
            echo "</textarea>"
            . "</div>\n"
            . getEditor("email-rem", "message_$language", "[" . $clang->gT("Reminder Email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens")
            . "</li>\n"
            . "</ul></div>";
        }
        ?>
<ul>

    <?php
    if (count($tokenids)>0)
    { ?>
        <li>
            <label><?php $clang->eT("Send reminder to token ID(s):"); ?></label>
        <?php echo short_implode(", ", (array) $tokenids); ?></li>
    <?php } ?>
    <li><label for='bypassbademails'>
            <?php $clang->eT("Bypass token with failing email addresses"); ?>:</label>
Example #26
0
                print $_SESSION[$guid]["absoluteURL"] . "/modules/" . $_SESSION[$guid]["module"] . "/department_editProcess.php?gibbonDepartmentID={$gibbonDepartmentID}&address=" . $_GET["q"];
                ?>
" enctype="multipart/form-data">
					<table class='smallIntBorder' cellspacing='0' style="width: 100%">	
						<tr class='break'>
							<td colspan=2> 
								<h3><?php 
                print _('Overview');
                ?>
</h3>
							</td>
						</tr>
						<tr>
							<td colspan=2> 
								<?php 
                print getEditor($guid, TRUE, "blurb", $row["blurb"], 20);
                ?>
							</td>
						</tr>
						<tr class='break'>
							<td colspan=2> 
								<h3><?php 
                print _('Current Resources');
                ?>
</h3>
							</td>
						</tr>
						<tr>
							<td colspan=2> 
								<?php 
                try {
Example #27
0
            value="<?php 
echo $answer;
?>
"
            onkeypress=" if(event.keyCode==13) { if (event && event.preventDefault) event.preventDefault(); document.getElementById('save-button').click(); return false;}"
        />
    </td>

    <!-- No relevance equation for answer options -->


    <!-- Icons edit/delete -->
    <td style="vertical-align: middle;" class="subquestion-actions">

        <?php 
echo getEditor("editanswer", "answer_" . $language . "_" . $qid . "_{$scale_id}", "[" . gT("Subquestion:", "js") . "](" . $language . ")", $surveyid, $gid, $qid, 'editanswer');
?>

        <?php 
if ($first) {
    ?>
            <span class="icon-add text-success btnaddanswer" data-assessmentvisible='<?php 
    echo $assessmentvisible;
    ?>
' data-position="<?php 
    echo $position;
    ?>
" data-code="<?php 
    echo $title;
    ?>
" data-scale-id="<?php 
Example #28
0
								payment.add(Validate.Numericality);
							</script>
							 <?php 
    }
    ?>
					
				</td>
			</tr>
			<tr>
				<td colspan=2> 
					<b><?php 
    print _('Description');
    ?>
</b> 
					<?php 
    print getEditor($guid, TRUE, "description", "", 10, TRUE);
    ?>
				</td>
			</tr>
			
			
			<tr class='break'>
				<td colspan=2> 
					<h3><?php 
    print _('Time Slots');
    ?>
</h3>
				</td>
			</tr>
			
			<script type="text/javascript">
                                    <?php 
        }
        ?>
                                <td>
                                    <input type='text' name='title_<?php 
        echo $row['language'];
        ?>
_<?php 
        echo $row['sortorder'];
        ?>
' maxlength='3000' size='80' value="<?php 
        echo HTMLEscape($row['title']);
        ?>
" />
                                    <?php 
        echo getEditor("editlabel", "title_{$row['language']}_{$row['sortorder']}", "[" . $clang->gT("Label:", "js") . "](" . $row['language'] . ")", '', '', '', $action);
        ?>
                                </td>
                                <td style='text-align:center;'>
                                <?php 
        if ($first) {
            ?>
                                        <img src='<?php 
            echo $sImageURL;
            ?>
addanswer.png' class='btnaddanswer' alt='<?php 
            $clang->eT("Insert a new label after this one");
            ?>
' />
                                        <img src='<?php 
            echo $sImageURL;
Example #30
0
         if ($first) {
             $codeids = $codeids . ' ' . $row['sortorder'];
         }
         $tab_content[$i] .= "<tr style='white-space: nowrap;' name='{$row['sortorder']}'";
         if ($alternate == true) {
             $tab_content[$i] .= ' class = "highlight" ';
         } else {
             $alternate = true;
         }
         $tab_content[$i] .= ">";
         if (!$first) {
             $tab_content[$i] .= "<td>{$row['code']}</td><td>{$row['assessment_value']}</td>";
         } else {
             $tab_content[$i] .= "\n                        <td><img src='{$imageurl}/handle.png' /></td>\n                        <td>\n                            <input type='hidden' class='hiddencode' value='{$row['code']}' />\n                            <input type='text'  class='codeval'id='code_{$row['sortorder']}' name='code_{$row['sortorder']}' maxlength='5'\n                                size='6' value='{$row['code']}'/>\n                        </td>\n\n                        <td>\n                            <input type='text' class='assessmentval' id='assessmentvalue_{$row['sortorder']}' style='text-align: right;' name='assessmentvalue_{$row['sortorder']}' maxlength='5' size='6' value='{$row['assessment_value']}' />\n                        </td>\n                    ";
         }
         $tab_content[$i] .= "\n                     <td>\n                        <input type='text' name='title_{$row['language']}_{$row['sortorder']}' maxlength='3000' size='80' value=\"" . html_escape($row['title']) . "\" />" . getEditor("editlabel", "title_{$row['language']}_{$row['sortorder']}", "[" . $clang->gT("Label:", "js") . "](" . $row['language'] . ")", '', '', '', $action) . "</td>";
         if ($first) {
             $tab_content[$i] .= "\n                     <td style='text-align:center;'>\n                     <img src='{$imageurl}/addanswer.png' class='btnaddanswer' /><img src='{$imageurl}/deleteanswer.png' class='btndelanswer' />\n                     </td>\n                     </tr>";
         }
         $position++;
     }
     $tab_content[$i] .= "</tbody></table>";
     $tab_content[$i] .= "<button class='btnquickadd' id='btnquickadd' type='button'>" . $clang->gT('Quick add...') . "</button>";
     $tab_content[$i] .= "<p><input type='submit' name='method' value='" . $clang->gT("Save Changes") . "'  id='saveallbtn_{$lslanguage}' /></p>";
     $first = false;
     $i++;
 }
 $labelsoutput .= "<div id='tabs'><ul>";
 foreach ($tab_title as $i => $eachtitle) {
     $labelsoutput .= "<li><a href='#neweditlblset{$i}'>{$eachtitle}</a></li>";
 }