From 3737a64ff3be049627acfecd3bf4f551590152c8 Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Wed, 20 May 2015 10:40:51 +0200 Subject: [PATCH] [chg] change rename/delete tag form --- inc/user.css | 19 ++++++++- index.php | 6 +-- tpl/addlink.html | 28 +++++++------ tpl/changepassword.html | 35 ++++++++++------ tpl/changetag.html | 89 ++++++++++++++++++++++++++++++----------- 5 files changed, 124 insertions(+), 53 deletions(-) diff --git a/inc/user.css b/inc/user.css index eae98cc..d206756 100644 --- a/inc/user.css +++ b/inc/user.css @@ -212,13 +212,13 @@ pre code { align-items: flex-start; } -.searchform input:nth-child(1), .tagfilter input:nth-child(1), .addform input:nth-child(1) { +.searchform input:nth-child(1), .tagfilter input:nth-child(1), .addform input:nth-child(1){ order: 1; flex: 1 0 auto; align-self: stretch; } -.searchform input:nth-child(2), .tagfilter input:nth-child(2), .addform input:nth-child(2) { +.searchform input:nth-child(2), .tagfilter input:nth-child(2), .addform input:nth-child(2){ order: 2; flex: 0 0 20%; align-self: stretch; @@ -310,6 +310,21 @@ pre code { padding: 0; } +fieldset { + border: 1px solid #CDCDCD; + border-radius: 0.3em; + padding: 0.3em; + margin: 0.3em 0; +} + +legend { + padding : 0 0.3em; + margin: 0 0 0 0.6em; + color : #FFFFFF; + font-weight: bolder; + +} + p { margin: 1em 0; } diff --git a/index.php b/index.php index 8975b6e..84b9a91 100644 --- a/index.php +++ b/index.php @@ -1473,7 +1473,7 @@ function renderPage() // -------- User wants to rename a tag or delete it if (isset($_SERVER["QUERY_STRING"]) && startswith($_SERVER["QUERY_STRING"],'do=changetag')) { - if (empty($_POST['fromtag'])) + if (empty($_POST['fromtag']) && empty($_POST['tagToDelete'])) { $PAGE = new pageBuilder; $PAGE->assign('linkcount',count($LINKSDB)); @@ -1484,9 +1484,9 @@ function renderPage() if (!tokenOk($_POST['token'])) die('Wrong token.'); // Delete a tag: - if (!empty($_POST['deletetag']) && !empty($_POST['fromtag'])) + if (!empty($_POST['deletetag']) && !empty($_POST['tagToDelete'])) { - $needle=trim($_POST['fromtag']); + $needle=trim($_POST['tagToDelete']); $linksToAlter = $LINKSDB->filterTags($needle,true); // true for case-sensitive tag search. foreach($linksToAlter as $key=>$value) { diff --git a/tpl/addlink.html b/tpl/addlink.html index 853715d..941de08 100644 --- a/tpl/addlink.html +++ b/tpl/addlink.html @@ -1,16 +1,18 @@ -{include="includes"} - - -{include="page.footer"} - + + {include="includes"} + + + + {include="page.footer"} + \ No newline at end of file diff --git a/tpl/changepassword.html b/tpl/changepassword.html index 48cf5fa..8bec578 100644 --- a/tpl/changepassword.html +++ b/tpl/changepassword.html @@ -1,15 +1,26 @@ -{include="includes"} - - -{include="page.footer"} - + + {include="includes"} + + + + {include="page.footer"} + \ No newline at end of file diff --git a/tpl/changetag.html b/tpl/changetag.html index b22bdde..a826932 100644 --- a/tpl/changetag.html +++ b/tpl/changetag.html @@ -1,26 +1,69 @@ -{include="includes"} -{if="empty($GLOBALS['disablejquery'])"}{/if} - - - -{include="page.footer"} -{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"} - -{/if} - + + {include="includes"} + {if="empty($GLOBALS['disablejquery'])"} + + + {/if} + + + + {include="page.footer"} + {if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn()) && empty($GLOBALS['disablejquery'])"} + + {/if} + \ No newline at end of file