Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions SQLFiles/migrations/2016.12.10.1710.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE `forms`
ADD COLUMN `exportPublic` tinyint(4) NOT NULL DEFAULT 0 AFTER `metadata`,
ADD COLUMN `exportOAI` tinyint(4) NOT NULL DEFAULT 0 AFTER `exportPublic`;
14 changes: 12 additions & 2 deletions public_html/formCreator/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
`container`='%s',
`production`='%s',
`metadata`='%s',
`exportPublic`='%s',
`exportOAI`='%s',
%s
`displayTitle`='%s',
`objectTitleField`='%s',
Expand All @@ -141,6 +143,8 @@
$engine->openDB->escape($form['formContainer']), // container=
$engine->openDB->escape($form['formProduction']), // production=
$engine->openDB->escape($form['formMetadata']), // metadata=
$engine->openDB->escape($form['exportPublic']),
$engine->openDB->escape($form['exportOAI']),
$countSql, // count=
(is_empty($engine->openDB->escape($form['objectDisplayTitle'])) ? $engine->openDB->escape($form['formTitle']) : $engine->openDB->escape($form['objectDisplayTitle'])),
// displayTitle
Expand All @@ -157,7 +161,7 @@
}
else {
// Insert into forms table
$sql = sprintf("INSERT INTO `forms` (title, description, fields, idno, submitButton, updateButton, container, production, metadata, count, displayTitle, objectTitleField, linkTitle) VALUES ('%s',%s,'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s',%s)",
$sql = sprintf("INSERT INTO `forms` (title, description, fields, idno, submitButton, updateButton, container, production, metadata, exportPublic, exportOAI, count, displayTitle, objectTitleField, linkTitle) VALUES ('%s',%s,'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s',%s)",
$engine->openDB->escape($form['formTitle']),
isset($form['formDescription']) ? "'".$engine->openDB->escape($form['formDescription'])."'" : "NULL",
encodeFields($fields),
Expand All @@ -167,6 +171,8 @@
$engine->openDB->escape($form['formContainer']),
$engine->openDB->escape($form['formProduction']),
$engine->openDB->escape($form['formMetadata']),
$engine->openDB->escape($form['exportPublic']),
$engine->openDB->escape($form['exportOAI']),
$engine->openDB->escape($count),
(is_empty($engine->openDB->escape($form['objectDisplayTitle'])) ? $engine->openDB->escape($form['formTitle']) : $engine->openDB->escape($form['objectDisplayTitle'])),
$engine->openDB->escape($form['objectTitleField']),
Expand Down Expand Up @@ -353,6 +359,8 @@
localVars::add("formContainer", ($form['container'] == '1') ? "checked" : "");
localVars::add("formProduction", ($form['production'] == '1') ? "checked" : "");
localVars::add("formMetadata", ($form['metadata'] == '1') ? "checked" : "");
localVars::add("exportPublic", ($form['exportPublic'] == '1') ? "checked" : "");
localVars::add("exportOAI", ($form['exportOAI'] == '1') ? "checked" : "");

if (is_empty($form['fields'])) {
$form['fields'] = array();
Expand Down Expand Up @@ -463,6 +471,8 @@
localVars::add("formContainer", ($form['formContainer'] == '1') ? "checked" : "");
localVars::add("formProduction", ($form['formProduction'] == '1') ? "checked" : "");
localVars::add("formMetadata", ($form['formMetadata'] == '1') ? "checked" : "");
localVars::add("exportPublic", ($form['exportPublic'] == '1') ? "checked" : "");
localVars::add("exportOAI", ($form['exportOAI'] == '1') ? "checked" : "");

if (is_empty($form['fields'])) {
$form['fields'] = array();
Expand Down Expand Up @@ -925,4 +935,4 @@

<?php
$engine->eTemplate("include","footer");
?>
?>
4 changes: 3 additions & 1 deletion public_html/formCreator/templates/formPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
<li><label class="checkbox" for="formSettings_formContainer"><input type="checkbox" id="formSettings_formContainer" name="formSettings_formContainer" {local var="formContainer"}> Act as Container</label></li>
<li><label class="checkbox" for="formSettings_formProduction"><input type="checkbox" id="formSettings_formProduction" name="formSettings_formProduction" {local var="formProduction"}> Production Ready</label></li>
<li><label class="checkbox" for="formSettings_formMetadata"><input type="checkbox" id="formSettings_formMetadata" name="formSettings_formMetadata" {local var="formMetadata"}> Metadata Form</label></li>
<li><label class="checkbox" for="formSettings_exportPublic"><input type="checkbox" id="formSettings_exportPublic" name="formSettings_exportPublic" {local var="exportPublic"}> Export To Public</label></li>
<li><label class="checkbox" for="formSettings_exportOAI"><input type="checkbox" id="formSettings_exportOAI" name="formSettings_exportOAI" {local var="exportOAI"}> OAI-PMH Export</label></li>
</ul>
<span class="help-block hidden"></span>
</div>
Expand Down Expand Up @@ -176,4 +178,4 @@
</div>
</div>
</div>
</div>
</div>