Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
fix #34 & sort additional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kimbtech committed Jan 7, 2020
1 parent 1d9f89f commit 1a3bd5e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
latest
1.2.1
1.2.2
1.2
1
6 changes: 4 additions & 2 deletions core/PollAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private function doDelete(){
header( 'Location: ' . URL::generateLink() );
die();
}
else{
else if( !empty($_SESSION['DELETE_SUBMISSIONS_CODE']) && $_GET['delete'] == $_SESSION['DELETE_SUBMISSIONS_CODE'] ){
$this->pollsub->setArray(array());
}
}
Expand Down Expand Up @@ -162,10 +162,12 @@ private function showInfo(){
$this->template->setMultipleContent('Additionals', $additionals);
}

$_SESSION['DELETE_SUBMISSIONS_CODE'] = Utilities::randomCode(6, Utilities::POLL_ID);

$this->template->setContent( 'JSONDATA', str_replace( array("\\r", "\\n"), array( "\\\\r", "\\\\n"), json_encode(
array(
"delallurl" => URL::currentLinkGenerator( array( 'delete' => 'all' ) ),
"delsuburl" => URL::currentLinkGenerator( array( 'delete' => 'sub' ) ),
"delsuburl" => URL::currentLinkGenerator( array( 'delete' => $_SESSION['DELETE_SUBMISSIONS_CODE'] ) ),
"polladmin" => URL::generateLink('admin', '', $this->polldata->getValue(['code', 'admin'])),
"meta" => array( $this->polldata->getValue(['pollname']), $this->polldata->getValue(['description']) ),
"terminmeta" => $terminmeta,
Expand Down
2 changes: 1 addition & 1 deletion core/Utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Utilities {
/**
* The system's Version
*/
const SYS_VERSION = 'v1.2.1';
const SYS_VERSION = 'v1.2.2';

/**
* Possible chars for:
Expand Down
3 changes: 2 additions & 1 deletion load/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ function template_admin(){
$("button#saveadditionalinputs").prop('disabled', true);
}
else {
$("ul#listofadditionals li span.additionals-delete").click(removeAdditionalInput)
$("ul#listofadditionals li span.additionals-delete").click(removeAdditionalInput);
$( "ul#listofadditionals" ).sortable({ items: "> li.additionals-element" });
}
}

Expand Down

0 comments on commit 1a3bd5e

Please sign in to comment.