aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/FPanel/Interface.pm12
-rw-r--r--template/add-alias.html3
-rw-r--r--template/add-list.html3
-rw-r--r--template/add-mailbox.html3
-rw-r--r--template/edit-alias.html3
-rw-r--r--template/edit-domain.html3
-rw-r--r--template/edit-list.html5
-rw-r--r--template/edit-mailbox.html3
-rw-r--r--template/list-domains.html2
9 files changed, 26 insertions, 11 deletions
diff --git a/lib/FPanel/Interface.pm b/lib/FPanel/Interface.pm
index 8087cb9..053e1a2 100644
--- a/lib/FPanel/Interface.pm
+++ b/lib/FPanel/Interface.pm
@@ -149,9 +149,12 @@ sub EditDomain : Runmode {
my ($ul,$ud) = split /\@/, $self->authen->username, 2;
my $d = (split /\//, $ENV{PATH_INFO}, 3)[1];
- my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
my $q = $self->query;
+ return $self->redirect($q->url .'/') if defined $q->param('cancel');
+
+ my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
+
my $error; # Tells whether the change submission has failed.
if (defined $q->param('submit')) {
# Changes have been submitted: process them
@@ -200,9 +203,12 @@ sub EditLocal : Runmode {
my ($ul,$ud) = split /\@/, $self->authen->username, 2;
my ($null,$d,$l,$crap) = split /\//, $ENV{PATH_INFO}, 4;
- my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
my $q = $self->query;
+ return $self->redirect($q->url.'/'.$d.'/') if defined $q->param('cancel');
+
+ my $fp = Fripost::Schema::->SASLauth( $self->authen->username, %CFG );
+
my $error; # Tells whether the change submission has failed.
if (defined $q->param('submit')) {
# Changes have been submitted: process them
@@ -330,6 +336,8 @@ sub AddLocal : Runmode {
my $d = (split /\//, $ENV{PATH_INFO}, 3)[1];
my $q = $self->query;
+ return $self->redirect($q->url.'/'.$d.'/') if defined $q->param('cancel');
+
my $t = $q->param('t') // die "Undefined type";
my $error; # Tells whether the change submission has failed.
if (defined $q->param('submit')) {
diff --git a/template/add-alias.html b/template/add-alias.html
index 0055012..c3146ea 100644
--- a/template/add-alias.html
+++ b/template/add-alias.html
@@ -76,7 +76,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/add-list.html b/template/add-list.html
index bfe56a9..2ce179c 100644
--- a/template/add-list.html
+++ b/template/add-list.html
@@ -83,7 +83,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/add-mailbox.html b/template/add-mailbox.html
index fd7e521..4079da0 100644
--- a/template/add-mailbox.html
+++ b/template/add-mailbox.html
@@ -93,7 +93,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/edit-alias.html b/template/edit-alias.html
index 4390652..7539496 100644
--- a/template/edit-alias.html
+++ b/template/edit-alias.html
@@ -78,7 +78,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/edit-domain.html b/template/edit-domain.html
index 7e8ba2c..8e2ada3 100644
--- a/template/edit-domain.html
+++ b/template/edit-domain.html
@@ -80,7 +80,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/edit-list.html b/template/edit-list.html
index d07f9da..edcdd3f 100644
--- a/template/edit-list.html
+++ b/template/edit-list.html
@@ -25,7 +25,7 @@
<TMPL_IF NAME=newChanges>
<TMPL_IF NAME=error>
- <div class="error"><TMPL_VAR NAME=error></div>
+ <div class="fail"><TMPL_VAR NAME=error></div>
<TMPL_ELSE>
<div class="success">Your changes have succesfully been submitted.</div>
</TMPL_IF>
@@ -65,7 +65,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/edit-mailbox.html b/template/edit-mailbox.html
index 3dce6e7..ed84558 100644
--- a/template/edit-mailbox.html
+++ b/template/edit-mailbox.html
@@ -107,7 +107,8 @@
<hr/>
- <input type="submit" name="submit" value="Submit Changes" />
+ <input type="submit" name="cancel" value="Cancel" />
+ <input type="submit" name="submit" value="Submit" />
</div>
</form>
</body>
diff --git a/template/list-domains.html b/template/list-domains.html
index 561f788..8d89cb7 100644
--- a/template/list-domains.html
+++ b/template/list-domains.html
@@ -19,7 +19,7 @@
</div>
<hr/>
- <h1>Manage domains<span class="add">[<a href="<TMPL_VAR NAME=url>/?a=add">add</a>]<span></h1>
+ <h1>Manage domains<span class="action">[<a href="<TMPL_VAR NAME=url>/?a=add">add</a>]<span></h1>
<a name="domains"></a>
<table class="list">