Skip to content

Commit

Permalink
Add the email in the customize page. re #53
Browse files Browse the repository at this point in the history
  • Loading branch information
seblucas committed Jul 3, 2013
1 parent d9f0f3e commit bb0ba69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion base.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ function getCurrentOption ($option) {
if ($option == "style") {
return "default";
}
return $config ["cops_" . $option];

if (isset($config ["cops_" . $option])) {
return $config ["cops_" . $option];
}

return "";
}

function getCurrentCss () {
Expand Down Expand Up @@ -742,6 +747,10 @@ public function InitializeContent ()
array_push ($this->entryArray, new Entry (localize ("customize.paging"), "",
$content, "text",
array ()));
$content = '<input type="email" onchange="updateCookie (this);" id="email" value="' . getCurrentOption ("email") . '" />';
array_push ($this->entryArray, new Entry (localize ("customize.email"), "",
$content, "text",
array ()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion lang/Localization_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
"customize.title":"Customize COPS UI",
"customize.style":"Theme",
"customize.fancybox":"Use a Lightbox",
"customize.fancybox":"Use Fancybox",
"customize.paging":"Max number of books per page (-1 to disable)",
"customize.email":"Set your email (to allow book emailing)",
"fin":"fin"
}
1 change: 1 addition & 0 deletions lang/Localization_fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"customize.style":"Thème",
"customize.fancybox":"Utiliser une Lightbox",
"customize.paging":"Nombre de livres par page (-1 pour désactiver)",
"customize.email":"Adresse email (pour l'envoi automatique de livres)",
"languages.eng":"Anglais",
"languages.fra":"Français",
"fin":"fin"
Expand Down

0 comments on commit bb0ba69

Please sign in to comment.