1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- // Set to defaults if empty
- if(!isset($config->cookie_name)) {
- $config->cookie_name = 'das-macaroon';
- }
- if(!isset($config->secret)) {
- $config->secret = 'pocsecret';
- }
- if(!isset($config->identifier_format)) {
- $config->identifier_format = '{{firstname}};{{lastname}}';
- }
- if(!isset($config->email_config)) {
- $config->email_config = '{{firstname}}.{{lastname}}@company.tld';
- }
- // Caveats
- if(!isset($config->caveat1_condition)) {
- $config->caveat1_condition = '';
- }
- if(!isset($config->caveat2_condition)) {
- $config->caveat2_condition = '';
- }
- if(!isset($config->caveat3_condition)) {
- $config->caveat3_condition = '';
- }
- ?>
- <table cellspacing="0" cellpadding="5" border="0">
- <tr>
- <td colspan="3">
- <h3>Macaroons configuration</h3>
- </td>
- </tr>
- <tr class="required">
- <td align="right">
- <label for="cookie_name"><?php print_string('cookie_name_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="cookie_name" id="cookie_name" type="text" size="50" value="<?php echo $config->cookie_name; ?>" required="true" />
- </td>
- <td><?php print_string('cookie_name_help', 'auth_macaroons'); ?></td>
- </tr>
- <tr class="required">
- <td align="right">
- <label for="secret"><?php print_string('secret_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="secret" id="secret" type="text" size="50" value="<?php echo $config->secret; ?>" />
- </td>
- <td><?php print_string('secret_help', 'auth_macaroons'); ?></td>
- </tr>
- <tr class="required">
- <td align="right">
- <label for="identifier_format"><?php print_string('identifier_format_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="identifier_format" id="identifier_format" type="text" size="50" value="<?php echo $config->identifier_format; ?>" required="true" />
- </td>
- <td><?php print_string('identifier_format_help', 'auth_macaroons'); ?></td>
- </tr>
- <tr class="required">
- <td align="right">
- <label for="email_config"><?php print_string('email_config_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="email_config" id="email_config" type="text" size="50" value="<?php echo $config->email_config; ?>" required="true" />
- </td>
- <td><?php print_string('email_config_help', 'auth_macaroons'); ?></td>
- </tr>
- <tr>
- <td align="right">
- <label for="caveat1_condition"><?php print_string('caveat1_condition_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="caveat1_condition" id="caveat1_condition" type="text" size="50" value="<?php echo $config->caveat1_condition; ?>" />
- </td>
- <td><?php print_string('caveat1_condition_help', 'auth_macaroons'); ?></td>
- </tr>
- <tr>
- <td align="right">
- <label for="caveat2_condition"><?php print_string('caveat2_condition_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="caveat2_condition" id="caveat2_condition" type="text" size="50" value="<?php echo $config->caveat2_condition; ?>" />
- </td>
- <td><?php print_string('caveat2_condition_help', 'auth_macaroons'); ?></td>
- </tr>
- <tr>
- <td align="right">
- <label for="caveat3_condition"><?php print_string('caveat3_condition_label', 'auth_macaroons'); ?></label>
- </td>
- <td>
- <input name="caveat3_condition" id="caveat3_condition" type="text" size="50" value="<?php echo $config->caveat3_condition; ?>" />
- </td>
- <td><?php print_string('caveat3_condition_help', 'auth_macaroons'); ?></td>
- </tr>
- </table>
|