aboutsummaryrefslogtreecommitdiff
path: root/app/views/configure/sharing.phtml
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2015-03-14 09:43:08 -0400
committerGravatar Alexis Degrugillier <github@ainw.org> 2015-03-14 09:43:08 -0400
commitdd4fb519be801254a8aa9baedb2a7f87dd608f2b (patch)
tree4e9094f1ad11424c6ca6994fc786340515bda157 /app/views/configure/sharing.phtml
parentdfe781c30b2e189d4ba679e70a75d03f261c695c (diff)
Add an unsaved changes alert on config pages
Before, you could leave a configuration page without knowing if you saved your changes or not. Now, there is an alert poping up if you have unsaved changes. It will ask you if you want to stay on the page and save your changes or leave the page and loose your changes. See #739
Diffstat (limited to 'app/views/configure/sharing.phtml')
-rw-r--r--app/views/configure/sharing.phtml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml
index deb1ed6b7..7bf435777 100644
--- a/app/views/configure/sharing.phtml
+++ b/app/views/configure/sharing.phtml
@@ -28,9 +28,9 @@
<div class="group-controls">
<input type='hidden' id='share_<?php echo $key; ?>_type' name="share[<?php echo $key; ?>][type]" value='<?php echo $share->type(); ?>' />
<div class="stick">
- <input type="text" id="share_<?php echo $key; ?>_name" name="share[<?php echo $key; ?>][name]" class="extend" value="<?php echo $share->name(); ?>" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" />
+ <input type="text" id="share_<?php echo $key; ?>_name" name="share[<?php echo $key; ?>][name]" class="extend" value="<?php echo $share->name(); ?>" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" data-leave-validation="<?php echo $share->name(); ?>"/>
<?php if ($share->formType() === 'advanced') { ?>
- <input type="url" id="share_<?php echo $key; ?>_url" name="share[<?php echo $key; ?>][url]" class="extend" value="<?php echo $share->baseUrl(); ?>" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" />
+ <input type="url" id="share_<?php echo $key; ?>_url" name="share[<?php echo $key; ?>][url]" class="extend" value="<?php echo $share->baseUrl(); ?>" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" data-leave-validation="<?php echo $share->baseUrl(); ?>"/>
<?php } else { ?>
<input type="url" id="share_<?php echo $key; ?>_url" name="share[<?php echo $key; ?>][url]" class="extend" value="<?php echo $share->baseUrl(); ?>" placeholder="<?php echo _t('gen.short.not_applicable'); ?>" size="64" disabled/>
<?php } ?>