Skip to content

Commit

Permalink
move expiration date html elements under expiration date checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
karakayasemi committed Apr 4, 2019
1 parent df6795c commit 7683bef
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
39 changes: 19 additions & 20 deletions settings/templates/panels/admin/filesharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,31 @@
print_unescaped('checked="checked"');
} ?> />
<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/>
<span id="setDefaultExpireDate" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
p('hidden');
}?>">
<?php p($l->t('Expire after ')); ?>
<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
value='<?php p($_['shareExpireAfterNDays']) ?>' />
<?php p($l->t('days')); ?><br/>
<?php if ($_['shareEnforceExpireDate'] === 'yes'): ?>
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" value="1" checked="checked" />
<?php else: ?>
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" value="1" />
<?php endif; ?>
<label class="indent" for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
</span>

<input type="checkbox" name="shareapi_allow_public_notification" id="allowPublicMailNotification" class="checkbox"
value="1" <?php if ($_['allowPublicMailNotification'] == 'yes') {
print_unescaped('checked="checked"');
} ?> />
<label for="allowPublicMailNotification"><?php p($l->t('Allow users to send mail notification for shared files'));?></label><br/>
<span id="publicMailNotificationLang" <?php if ($_['allowPublicMailNotification'] == 'no') {
print_unescaped('class="hidden"');
} ?>>
<label><?php p($l->t('Language used for public mail notifications for shared files'));?></label>
<?php print_unescaped($_['publicMailNotificationLang']); ?>
<br>
</span>
<span id="publicMailNotificationLang" class="indent <?php if ($_['allowPublicMailNotification'] == 'no'): ?>hidden<?php endif; ?>">
<label><?php p($l->t('Language used for public mail notifications for shared files'));?></label>
<?php print_unescaped($_['publicMailNotificationLang']); ?>
<br>
</span>


<input type="checkbox" name="shareapi_allow_social_share" id="allowSocialShare" class="checkbox"
Expand All @@ -78,19 +90,6 @@
<label for="allowSocialShare"><?php p($l->t('Allow users to share file via social media'));?></label><br/>

</p>
<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') {
p('hidden');
}?>">
<?php p($l->t('Expire after ')); ?>
<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
value='<?php p($_['shareExpireAfterNDays']) ?>' />
<?php p($l->t('days')); ?>
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox"
value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') {
print_unescaped('checked="checked"');
} ?> />
<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
</p>
<p class="<?php if ($_['shareAPIEnabled'] === 'no') {
p('hidden');
}?>">
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Share20/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ public function testvalidateExpirationDateEnforceButNotEnabledAndNotSet() {
}

/**
* @expectedException \InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testvalidateExpirationDateEnforceButNotSetNewShare() {
$share = $this->manager->newShare();
Expand Down

0 comments on commit 7683bef

Please sign in to comment.