diff options
-rw-r--r-- | js/admin.js | 9 | ||||
-rw-r--r-- | templates/admin.php | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/js/admin.js b/js/admin.js new file mode 100644 index 0000000..89141ea --- /dev/null +++ b/js/admin.js @@ -0,0 +1,9 @@ +$(document).ready(function() { + $('.popularitycontestclient_category').change(function() { + OC.AppConfig.setValue( + 'popularitycontestclient', + $(this).attr('name').substring(24), + $(this).attr('checked') ? 'yes' : 'no' + ); + }); +}); diff --git a/templates/admin.php b/templates/admin.php index 24bf23d..70c54de 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -17,7 +17,7 @@ ?> <p> <input id="popularitycontestclient_<?php p($category); ?>" name="popularitycontestclient_<?php p($category); ?>" - type="checkbox" class="checkbox" value="1" <?php if ($data['enabled']): ?> checked="checked"<?php endif; ?> /> + type="checkbox" class="checkbox popularitycontestclient_category" value="1" <?php if ($data['enabled']): ?> checked="checked"<?php endif; ?> /> <label for="popularitycontestclient_<?php p($category); ?>"><?php print_unescaped($data['displayName']); ?></label> </p> <?php |