Fossil SCM
edit checkin page html validated and added custom color edit
Commit
41385f75da4e557292a6321f11f769a5472129d7
Parent
f8f63dfad93b934…
1 file changed
+35
-24
+35
-24
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1306,12 +1306,14 @@ | ||
| 1306 | 1306 | { "#d0c0ff", "#d0c0ff" }, |
| 1307 | 1307 | { "#ffc0ff", "#ffc0ff" }, |
| 1308 | 1308 | { "#ffc0d0", "#ffc0d0" }, |
| 1309 | 1309 | { "#fff0c0", "#fff0c0" }, |
| 1310 | 1310 | { "#c0c0c0", "#c0c0c0" }, |
| 1311 | + { "custom", "##" }, | |
| 1311 | 1312 | }; |
| 1312 | - int nColor = sizeof(aColor)/sizeof(aColor[0]); | |
| 1313 | + int nColor = sizeof(aColor)/sizeof(aColor[0])-1; | |
| 1314 | + int stdClrFound; | |
| 1313 | 1315 | int i; |
| 1314 | 1316 | |
| 1315 | 1317 | login_check_credentials(); |
| 1316 | 1318 | if( !g.okWrite ){ login_needed(); return; } |
| 1317 | 1319 | rid = name_to_rid(P("r")); |
| @@ -1332,10 +1334,12 @@ | ||
| 1332 | 1334 | if( zDate==0 ) fossil_redirect_home(); |
| 1333 | 1335 | zNewDate = PD("dt",zDate); |
| 1334 | 1336 | zColor = db_text("", "SELECT bgcolor" |
| 1335 | 1337 | " FROM event WHERE objid=%d", rid); |
| 1336 | 1338 | zNewColor = PD("clr",zColor); |
| 1339 | + if (strcmp(zNewColor,aColor[nColor].zColor)==0) | |
| 1340 | + zNewColor = P("clrcust"); | |
| 1337 | 1341 | fPropagateColor = P("pclr")!=0; |
| 1338 | 1342 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 1339 | 1343 | zNewTag = PD("tagname",""); |
| 1340 | 1344 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 1341 | 1345 | zNewBranch = PD("brname",""); |
| @@ -1474,66 +1478,73 @@ | ||
| 1474 | 1478 | @ <hr /> |
| 1475 | 1479 | blob_reset(&suffix); |
| 1476 | 1480 | } |
| 1477 | 1481 | @ <p>Make changes to attributes of check-in |
| 1478 | 1482 | @ [<a href="ci?name=%s(zUuid)">%s(zUuid)</a>]:</p> |
| 1479 | - @ <form action="%s(g.zBaseURL)/ci_edit" method="POST"> | |
| 1483 | + @ <form action="%s(g.zBaseURL)/ci_edit" method="post"><div> | |
| 1480 | 1484 | login_insert_csrf_secret(); |
| 1481 | - @ <input type="hidden" name="r" value="%S(zUuid)"> | |
| 1485 | + @ <input type="hidden" name="r" value="%S(zUuid)" /> | |
| 1482 | 1486 | @ <table border="0" cellspacing="10"> |
| 1483 | 1487 | |
| 1484 | 1488 | @ <tr><td align="right" valign="top"><b>User:</b></td> |
| 1485 | 1489 | @ <td valign="top"> |
| 1486 | - @ <input type="text" name="u" size="20" value="%h(zNewUser)"> | |
| 1490 | + @ <input type="text" name="u" size="20" value="%h(zNewUser)" /> | |
| 1487 | 1491 | @ </td></tr> |
| 1488 | 1492 | |
| 1489 | 1493 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1490 | 1494 | @ <td valign="top"> |
| 1491 | 1495 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1492 | 1496 | @ </td></tr> |
| 1493 | 1497 | |
| 1494 | 1498 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1495 | 1499 | @ <td valign="top"> |
| 1496 | - @ <input type="text" name="dt" size="20" value="%h(zNewDate)"> | |
| 1500 | + @ <input type="text" name="dt" size="20" value="%h(zNewDate)" /> | |
| 1497 | 1501 | @ </td></tr> |
| 1498 | 1502 | |
| 1499 | 1503 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1500 | 1504 | @ <td valign="top"> |
| 1501 | - @ <table border=0 cellpadding=0 cellspacing=1> | |
| 1505 | + @ <table border="0" cellpadding="0" cellspacing="1"> | |
| 1502 | 1506 | @ <tr><td colspan="6" align="left"> |
| 1503 | 1507 | if( fPropagateColor ){ |
| 1504 | - @ <input type="checkbox" name="pclr" checked> | |
| 1508 | + @ <input type="checkbox" name="pclr" checked="checked" /> | |
| 1505 | 1509 | }else{ |
| 1506 | - @ <input type="checkbox" name="pclr"> | |
| 1510 | + @ <input type="checkbox" name="pclr" /> | |
| 1507 | 1511 | } |
| 1508 | - @ Propagate color to descendants</input></td></tr> | |
| 1512 | + @ Propagate color to descendants</td></tr> | |
| 1509 | 1513 | @ <tr> |
| 1510 | - for(i=0; i<nColor; i++){ | |
| 1514 | + for(i=0,stdClrFound=0; i<nColor; i++){ | |
| 1511 | 1515 | if( aColor[i].zColor[0] ){ |
| 1512 | 1516 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1513 | 1517 | }else{ |
| 1514 | 1518 | @ <td> |
| 1515 | 1519 | } |
| 1516 | 1520 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1517 | - @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked> | |
| 1521 | + @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked="checked" /> | |
| 1522 | + stdClrFound=1; | |
| 1518 | 1523 | }else{ |
| 1519 | - @ <input type="radio" name="clr" value="%h(aColor[i].zColor)"> | |
| 1524 | + @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> | |
| 1520 | 1525 | } |
| 1521 | - @ %h(aColor[i].zCName)</input></td> | |
| 1526 | + @ %h(aColor[i].zCName)</td> | |
| 1522 | 1527 | if( (i%6)==5 && i+1<nColor ){ |
| 1523 | 1528 | @ </tr><tr> |
| 1524 | 1529 | } |
| 1525 | 1530 | } |
| 1531 | + @ </tr><tr><td> | |
| 1532 | + @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" %h(stdClrFound?"":"checked=\"checked\"") /> | |
| 1533 | + @ %h(aColor[i].zCName)</td> | |
| 1534 | + @ <td colspan="5"> | |
| 1535 | + @ <input type="text" name="clrcust" value="%h(stdClrFound?"":zNewColor)" /> | |
| 1536 | + @ </td> | |
| 1526 | 1537 | @ </tr> |
| 1527 | 1538 | @ </table> |
| 1528 | 1539 | @ </td></tr> |
| 1529 | 1540 | |
| 1530 | 1541 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 1531 | 1542 | @ <td valign="top"> |
| 1532 | - @ <input type="checkbox" name="newtag"%s(zNewTagFlag)> | |
| 1543 | + @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> | |
| 1533 | 1544 | @ Add the following new tag name to this check-in: |
| 1534 | - @ <input type="text" width="15" name="tagname" value="%h(zNewTag)"> | |
| 1545 | + @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" /> | |
| 1535 | 1546 | db_prepare(&q, |
| 1536 | 1547 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 1537 | 1548 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 1538 | 1549 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 1539 | 1550 | " ELSE tagname END", |
| @@ -1543,13 +1554,13 @@ | ||
| 1543 | 1554 | int tagid = db_column_int(&q, 0); |
| 1544 | 1555 | const char *zTagName = db_column_text(&q, 1); |
| 1545 | 1556 | char zLabel[30]; |
| 1546 | 1557 | sprintf(zLabel, "c%d", tagid); |
| 1547 | 1558 | if( P(zLabel) ){ |
| 1548 | - @ <br /><input type="checkbox" name="c%d(tagid)" checked> | |
| 1559 | + @ <br /><input type="checkbox" name="c%d(tagid)" checked="checked" /> | |
| 1549 | 1560 | }else{ |
| 1550 | - @ <br /><input type="checkbox" name="c%d(tagid)"> | |
| 1561 | + @ <br /><input type="checkbox" name="c%d(tagid)" /> | |
| 1551 | 1562 | } |
| 1552 | 1563 | if( strncmp(zTagName, "sym-", 4)==0 ){ |
| 1553 | 1564 | @ Cancel tag <b>%h(&zTagName[4])</b> |
| 1554 | 1565 | }else{ |
| 1555 | 1566 | @ Cancel special tag <b>%h(zTagName)</b> |
| @@ -1558,33 +1569,33 @@ | ||
| 1558 | 1569 | db_finalize(&q); |
| 1559 | 1570 | @ </td></tr> |
| 1560 | 1571 | |
| 1561 | 1572 | @ <tr><td align="right" valign="top"><b>Branching:</b></td> |
| 1562 | 1573 | @ <td valign="top"> |
| 1563 | - @ <input type="checkbox" name="newbr"%s(zNewBrFlag)> | |
| 1574 | + @ <input type="checkbox" name="newbr"%s(zNewBrFlag) /> | |
| 1564 | 1575 | @ Make this check-in the start of a new branch named: |
| 1565 | - @ <input type="text" width="15" name="brname" value="%h(zNewBranch)"> | |
| 1576 | + @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" /> | |
| 1566 | 1577 | @ </td></tr> |
| 1567 | 1578 | |
| 1568 | 1579 | if( is_a_leaf(rid) |
| 1569 | 1580 | && !db_exists("SELECT 1 FROM tagxref " |
| 1570 | 1581 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 1571 | 1582 | TAG_CLOSED, rid) |
| 1572 | 1583 | ){ |
| 1573 | 1584 | @ <tr><td align="right" valign="top"><b>Leaf Closure:</b></td> |
| 1574 | 1585 | @ <td valign="top"> |
| 1575 | - @ <input type="checkbox" name="close"%s(zCloseFlag)> | |
| 1586 | + @ <input type="checkbox" name="close"%s(zCloseFlag) /> | |
| 1576 | 1587 | @ Mark this leaf as "closed" so that it no longer appears on the |
| 1577 | 1588 | @ "leaves" page and is no longer labeled as a "<b>Leaf</b>". |
| 1578 | 1589 | @ </td></tr> |
| 1579 | 1590 | } |
| 1580 | 1591 | |
| 1581 | 1592 | |
| 1582 | 1593 | @ <tr><td colspan="2"> |
| 1583 | - @ <input type="submit" name="preview" value="Preview"> | |
| 1584 | - @ <input type="submit" name="apply" value="Apply Changes"> | |
| 1585 | - @ <input type="submit" name="cancel" value="Cancel"> | |
| 1594 | + @ <input type="submit" name="preview" value="Preview" /> | |
| 1595 | + @ <input type="submit" name="apply" value="Apply Changes" /> | |
| 1596 | + @ <input type="submit" name="cancel" value="Cancel" /> | |
| 1586 | 1597 | @ </td></tr> |
| 1587 | 1598 | @ </table> |
| 1588 | - @ </form> | |
| 1599 | + @ </div></form> | |
| 1589 | 1600 | style_footer(); |
| 1590 | 1601 | } |
| 1591 | 1602 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1306,12 +1306,14 @@ | |
| 1306 | { "#d0c0ff", "#d0c0ff" }, |
| 1307 | { "#ffc0ff", "#ffc0ff" }, |
| 1308 | { "#ffc0d0", "#ffc0d0" }, |
| 1309 | { "#fff0c0", "#fff0c0" }, |
| 1310 | { "#c0c0c0", "#c0c0c0" }, |
| 1311 | }; |
| 1312 | int nColor = sizeof(aColor)/sizeof(aColor[0]); |
| 1313 | int i; |
| 1314 | |
| 1315 | login_check_credentials(); |
| 1316 | if( !g.okWrite ){ login_needed(); return; } |
| 1317 | rid = name_to_rid(P("r")); |
| @@ -1332,10 +1334,12 @@ | |
| 1332 | if( zDate==0 ) fossil_redirect_home(); |
| 1333 | zNewDate = PD("dt",zDate); |
| 1334 | zColor = db_text("", "SELECT bgcolor" |
| 1335 | " FROM event WHERE objid=%d", rid); |
| 1336 | zNewColor = PD("clr",zColor); |
| 1337 | fPropagateColor = P("pclr")!=0; |
| 1338 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 1339 | zNewTag = PD("tagname",""); |
| 1340 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 1341 | zNewBranch = PD("brname",""); |
| @@ -1474,66 +1478,73 @@ | |
| 1474 | @ <hr /> |
| 1475 | blob_reset(&suffix); |
| 1476 | } |
| 1477 | @ <p>Make changes to attributes of check-in |
| 1478 | @ [<a href="ci?name=%s(zUuid)">%s(zUuid)</a>]:</p> |
| 1479 | @ <form action="%s(g.zBaseURL)/ci_edit" method="POST"> |
| 1480 | login_insert_csrf_secret(); |
| 1481 | @ <input type="hidden" name="r" value="%S(zUuid)"> |
| 1482 | @ <table border="0" cellspacing="10"> |
| 1483 | |
| 1484 | @ <tr><td align="right" valign="top"><b>User:</b></td> |
| 1485 | @ <td valign="top"> |
| 1486 | @ <input type="text" name="u" size="20" value="%h(zNewUser)"> |
| 1487 | @ </td></tr> |
| 1488 | |
| 1489 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1490 | @ <td valign="top"> |
| 1491 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1492 | @ </td></tr> |
| 1493 | |
| 1494 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1495 | @ <td valign="top"> |
| 1496 | @ <input type="text" name="dt" size="20" value="%h(zNewDate)"> |
| 1497 | @ </td></tr> |
| 1498 | |
| 1499 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1500 | @ <td valign="top"> |
| 1501 | @ <table border=0 cellpadding=0 cellspacing=1> |
| 1502 | @ <tr><td colspan="6" align="left"> |
| 1503 | if( fPropagateColor ){ |
| 1504 | @ <input type="checkbox" name="pclr" checked> |
| 1505 | }else{ |
| 1506 | @ <input type="checkbox" name="pclr"> |
| 1507 | } |
| 1508 | @ Propagate color to descendants</input></td></tr> |
| 1509 | @ <tr> |
| 1510 | for(i=0; i<nColor; i++){ |
| 1511 | if( aColor[i].zColor[0] ){ |
| 1512 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1513 | }else{ |
| 1514 | @ <td> |
| 1515 | } |
| 1516 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1517 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked> |
| 1518 | }else{ |
| 1519 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)"> |
| 1520 | } |
| 1521 | @ %h(aColor[i].zCName)</input></td> |
| 1522 | if( (i%6)==5 && i+1<nColor ){ |
| 1523 | @ </tr><tr> |
| 1524 | } |
| 1525 | } |
| 1526 | @ </tr> |
| 1527 | @ </table> |
| 1528 | @ </td></tr> |
| 1529 | |
| 1530 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 1531 | @ <td valign="top"> |
| 1532 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag)> |
| 1533 | @ Add the following new tag name to this check-in: |
| 1534 | @ <input type="text" width="15" name="tagname" value="%h(zNewTag)"> |
| 1535 | db_prepare(&q, |
| 1536 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 1537 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 1538 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 1539 | " ELSE tagname END", |
| @@ -1543,13 +1554,13 @@ | |
| 1543 | int tagid = db_column_int(&q, 0); |
| 1544 | const char *zTagName = db_column_text(&q, 1); |
| 1545 | char zLabel[30]; |
| 1546 | sprintf(zLabel, "c%d", tagid); |
| 1547 | if( P(zLabel) ){ |
| 1548 | @ <br /><input type="checkbox" name="c%d(tagid)" checked> |
| 1549 | }else{ |
| 1550 | @ <br /><input type="checkbox" name="c%d(tagid)"> |
| 1551 | } |
| 1552 | if( strncmp(zTagName, "sym-", 4)==0 ){ |
| 1553 | @ Cancel tag <b>%h(&zTagName[4])</b> |
| 1554 | }else{ |
| 1555 | @ Cancel special tag <b>%h(zTagName)</b> |
| @@ -1558,33 +1569,33 @@ | |
| 1558 | db_finalize(&q); |
| 1559 | @ </td></tr> |
| 1560 | |
| 1561 | @ <tr><td align="right" valign="top"><b>Branching:</b></td> |
| 1562 | @ <td valign="top"> |
| 1563 | @ <input type="checkbox" name="newbr"%s(zNewBrFlag)> |
| 1564 | @ Make this check-in the start of a new branch named: |
| 1565 | @ <input type="text" width="15" name="brname" value="%h(zNewBranch)"> |
| 1566 | @ </td></tr> |
| 1567 | |
| 1568 | if( is_a_leaf(rid) |
| 1569 | && !db_exists("SELECT 1 FROM tagxref " |
| 1570 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 1571 | TAG_CLOSED, rid) |
| 1572 | ){ |
| 1573 | @ <tr><td align="right" valign="top"><b>Leaf Closure:</b></td> |
| 1574 | @ <td valign="top"> |
| 1575 | @ <input type="checkbox" name="close"%s(zCloseFlag)> |
| 1576 | @ Mark this leaf as "closed" so that it no longer appears on the |
| 1577 | @ "leaves" page and is no longer labeled as a "<b>Leaf</b>". |
| 1578 | @ </td></tr> |
| 1579 | } |
| 1580 | |
| 1581 | |
| 1582 | @ <tr><td colspan="2"> |
| 1583 | @ <input type="submit" name="preview" value="Preview"> |
| 1584 | @ <input type="submit" name="apply" value="Apply Changes"> |
| 1585 | @ <input type="submit" name="cancel" value="Cancel"> |
| 1586 | @ </td></tr> |
| 1587 | @ </table> |
| 1588 | @ </form> |
| 1589 | style_footer(); |
| 1590 | } |
| 1591 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1306,12 +1306,14 @@ | |
| 1306 | { "#d0c0ff", "#d0c0ff" }, |
| 1307 | { "#ffc0ff", "#ffc0ff" }, |
| 1308 | { "#ffc0d0", "#ffc0d0" }, |
| 1309 | { "#fff0c0", "#fff0c0" }, |
| 1310 | { "#c0c0c0", "#c0c0c0" }, |
| 1311 | { "custom", "##" }, |
| 1312 | }; |
| 1313 | int nColor = sizeof(aColor)/sizeof(aColor[0])-1; |
| 1314 | int stdClrFound; |
| 1315 | int i; |
| 1316 | |
| 1317 | login_check_credentials(); |
| 1318 | if( !g.okWrite ){ login_needed(); return; } |
| 1319 | rid = name_to_rid(P("r")); |
| @@ -1332,10 +1334,12 @@ | |
| 1334 | if( zDate==0 ) fossil_redirect_home(); |
| 1335 | zNewDate = PD("dt",zDate); |
| 1336 | zColor = db_text("", "SELECT bgcolor" |
| 1337 | " FROM event WHERE objid=%d", rid); |
| 1338 | zNewColor = PD("clr",zColor); |
| 1339 | if (strcmp(zNewColor,aColor[nColor].zColor)==0) |
| 1340 | zNewColor = P("clrcust"); |
| 1341 | fPropagateColor = P("pclr")!=0; |
| 1342 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 1343 | zNewTag = PD("tagname",""); |
| 1344 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 1345 | zNewBranch = PD("brname",""); |
| @@ -1474,66 +1478,73 @@ | |
| 1478 | @ <hr /> |
| 1479 | blob_reset(&suffix); |
| 1480 | } |
| 1481 | @ <p>Make changes to attributes of check-in |
| 1482 | @ [<a href="ci?name=%s(zUuid)">%s(zUuid)</a>]:</p> |
| 1483 | @ <form action="%s(g.zBaseURL)/ci_edit" method="post"><div> |
| 1484 | login_insert_csrf_secret(); |
| 1485 | @ <input type="hidden" name="r" value="%S(zUuid)" /> |
| 1486 | @ <table border="0" cellspacing="10"> |
| 1487 | |
| 1488 | @ <tr><td align="right" valign="top"><b>User:</b></td> |
| 1489 | @ <td valign="top"> |
| 1490 | @ <input type="text" name="u" size="20" value="%h(zNewUser)" /> |
| 1491 | @ </td></tr> |
| 1492 | |
| 1493 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1494 | @ <td valign="top"> |
| 1495 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1496 | @ </td></tr> |
| 1497 | |
| 1498 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1499 | @ <td valign="top"> |
| 1500 | @ <input type="text" name="dt" size="20" value="%h(zNewDate)" /> |
| 1501 | @ </td></tr> |
| 1502 | |
| 1503 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1504 | @ <td valign="top"> |
| 1505 | @ <table border="0" cellpadding="0" cellspacing="1"> |
| 1506 | @ <tr><td colspan="6" align="left"> |
| 1507 | if( fPropagateColor ){ |
| 1508 | @ <input type="checkbox" name="pclr" checked="checked" /> |
| 1509 | }else{ |
| 1510 | @ <input type="checkbox" name="pclr" /> |
| 1511 | } |
| 1512 | @ Propagate color to descendants</td></tr> |
| 1513 | @ <tr> |
| 1514 | for(i=0,stdClrFound=0; i<nColor; i++){ |
| 1515 | if( aColor[i].zColor[0] ){ |
| 1516 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1517 | }else{ |
| 1518 | @ <td> |
| 1519 | } |
| 1520 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1521 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked="checked" /> |
| 1522 | stdClrFound=1; |
| 1523 | }else{ |
| 1524 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> |
| 1525 | } |
| 1526 | @ %h(aColor[i].zCName)</td> |
| 1527 | if( (i%6)==5 && i+1<nColor ){ |
| 1528 | @ </tr><tr> |
| 1529 | } |
| 1530 | } |
| 1531 | @ </tr><tr><td> |
| 1532 | @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" %h(stdClrFound?"":"checked=\"checked\"") /> |
| 1533 | @ %h(aColor[i].zCName)</td> |
| 1534 | @ <td colspan="5"> |
| 1535 | @ <input type="text" name="clrcust" value="%h(stdClrFound?"":zNewColor)" /> |
| 1536 | @ </td> |
| 1537 | @ </tr> |
| 1538 | @ </table> |
| 1539 | @ </td></tr> |
| 1540 | |
| 1541 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 1542 | @ <td valign="top"> |
| 1543 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> |
| 1544 | @ Add the following new tag name to this check-in: |
| 1545 | @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" /> |
| 1546 | db_prepare(&q, |
| 1547 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 1548 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 1549 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 1550 | " ELSE tagname END", |
| @@ -1543,13 +1554,13 @@ | |
| 1554 | int tagid = db_column_int(&q, 0); |
| 1555 | const char *zTagName = db_column_text(&q, 1); |
| 1556 | char zLabel[30]; |
| 1557 | sprintf(zLabel, "c%d", tagid); |
| 1558 | if( P(zLabel) ){ |
| 1559 | @ <br /><input type="checkbox" name="c%d(tagid)" checked="checked" /> |
| 1560 | }else{ |
| 1561 | @ <br /><input type="checkbox" name="c%d(tagid)" /> |
| 1562 | } |
| 1563 | if( strncmp(zTagName, "sym-", 4)==0 ){ |
| 1564 | @ Cancel tag <b>%h(&zTagName[4])</b> |
| 1565 | }else{ |
| 1566 | @ Cancel special tag <b>%h(zTagName)</b> |
| @@ -1558,33 +1569,33 @@ | |
| 1569 | db_finalize(&q); |
| 1570 | @ </td></tr> |
| 1571 | |
| 1572 | @ <tr><td align="right" valign="top"><b>Branching:</b></td> |
| 1573 | @ <td valign="top"> |
| 1574 | @ <input type="checkbox" name="newbr"%s(zNewBrFlag) /> |
| 1575 | @ Make this check-in the start of a new branch named: |
| 1576 | @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" /> |
| 1577 | @ </td></tr> |
| 1578 | |
| 1579 | if( is_a_leaf(rid) |
| 1580 | && !db_exists("SELECT 1 FROM tagxref " |
| 1581 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 1582 | TAG_CLOSED, rid) |
| 1583 | ){ |
| 1584 | @ <tr><td align="right" valign="top"><b>Leaf Closure:</b></td> |
| 1585 | @ <td valign="top"> |
| 1586 | @ <input type="checkbox" name="close"%s(zCloseFlag) /> |
| 1587 | @ Mark this leaf as "closed" so that it no longer appears on the |
| 1588 | @ "leaves" page and is no longer labeled as a "<b>Leaf</b>". |
| 1589 | @ </td></tr> |
| 1590 | } |
| 1591 | |
| 1592 | |
| 1593 | @ <tr><td colspan="2"> |
| 1594 | @ <input type="submit" name="preview" value="Preview" /> |
| 1595 | @ <input type="submit" name="apply" value="Apply Changes" /> |
| 1596 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 1597 | @ </td></tr> |
| 1598 | @ </table> |
| 1599 | @ </div></form> |
| 1600 | style_footer(); |
| 1601 | } |
| 1602 |